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) |
From: | Clint Olsen <clint@0lsen.net> |
Newsgroups: | comp.compilers |
Date: | 30 Jun 2004 22:58:28 -0400 |
Organization: | Comcast Online |
References: | 04-06-102 |
Keywords: | lex |
Posted-Date: | 30 Jun 2004 22:58:28 EDT |
On 2004-06-27, 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?
Well, one way would be to put these common rules in a single file and then
include them using a general-purpose macro processor like m4 to snarf the
text into your flex input file. Unless you really have a ton of overlap I
don't see that it's really worth the hassle though.
-Clint
Return to the
comp.compilers page.
Search the
comp.compilers archives again.