[antlr-interest] LL(*), backtracking and actions
Wujek Srujek
wujek.srujek at googlemail.com
Thu Sep 1 08:43:43 PDT 2011
Hi,
I am reading the ANTLR definitive reference book by Terence Parr, and read
about backtracking and LL(*). The book says that backtracking is only used
when LL(*) fails. On the other hand, it says that backtracking doesn't
invoke any actions when guessing, then rewinds input and reparses again
(possibly with memoization for performance). How does this function with
trying LL(*) first? Aren't actions invoked during this phase, and then, when
it fails, and backtracking finally finds a viable alternative, aren't they
invoked again? Or am I misunderstanding what the book says?
Regards,
wujek
More information about the antlr-interest
mailing list