Bryan's Home Page - Work - Publications - Scribblings - Photo Album - Humor - Stats

The Packrat Parsing and
Parsing Expression Grammars Page

Introduction

Parsing expression grammars (PEGs) are an alternative to context free grammars for formally specifying syntax, and packrat parsers are parsers for PEGs that operate in guaranteed linear time through the use of memoization. For a brief technical summary see the Wikipedia entry on PEGs. For more in-depth descriptions see the original PEG paper and packrat parsing paper, and related papers below. Bryan Ford, the maintainer of this site, coined the modern terms PEGs and packrat parsing, but much of their formal theory existed earlier and all the more recent work on this topic is by others.

Mailing List

The following mailing list is open to anyone wishing to announce software or papers related to PEGs and packrat parsing, or discuss ideas and issues:
The PEG Mailing List

PEG/Packrat Parsing Bibliography

The following research papers develop and explore PEGs and packrat parsing in detail; most were written by various authors working independently. The papers are listed chronologically starting from most recent. Some of the papers have associated code available online.

PEG-related Projects

The following projects have implemented PEG parsers, parser generators, and/or combinator libraries in a variety of languages:

Sample PEGs

This section contains pointers to some "nontrivial" grammars expressed as PEGs or PEG-like languages:
Maintainer: Bryan Ford. Additions or corrections to this page are welcome — with apologies if I sometimes take a long time to respond!

Bryan Ford Updated Wednesday, 22-Oct-2014 15:19:50 EDT