Selim, I may have misunderstood your problem, but fragment rules don't form tokens in the output. They are just convenient patterns to re-use in other, actual tokens.
Regards, Matt On 14 July 2010 17:28, Selim Ciraci <[email protected]> wrote: > Hi all, > > I'm trying to write a program to parse a grammar file, modify it and write > it back as a grammar file. For this I use the builtin parser: > org.antlr.grammar.v3.ANTLRv3Lexer, org.antlr.grammar.v3.ANTLRv3Parser. > Everything seems to work ok but somehow the modifier of a rule is not > visible from the rule node. > For example: I have the following rule: fragment A:('a'|'A'); > > When I do a toStringTree() on the rule node I get the following output > (RULE A (BLOCK (ALT (BLOCK (ALT 'a' EOA) (ALT 'A' EOA) EOB) EOA) EOB) EOR) > > somehow the fragment is missing and I cannot access the modifier of the > rule. is there something I'm doing wrong here? if so how can I access the > modifier? > > With kind regards, > Selim Ciraci > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > Unsubscribe: > http://www.antlr.org/mailman/options/antlr-interest/your-email-address > 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.
