[antlr-interest] Re: thank you sir
Terence Parr
parrt at cs.usfca.edu
Sun Oct 23 13:05:29 PDT 2005
On Oct 23, 2005, at 10:31 AM, Desai Nishitkumar Ashokkumar wrote:
> Hello sir,
> After running preprocessor manually, preprocessod code
> is different (not in semantic but syntatic) from original code. And
> if I convert this preprocessod code to c++ code (without classes,
> only compatible to g++) such that it is compile by g++ compiler
> then this translated code is also without any macros (preprocessor
> statement) but that I dont want. I only want to do is making C code
> compile by g++ compiler. And this I want to do automatically and
> dont want to change unnecessary codes.
Hi. This is a standard problem. Preprocessors can render the output
messy, but w/o using preproc, the input is often not valid C code.
> If I manually first do preprocessing then I think it ll not
> fulfilled my goal.
> Actually I want to make linux kernel compilable by g++. If I
> manually apply preprocessor on that and then translate it to c++
> then translated code ll be very big. bcz kernel has lots of macros
> used.
C++ is C so I'm not sure you have a problem with anything except the
io libraries and such; still the Clib should still work with C++ right?
Ter
More information about the antlr-interest
mailing list