Related articles |
---|
AT&T lex port jbrink@chat.carleton.ca (2000-10-19) |
Re: AT&T lex port toor@y1.jdyson.net (2000-10-22) |
Re: AT&T lex port broeker@physik.rwth-aachen.de (Hans-Bernhard Broeker) (2000-10-22) |
Re: AT&T lex port paule@martex.gen.oh.us (Paul Evans) (2000-10-23) |
Re: AT&T lex port paule@martex.gen.oh.us (Paul Evans) (2000-10-26) |
Re: AT&T lex port g.douglas@readytext.co.uk (Graham Douglas) (2001-01-09) |
From: | Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> |
Newsgroups: | comp.compilers |
Date: | 22 Oct 2000 01:21:22 -0400 |
Organization: | Aachen University of Technology (RWTH) |
References: | 00-10-145 |
Keywords: | lex |
Jason Brink <jbrink@chat.carleton.ca> wrote:
> Does anyone know of a port of AT&T lex to Windows NT/2000 or Linux?
Windows: maybe MKS's lex is AT&T. Go ask them.
[I'm pretty sure it's not. -John]
Linux: almost certainly doesn't exist.
> I've tried using flex on some of our lexers, and then compiling the
> generated code, and there are lots of problems.
I did a similar thing, very recently, regarding the now open-sourced
tool 'cscope', which also assumed an AT&T lex (it comes from the same
place on the map, after all :-). We had found that flex in '-l' mode
could handle just about all of the problem quite successfully, with
the only drawback being that the resulting scanner was rather slow
(factor of 6 slower than lex, on the same hardware).
The only things that 'flex' really fails to do, in my limited experience,
are:
1) no support for 'yylineno'
2) no yyless() and yymore() calls allowed in the same action
Point 1) is an undocumented feature anyway, it seems, so no sane
scanner should rely on it.
I managed to squish this performance problem by seriously reworking
the scanner source.
So: if all else fails, you can answer me by mail, or post the details
to this newsgroup, and I'll see what I can do.
--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Return to the
comp.compilers page.
Search the
comp.compilers archives again.