[antlr-interest] packrat vs. LL(*)
Michael
micha-1 at fantasymail.de
Mon Jun 8 03:43:53 PDT 2009
Am Monday 08 June 2009 11:19:49 schrieb Steven Obua:
> Hi,
>
>
> So, as I understand, with backtrack=true and memoize=true I basically
> switch to linear time / linear space packrat parsing.
I'm not sure if it's a the same as a packrat parser (like rats! for example).
There are some differences, the biggest is in a packrat parser you have
ordered choises:
if in a rule e1 | e2 the first (e1) succeeds. the second is ignored. So
unlike normal BNF definitions you cannot simply switch the order of the
alternatives.
And you don't use a separate lexer, it's all in one grammar
Michael
More information about the antlr-interest
mailing list