I am trying to write an English grammar with ANTLR and have simplified a particular problem to a particular subset for your convenience. (I'm using ANTLRWorks 1.3)
grammar predicate; predicate : 'verb' complement?; complement: indirectObject? object; indirectObject : nounPhrase; object : nounPhrase; nounPhrase : 'the' adjectivePhrase? 'noun'; adjectivePhrase : '<Ving>' complement?; gives "error(211): predicate.g:7:14: [fatal] rule complement has non-LL(*) decision due to recursive rule invocations reachable from alts 1,2. Resolve by left-factoring or using syntactic predicates or using backtrack=true option." Is somebody easily able to left-factor this while preserving the grammar? Or syntactically predicating if better? Sorry if I sound daft! I should say that taking away the "?" from either adjectivePhrase or indirectObject does not produce this error, but they are necessary. Many thanks! N --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address