Re: why use flex?

colas@aye.inria.fr (Colas Nahaboo)
3 Feb 1999 23:52:42 -0500

          From comp.compilers

Related articles
why use flex? frankhale@worldnet.att.net (Frank Hale) (1999-01-27)
Re: why use flex? irclark@latveria.castledoom.org (1999-01-31)
Re: why use flex? rkrayhawk@aol.com (1999-01-31)
Re: why use flex? tnaran@direct.ca (1999-02-01)
Re: why use flex? colas@aye.inria.fr (1999-02-03)
Re: why use flex? Marko.Makela@HUT.FI (Marko =?ISO-8859-1?Q?M=E4kel=E4?=) (1999-02-03)
Re: why use flex? tnaran@direct.ca (1999-02-05)
Re: why use flex? Theodore.Papadopoulo@sophia.inria.fr (Theodore.Papadopoulo) (1999-02-05)
Re: why use flex? Marko.Makela@HUT.FI (Marko =?ISO-8859-1?Q?M=E4kel=E4?=) (1999-02-10)
Re: why use flex? wvenable_net@iname.com (1999-02-15)
Re: why use flex? dmitrik@my-dejanews.com (Dmitri Katchalov) (1999-02-16)
| List of all articles for this month |
From: colas@aye.inria.fr (Colas Nahaboo)
Newsgroups: comp.compilers
Date: 3 Feb 1999 23:52:42 -0500
Organization: Koala Project, Dyade/Bull
References: 99-01-111
Keywords: lex

Frank Hale <frankhale@worldnet.att.net> writes:
|> Why would someone use flex as opposed to writing there own lexer? I am
|> developing my own scripting language and find it much simpler to
|> create a lexer on my own, that way I can tailor it to my needs.


There is a third way, where you can avoid using a (f)lex-like parser,
which can be slow, and most importantly, difficult to debug, due to
its table-driven nature, but still avoiding to do a parser by hand,
which is error-prone, and can lead you to invent a language with "too
smart" syntaxic rules (TCL...), it is lexical generators building
"if-then-else" code rather than tables. A good example is re2c, open
source by Peter Bumbulis, see:


ftp://csg.uwaterloo.ca/pub/peter


--
Colas Nahaboo, Koala/Dyade/Bull @ INRIA Sophia, http://www.inria.fr/koala/colas


Post a followup to this message

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