[antlr-interest] Re: Request enhancement ANTLR

John Allen Green greenj at ix.netcom.com
Thu Jun 20 23:03:17 PDT 2002


--On 20/06/2002 10:11 PM +0000 micheal_jor wrote:
>> ANTLR does not register filename information with tokens;
>> only line/column information. 
>> ...
> 
> 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...

I haven't proposed any changes, at least not to Antlr. The support that
I've added to my parser for filenames is done without modifying Antlr at
all. (In fact, I'm using one of Ric's development snapshots - completely
unmodified. I've overridden certain parts of the library, of course.)

This is at least the second time this question of filename has come up
though. I'll see if I can do something about posting what I did to get
filename through to the AST. Won't happen right away though, I'm struggling
with cross-compilers at the moment. :-(

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

Yes, that's what I meant by storing an "integer index" to the filename.

John


 

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



More information about the antlr-interest mailing list