[antlr-interest] How to deal with languages with preprocessors?

Chuck Siska chuck.siska at nb.conexant.com
Thu Apr 4 15:20:52 PST 2002


michael --

deal with preprocessor directives by first running the source
through the preprocessor -- then include in your parsing any
line information added by the preprocessor.  best not re-invent
too many wheels at a time.  good luck.

-- chuck

micheal_jor wrote:
> 
> Any ideas please?. How to deal with the preprocessor directives in
> C/C++ and C#.
> 
> Is this handled in the Lexer or in the Parser. Any [simple-ish or
> clear] examples please?...
> 
> Micheal

-- 
                                           |\_/\_.-'""``:-._       
What is life without looking for           . . `; -._      )-;-,_`)
the next cute little bug to play with?     v_,-    _  ),(,.\  ``-' 
                                          _.- _.,-_/ /  ((.'       
-- chuck.siska at conexant.com  `<}:..     ((,.-'   ((,/

 

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



More information about the antlr-interest mailing list