Re: Threading parsers???

amanda@intercon.com (Amanda Walker)
Tue, 16 May 1995 17:44:27 GMT

          From comp.compilers

Related articles
Threading parsers??? wjc@raster.Kodak.COM (W. James Colosky) (1995-05-11)
Re: Threading parsers??? amanda@intercon.com (1995-05-16)
| List of all articles for this month |

Newsgroups: comp.lang.c,comp.compilers
From: amanda@intercon.com (Amanda Walker)
Keywords: parse, parallel
Organization: InterCon Systems Corporation, Engineering Dept.
References: 95-05-055
Date: Tue, 16 May 1995 17:44:27 GMT

> [Bison has a pure parser option, but people tell me it doesn't work
> very well. It shouldn't be too hard to hack up the parser and
> lexer skeletons to make them threadable. -John]


It's not too hard to make any reasonable LALR (or for that matter, any
bottom-up) parser multithreaded. However, it involves in effect inverting the
parser skeleton's flow of control (so that data is "written" to the parser as
it comes in instead of "read" as the parser needs it) and making all state
explicit (rather than in local variables). If you understand bottom-up
parsing, it's not a big deal, but if you're used to using yacc or bison as
"black boxes" it may get kind of hairy :).




Amanda Walker
InterCon Systems Corporation
--


Post a followup to this message

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