ANTLR v3: order token to improve performance of tree walker
问题 Is it somehow possible to specify the order of the tokens generated by ANTLR v3? My goal is to order the tokens in such a way that valid tokens in my rule "expression" follow each other in order that conditions in the tree walkers (which have about 90 different branches) can be simplified to one branch. Something like if(LA18_0 >= ARRAY_ACCESS && LA18_0 <= VariableId){} ANTLR assigns the values to the tokens in alphabetical order. That means, the token beginning with an "a" has the lowest