[antlr-interest] Honey Badger Theory

Gokulakannan Somasundaram gokul007 at gmail.com
Mon Jan 23 02:04:54 PST 2012


>
>  Basically, both parsing strategies use a DFA to predict which alternative
> to pick based upon the current input and the current decision. How this DFA
> is created is what's different. Statically, some of the DFA cannot be
> created so I failover to backtracking at runtime for v3. In v4, I do all
> the analysis runtime and so I can take each input on an individual basis. I
> can always create a proper DFA to predict the alternatives of a decision if
> I do it at runtime. hence no backtracking with the parser.
>
> Yes, LL(k) for k>1 does more work in v4 while it does the analysis step.
> Once it warms up, however, it will perform the same amount of work as v3.
> For example, if you are doing syntax highlighting with the parser inside an
> IDE, the first time you parse will be slower whereas the future passes will
> be just as efficient as v3 (in principal, though they are still a bit
> slower after warm-up at the moment).
>
>
Great explanation. Thanks a lot Terence.

Gokul.


More information about the antlr-interest mailing list