[antlr-interest] Problems with syntactic predicates(?)

shmuel siegel antlr at shmuelhome.mine.nu
Sun Jan 27 17:31:09 PST 2008


Whatever the problem is in 3.01, the current 3.1 build fixes it. The 
parsing works as expected.

Johannes Luber wrote:
> Shmuel Siegel schrieb:
>> The question at hand isn't how to write the grammar; we all agree that
>> it is better to avoid predicates. The question is "why is the original
>> grammar failing?" As far as I can tell, the DFA predictor is getting
>> confused by the recursion in "args". If I make args depend on IDENTs
>> only, I can get the grammar to work (that is, it parses boo(a,b)).
>
> Recursion is a strong clue to use backtracking here. But if that's 
> worth it compared to the other approach?
>
> Johannes




More information about the antlr-interest mailing list