There is also GPL LL1 parser tool llnextgen usable for easy grammar
pacc is a compiler-compiler, somewhat like yacc
Its input is a description of a grammar, and its output is a C
function that recognizes strings of that grammar. The
technical difference is this: yacc reads a
(CFGs), and writes a LALR(1) parser; pacc
reads a parsing expression
grammar (PEG), and writes a packrat parser.
PEGs and packrat parsing offer several advantages over CFGs.
- There is no need for a two-level structure with a separate lexer
(this is essentially a misfeature of CFGs - they are unable to
standard tokenization rules naturally).
- PEGs can “look ahead” in the input as far as they need to.
- Despite arbitrary look-ahead, packrat parsers are linear in
space complexity: O(n) in the size of the
input (whereas LALR(1)
parsers are O(n²), and fully general CFG
parsing is O(n³)).
- PEGs are easy to understand, and pleasant to work with.
PackCC is a packrat parser generator for C.
Its main features are as follows:
- Generates your parser in C from a grammar described in a PEG,
- Gives your parser great efficiency by packrat
- Supports direct and indirect left-recursive