Re: is lex useful?

Stephen Lindholm <72510.2757@CompuServe.COM>
27 Jun 1996 11:39:00 -0400

          From comp.compilers

Related articles
[10 earlier articles]
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)
Re: is lex useful? bart@time.cirl.uoregon.edu (1996-06-30)
Re: is lex useful? Robert.Corbett@Eng.Sun.COM (1996-06-30)
Re: is lex useful? leichter@smarts.com (1996-06-30)
Re: is lex useful? trd@murlibobo.cs.mu.OZ.AU (1996-06-30)
Re: is lex useful? WStreett@shell.monmouth.com (1996-06-30)
[6 later articles]
| List of all articles for this month |
From: Stephen Lindholm <72510.2757@CompuServe.COM>
Newsgroups: comp.compilers
Date: 27 Jun 1996 11:39:00 -0400
Organization: CompuServe, Inc. (1-800-689-0736)
References: 96-06-094
Keywords: lex, comment

As to whether flex or hand-coded scanners are better, the authors
of _lex & yacc_ claim to have reported much faster resorts, as do
the manuals for flex, on the basis that flex doesn't suffer from
having more patterns unless back-tracking takes place. The flex
manuals give a great example with `wc' clones.


Along with the additional readability, I don't see why anyone
wouldn't use flex, aside from really bizzare syntax requirements
in a particular application. In the aforementioned book, another
of the authors noted that Fortran 77 was too bizzare for flex.
[Yup, that's what I said. Fortran needs a multi-pass lexer to correctly
recognize that REAL*4HELLO doesn't contain the string constant 'ELLO'. -John]
--


Post a followup to this message

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