[antlr-interest] Token sorting in C# target (3.1b2)

dermot_1 at astrodrive.com dermot_1 at astrodrive.com
Tue Jul 22 02:42:22 PDT 2008


Just working through the latest beta ... one thing that I would find very
useful if to have the tokens sorted in the generated files. For example, I
get this:

 

    public const int MOD = 143;

    public const int LETTER = 198;

    public const int CONST = 69;

 

it would make debugging a lot easier if the tokens were sorted numerically
like this:

 

    public const int MOD = 143;

    public const int INC = 144;

    public const int DEC = 145;

 

Currently, I have to do a search for (say) 144 to find out that it's a DEC
token - and with several hundred tokens it can be time consuming. This is
most noticeable in debugging tree grammars where I typically just have a
list of tokens to stare at.

 

Note that in Antlr 2.7 the tokens were sorted numerically.

 

 

Dermot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080722/8f60ff6e/attachment.html 


More information about the antlr-interest mailing list