At 09:51 1/05/2009, Gabriel Petrovay wrote: >ANTLR could either ignore ambiguous rules (if the computed k is >toooo large, give up) and proceed with normal computation. >Another thing ANTLR could do is be to compute k per-rule and >not per grammar.
k is already computed per-rule, or possibly even per-alt (in v3; in v2 you had to specify it explicitly). But in cases where ANTLR can't figure it out it will default to k=1, since that gives the best performance (if not always the correct result, when the grammar is ambiguous). It always helps to try to remove ambiguity and to keep your grammar as left-factored as possible. This will not only make ANTLR's job easier, it will also improve runtime performance :) List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
