Re: Looking for simple C Preprocessor source

"Marko =?ISO-8859-1?Q?M=E4kel=E4?=" <Marko.Makela@HUT.FI>
28 Jun 2002 18:02:38 -0400

          From comp.compilers

Related articles
Looking for simple C Preprocessor source jmensch@home.com (Julian Mensch) (2002-06-20)
Re: Looking for simple C Preprocessor source Marko.Makela@HUT.FI (Marko =?ISO-8859-1?Q?M=E4kel=E4?=) (2002-06-28)
Re: Looking for simple C Preprocessor source remove@matematik.su.se (Hans Aberg) (2002-06-28)
Re: Looking for simple C Preprocessor source nmh@t3x.org (Nils M Holm) (2002-06-28)
Re: Looking for simple C Preprocessor source kratkin@yahoo.com (Niktar Lirik) (2002-06-28)
Re: Looking for simple C Preprocessor source parsersinc@yahoo.com (SLK Parsers) (2002-07-04)
Re: Looking for simple C Preprocessor source dickey@Radix.Net (Thomas Dickey) (2002-07-15)
Looking for simple C Preprocessor source Daniel.Dallmann@tesat.de (Dallmann Daniel \(TE/SM2\)) (2007-03-08)
| List of all articles for this month |

From: "Marko =?ISO-8859-1?Q?M=E4kel=E4?=" <Marko.Makela@HUT.FI>
Newsgroups: comp.compilers
Date: 28 Jun 2002 18:02:38 -0400
Organization: Helsinki University of Technology, CS lab
References: 02-06-066
Keywords: C
Posted-Date: 28 Jun 2002 18:02:38 EDT

If you only need #include, #ifn?def/#else/#endif, #undef and #define
SYMBOL (no macro expansion), then you can easily implement the
preprocessor in flex.


You could have a look at the lexers I've written:
http://www.tcs.hut.fi/maria/src/maria-snapshot.tar.gz, file maria.lex
or marde.lex. (That code also demonstrates how flex and bison can be
combined with C++ and how you can have multiple parsers or lexers, or
feed the lexter from a string instead of a file, questions that have
been asked here every now and then.)


                Marko


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.