Related articles |
---|
[5 earlier articles] |
Re: is lex useful? Scott.Nicol@infoadvan.com (1996-06-24) |
Re: is lex useful? kanze@lts.sel.alcatel.de (1996-06-24) |
Re: is lex useful? bos@serpentine.com (1996-06-26) |
Re: is lex useful? dhami@mdd.comm.mot.com (1996-06-26) |
Re: is lex useful? stefan.monnier@lia.di.epfl.ch (Stefan Monnier) (1996-06-26) |
Re: is lex useful? raph@kiwi.cs.berkeley.edu (1996-06-26) |
Re: is lex useful? rgreen@barach.bbn.com (1996-06-26) |
Re: is lex useful? leichter@smarts.com (Jerry Leichter) (1996-06-27) |
Re: is lex useful? scooter@mccabe.com (Scott Stanchfield) (1996-06-27) |
Re: is lex useful? Scott.Nicol@infoadvan.com (1996-06-27) |
Re: is lex useful? Scott.Nicol@infoadvan.com (1996-06-27) |
Re: is lex useful? 72510.2757@CompuServe.COM (Stephen Lindholm) (1996-06-27) |
Re: is lex useful? kanze@lts.sel.alcatel.de (1996-06-27) |
[11 later articles] |
From: | rgreen@barach.bbn.com (Bob Green) |
Newsgroups: | comp.compilers |
Date: | 26 Jun 1996 11:42:29 -0400 |
Organization: | BBN ToolWorks group |
References: | 96-06-101 |
Keywords: | lex |
If you are tempted to choose a hand-code scanner over lex or flex you owe
it to yourself to look at a very elegant little tool called re2c available
at
ftp://csg.uwaterloo.ca/pub/peter/re2c.0.5.tar.gz
re2c is elegant in that the only thing it does is emit the needed scanner
logic as a set of labeled states and goto statements connecting them into a
finite-state machine. There is no overhead from an assumed runtime library
and it is trivial to embed several special purpose lexers in a C or C++
program. The generated scanner is directly executed rather than interpreted.
Most application programs have lots of little lexical analysis tasks like
parsing command line arguments or filename components out of paths which
might benefit from using re2c.
Beside its design just strikes my fancy.
-Bob Green
BBN Systems & Technologies
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.