"Kevin J. Cummings" <[email protected]> writes: > On 07/31/2009 07:31 PM, Kendall Shaw wrote: >> Here's my non-working toy grammar: >> >> grammar test; >> >> tokens { >> CAT = 'cat' ; >> LP = '(' ; >> RP = ')' ; >> } >> >> them >> : (cat)=> cat >> | NAME >> ; > > Have you tried: > > them : (CAT LP)=> cat > | name; > > name : NAME > | CAT;
Thanks! I had tried something like the name rule there from the FAQ, but I missed that it was a parser rule, and got ambiguity errors. Kendall 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 -~----------~----~----~----~------~----~------~--~---
