[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling an INCLUDE directive.



Hi Will,

I think the only way to maintain the file/line information would be to
modify SableCC, so that the generated Parser.java class privides
overridable hooks to do this.

If you are interested in helping me adding this feature, give a look at
http://sourceforge.net/projects/sablecc/ and get a SourceForge user ID. 
I am in the process of moving SableCC's development there.  This will
simplify the process of contributing to SableCC.  The CVS repository
already includes a version of SableCC with the following improvements:
(1) support for the "java -jar" option,
(2) support for multiple parser generation, and
(3) hooks for Jakarta-Ant (http://jakarta.apache.org/ant).

I think it would really be great to have an elegant solution to the
#include problem.

Etienne

Will Hartung wrote:
> 
> I was wondering what approach I should take to adding some kind of INCLUDE
> directive. The key thing here is that I'd like to maintain the file/line
> information of the included file if at all possible (versus writing a
> seperate pre-processor and compiling the final file).
> 
> Any hints are appreciated.
> 
> Thanx!
> 
> Will Hartung
> willh@msoft.com

-- 
----------------------------------------------------------------------
Etienne M. Gagnon, M.Sc.                     e-mail: egagnon@j-meg.com
Author of SableCC:                 http://www.sable.mcgill.ca/sablecc/
and SableVM:                                   http://www.sablevm.org/
----------------------------------------------------------------------