[antlr-interest] #include handling - newbie question

Bill Clark ursatz at yahoo.com
Wed Jul 14 09:47:16 PDT 2004


Hello,

I'm looking for tips on the simplest way to handle #include 
directives in a file to be parsed by ANTLR. I've seen the advice 
that it's not a problem that ANTLR is well-suited to solve, but I'm 
not sure what's the best way to go about this. I can easily write a 
preprocessor that just inserts the contents of the included file in 
the stream that's handed to the lexer, but then I don't see a good 
way to provide line numbers/filenames in error messages. 

It seems like there ought to be a simple way to deal with this 
general problem; am I missing it?

Thanks,
Bill





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

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



More information about the antlr-interest mailing list