Nevermind the above question, the problem was caused by a $markupChain reference in my action code.
On Aug 16, 2009 10:33am, [email protected] wrote: > The below parser grammar works, however when copying the rewrite rules > into my tree grammar (as stated in the book). I seem to get the following > error: reference $markupChain is ambiguous; rule markupChain is enclosing > rule and referenced in the production (assuming enclosing rule). Anybody > knows a solution that will fix my tree grammar? > Thanks in advance, > Jeroen > Parser grammar > markupChain: markup markupChain > -> ^( MARKUP_CHAIN markup markupChain ) > | expression ';' > -> ^( MARKUP_CHAIN expression ';' ) > | statement > -> ^( MARKUP_CHAIN statement ) > | embedding ';' > -> ^( MARKUP_CHAIN embedding ';' ) > | ';' > -> ^( MARKUP_CHAIN ';' ) ; > Tree grammar > markupChain: ^( MARKUP_CHAIN markup markupChain ) > | ^( MARKUP_CHAIN expression ';' ) > | ^( MARKUP_CHAIN statement ) > | ^( MARKUP_CHAIN embedding ';' ) > | ^( MARKUP_CHAIN ';' ) ; > URL: > http://code.google.com/p/waebric/source/browse/trunk/implementations/java/antlr/src/main/grammar/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
