|
Order doesn't matter. ANTLR will match the longest possible token. One case when order matters is when the rule below cannot match any token inspite of the 'lengthiest token matching' mechanism. Example: ID : 'a'..''z'+ ; SOME_KEYWORD : 'key' ; In this case ANTLR will report an error as SOME_KEYWORD can never be matched. Disambiguating by 'lengthiest token' will not work here. Cheers, Indhu Avid Trober wrote: thanks. org.antlr.Tool is happy with these two, regardless of which one is above/below the other. But, won't the DFA's care about the order??? --~--~---------~--~----~------------~-------~--~----~ 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
