Re: flex/yacc--many multiple parsers in same program

zucco@world.std.com (Tom Harwood)
19 May 1996 14:28:52 -0400

          From comp.compilers

Related articles
flex/yacc--many multiple parsers in same program cowden@leitess.com (1996-05-13)
Re: flex/yacc--many multiple parsers in same program gclind01@starbase.spd.louisville.edu (1996-05-14)
Re: flex/yacc--many multiple parsers in same program qjackson@mail.direct.ca (1996-05-19)
Re: flex/yacc--many multiple parsers in same program zucco@world.std.com (1996-05-19)
Re: flex/yacc--many multiple parsers in same program vadim@mercury.co.il (1996-05-19)
Re: flex/yacc--many multiple parsers in same program pardo@cs.washington.edu (1996-05-19)
Re: flex/yacc--many multiple parsers in same program jlilley@ix.netcom.com (1996-05-19)
| List of all articles for this month |
From: zucco@world.std.com (Tom Harwood)
Newsgroups: comp.unix.programmer,comp.compilers
Date: 19 May 1996 14:28:52 -0400
Organization: Only on Tuesdays
References: 96-05-089
Keywords: lex, yacc, parallel

cowden@leitess.com (Michael Cowden) writes:
>I'm looking to write a single interpreter that can simultaneously
>parse up to 96 separate programs.


> [The context for a yacc parse isn't all that hairy, so you might be able
> to package it up without too much misery. -John]


Did that once -- as I recall I used byacc as a starting point. I had some
sed scripts that packaged the globals up into structures (that is quite a
bit easier than modifying the byacc output routines), and put a pointer to
the lex state in the parse state struct.


flex was a different story; I just wrote my own lex, partly because
I was parsing strings and didn't need all flex's file handling logic
anyhow. flex global context is medium hairy, I'd say. Regards,
--
Tom Harwood zucco@world.std.com
President and Apprentice DBMS Hacker, Free SQL, Inc.
--


Post a followup to this message

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