[antlr-interest] ANTLR Examples StdCParser.g

David Wigg wiggjd at sbu.ac.uk
Fri Nov 9 05:31:01 PST 2001


I am trying to convert the Java version of the StdCParser in the
examples folder to run under C++ (only) (if successful, I will make this
available to the ANTLR community).

Where necessary, I am converting Java modules to C++.

I have done CToken and LineObject.

I am now wondering if I actually need PreprocessorInfoChannel. There is
a hint in main.java that it might only be needed for GnuParser.g. 

If this is so, can I delete all references to it in the C++ version?
(since I am only converting for running under C++)

If I do need it in the C++ version please could someone let me know what
it does in general terms?

On second thoughts I am now wondering whether the current Java version
of the StdCParser parses raw C++ source code (and therefore includes a
pre-processing phase?) or whether it parses pre-processed .i files?
(which is what we normally do with ANTLR 1.33).

If it does include a preprocessing phase, where is the code for this?

On the other hand I would really prefer to parse pre-processed code
(which I mentioned above, is what we do now with 1.33) and then I
wouldn't need a pre-processing phase.

Thanks for your help.

David
Research Fellow
South Bank University
London, UK.

 

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



More information about the antlr-interest mailing list