"wart" isn't lex, comments on new dr

11 Jan 86 02:45:00 GMT

          From comp.compilers

Related articles
"wart" isn't lex, comments on new dr compilers@ima.UUCP (1986-01-11)
| List of all articles for this month |

From: compilers@ima.UUCP
Newsgroups: mod.compilers
Date: 11 Jan 86 02:45:00 GMT
Article-I.D.: ima.136300047
Posted: Fri Jan 10 21:45:00 1986

[from Bennett E. Todd III <harvard!wanginst!decvax!mcnc!ecsvax!bet>]

In an earlier article I stated that wart, a program distributed with the
C-Kermit distribution from Columbia, is essentially a lex. I had gotten
this (mistaken) opinion from looking too briefly at what you feed it. It
is in fact just a finite-state-machine generator. It doesn't include
any regular expression handling. It's still a handy tool to have around,
but it isn't designed for writing a lexical analyzer.

With regard to the new dragon book ("Compilers, principles, techniques,
and tools." by Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman,
Addison-Wesley, 1986, ISBN 0-201-10088-6), I've only had it a few days,
and am only through chapter 3, but here are a few opinions.

I find the explanations substantially clearer than in the first dragon
book; there is more detail and less handwaving, and it is far better
fleshed out with illustrative examples (working C code, lex input, and
like that). This book seems to be more applied; whereas the first dragon
book seemed to leave a noticable gap between the theory presented and
actual implementation, this one has nontrivial examples of the
techniques being described. I think I finally understand how to write a
regex library. I would recommend this book to anyone interested in
writing compilers, or tools of any sort which must read complex input.

So, inasmuch as wart isn't one, and I've finally learned what one is
good for, could any kind soul out there point me at a public-domain
implementation of lex or something equivalent, written in C?


Post a followup to this message

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