Re: Several flex scanners share common rules/definitions?

John Millaway <johnmillaway@yahoo.com>
30 Jun 2004 22:58:38 -0400

          From comp.compilers

Related articles
Several flex scanners share common rules/definitions? markus.cl@gmx.de (2004-06-26)
Re: Several flex scanners share common rules/definitions? cbarron413@adelphia.net (Carl Barron) (2004-06-28)
Re: Several flex scanners share common rules/definitions? snicol@apk.net (Scott Nicol) (2004-06-28)
Re: Several flex scanners share common rules/definitions? haberg@matematik.su.se (Hans Aberg) (2004-06-28)
Re: Several flex scanners share common rules/definitions? clint@0lsen.net (Clint Olsen) (2004-06-30)
Re: Several flex scanners share common rules/definitions? johnmillaway@yahoo.com (John Millaway) (2004-06-30)
Re: Several flex scanners share common rules/definitions? sjohnson@mathworks.com (Steve Johnson) (2004-07-13)
| List of all articles for this month |
From: John Millaway <johnmillaway@yahoo.com>
Newsgroups: comp.compilers
Date: 30 Jun 2004 22:58:38 -0400
Organization: Compilers Central
References: 04-06-102
Keywords: lex
Posted-Date: 30 Jun 2004 22:58:37 EDT

--- Markus Dehmann <markus.cl@gmx.de> wrote:
> I have two scanners that use basically the same regular expressions
> and differ only in a few details. How can I write the two lex files so
> that I don't have to write the common things twice?


Hi Markus, You've two options. You could use a preprocessor, such as `m4' or
a custom script, or you could include both scanners in the same file, but
within different start states.


Post a followup to this message

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