Re: redefinable input() unput(): want old lex/flex de-POSIXed

George Neuner <gneuner2@comcast.net>
Tue, 16 Dec 2008 13:20:19 -0500

          From comp.compilers

Related articles
redefinable input() unput(): want old lex/flex de-POSIXed dougray@cpan.org (Douglas Ray) (2008-12-16)
Re: redefinable input() unput(): want old lex/flex de-POSIXed gneuner2@comcast.net (George Neuner) (2008-12-16)
| List of all articles for this month |
From: George Neuner <gneuner2@comcast.net>
Newsgroups: comp.compilers
Date: Tue, 16 Dec 2008 13:20:19 -0500
Organization: A noiseless patient Spider
References: 08-12-088
Keywords: lex, history, comment
Posted-Date: 18 Dec 2008 16:56:41 EST

On Tue, 16 Dec 2008 00:11:04 +1100, Douglas Ray <dougray@cpan.org>
wrote:


>I'm revisiting a parser from 1991-1993, last compiled on SunOS (BSD,
  pre Solaris).
>
>Where are the patches to Flex to enable redefining input() and
>unput()? Surely someone's done this? Or is there some other LEX
>implementation that escaped POSIX, and will compile on NetBSD
>3.something?


I don't know of any code patches per se, but you can do pretty much
anything you want with input by careful redefinition of the input
macros (YY_INPUT, etc.).


I don't have any examples handy, but I have had occasion to make Flex
parse from memory buffers, sockets and such.


George


[You might want to look at the heirloom tools project at Sourceforge
which claims http://heirloom.sourceforge.net/devtools.html which has a
version of lex apparently derived from AT&T lex via Solaris that uses
INPUT() and UNPUT() -John]


Post a followup to this message

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