Re: How can I 'unroll' a YACC generated parser?

"resslere" <resslere@erols.com>
15 Mar 1998 00:24:19 -0500

          From comp.compilers

Related articles
How can I 'unroll' a YACC generated parser? pitchl@tdbank.ca (1998-03-12)
Re: How can I 'unroll' a YACC generated parser? resslere@erols.com (resslere) (1998-03-15)
Re: How can I 'unroll' a YACC generated parser? a010111t@bc.seflin.org (Orlando Llanes) (1998-03-18)
| List of all articles for this month |
From: "resslere" <resslere@erols.com>
Newsgroups: comp.compilers
Date: 15 Mar 1998 00:24:19 -0500
Organization: Ressler Family
References: 98-03-106
Keywords: yacc, parallel

I think it would not be too hard to modify the skeleton of bison to do
this.


Alternately, you might think about running a looping parser in a
separate thread drawing input from a queue. Then an "API" call would
just put tokens in the queue.


Cheers,
Gene


pitchl@tdbank.ca:
> What I need to do is 'unroll' a Yacc generated parser, so that the
> entrypoint of the parser is where the next token is provided. This
> would allow the API caller to pass a single token to the parser with
> each invocation.
[I'd think it's mostly a matter of moving all the stack temporaries into
statics, then reorganizing the parser so that it returns in the places
where now it calls yylex(). I do agree that on systems that support
threads, it's probably a lot easier to use a thread than to turn the
parser inside out. -John]




--


Post a followup to this message

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