At 01:05 18/03/2009, Java Developer wrote: >Could you refer me to a link explaining fragment rules versus >top-level rules (I find the Wiki pages confusing)? A keyword >search on google did not help.
To turn a non-fragment lexer rule into a fragment rule, you just put the word "fragment" in front of it. This means that it's no longer considered a possible candidate to be selected as a full token -- it has to be referenced from other lexer rules in order to have any effect. (It is still allocated a token id, though, which is useful for more advanced problems.) Have a look at the example v3 grammars. You might also want to get TDAR (the ANTLR book). 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 -~----------~----~----~----~------~----~------~--~---
