[antlr-interest] v4 feature request: array of mode names in lexer object

Terence Parr parrt at cs.usfca.edu
Sat Jan 21 15:44:05 PST 2012


This is now in the latest early access honey badger.  pull it down.
Ter
On Jan 21, 2012, at 9:43 AM, Peter Boughton wrote:

> When debugging, it would be useful to have actual mode names
> displayed, rather than just numbers.
> 
> Similar to how you can do this with tokens:
> 
> 	lexer.tokenNames[token.getType()]
> 
> I'd like to be able to do:
> 
> 	lexer.modeNames[lexer.mode]
> 
> 
> ( At the moment I've got my own manually created array, but it'd be
> much nicer to have something that didn't keep needing updates when
> modes are added or re-ordered. )
> 
> 
> Thanks. :)
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address



More information about the antlr-interest mailing list