Hello, I am attempting to convert my production 'markupChain' into a nested hierchy of nodes. This allows me to always skip the remainder of my chain using a single wildcard symbol, regardless of my position in the chain. I've done just that in the grammar demonstrated below, however this grammar is not LL(*) due to recursive rule invocation.. meaning I have to enable backtracking.
markupChain: expression ';' -> ^( MARKUP_CHAIN expression ) | statement -> ^( MARKUP_CHAIN statement ) | embedding ';' -> ^( MARKUP_CHAIN embedding ) | markup markupChain -> ^( MARKUP_CHAIN markup markupChain ) | ';' ; I've made the grammar LL(*) as follows: markupChain: markup* ( ';' | expression ';' | embedding ';' | statement ) However, I am unable to specify a rewrite rule that allows me to retain my origional AST hierchy. Any help would be greatly appreciated! --~--~---------~--~----~------------~-------~--~----~ 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
