[antlr-interest] Re: Request enhancement ANTLR

micheal_jor open.zone at virgin.net
Thu Jun 20 15:11:14 PDT 2002


Hi,

> Problem:
> ANTLR does not register filename information with tokens;
> only line/column information. 
> 
> This becomes a problem when using include files in which
> case it is unknown which source file a token originates from.
> 
> Solution:
> Add setFilename/getFilename to Token class and change
> other classes (including code generators) to use this method.
> 
> The impacted classes are: Token, CommonToken,
> CharScanner, LexerSharedInputState, JavaCodeGenerator
> and CppCodeGenerator.
> 
> I'd be willing to implement these changes if we agree that this
> enhancement is useful.

Care to post the code? And same message to you too John Allen Green. 
It helps if others can try out the changes you propose...

Quick note, is it possible to use a shared string table and just 
store a compact handle in each token?

Micheal



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list