Separating c++ parser
Hi all, I intend to use gcc's C++ parser and the intermediate representation it creates for use in source browsing, etc. I have a few questions regarding this: firstly, is it possible to plug out the parser and intermediate representation code (presumably only in the front-end?) relatively easily? If so, can somebody offer hints on where I could start? I am currently looking into the gcc/cp front-end subdirectory, but clearly, there are a number of dependencies inside the main gcc code as well. The other question is: the build process for gcc is quite hairy - stage1, etc. etc. Since I am not concerned with code generation or optimization at all, I don't think I would need this. How would I begin simplifying the auto* and Makefile.in's to allow building the parser as a stand-alone entity? Thanks in advance for any help or pointers! Ashwin -- Ashwin Bharambe, Ph.D. Candidate, Carnegie Mellon University. Office: 412-268-7555Web: http://www.cs.cmu.edu/~ashu
Re: Separating c++ parser
Hmm. Ok fine, I can live with having to keep all extraneous code lying around. But it seems like there must be a way to: - stop gcc once the cp frontend parses the code and generates the parse tree structure. - disable the stage1,stage2 compilation etc. during the build process? Or, is there something I am still missing? :) Thanks, Ashwin On 9/12/05, Diego Novillo <[EMAIL PROTECTED]> wrote: > On 09/12/05 15:30, Ashwin Bharambe wrote: > > >is it possible to plug out the parser and intermediate representation code > >(presumably only in the front-end?) relatively easily? > > > Not really. Though we have been re-designing the internal architecture > to be more modular, all the components are meant to be used together. > > At most, you could plug your own transformation/analysis inside the > compiler. > -- Ashwin Bharambe, Ph.D. Candidate, Carnegie Mellon University. Office: 412-268-7555Web: http://www.cs.cmu.edu/~ashu