Questions about recursive or multiple instances of parser

olsenc@kodiak.ee.washington.edu (Clint Olsen)
12 Feb 2000 22:44:03 -0500

          From comp.compilers

Related articles
Questions about recursive or multiple instances of parser olsenc@kodiak.ee.washington.edu (2000-02-12)
Re: Questions about recursive or multiple instances of parser rkrayhawk@aol.com (2000-02-17)
Re: Questions about recursive or multiple instances of parser gneuner@dyn.com (2000-02-23)
| List of all articles for this month |
From: olsenc@kodiak.ee.washington.edu (Clint Olsen)
Newsgroups: comp.compilers.tools.pccts,comp.compilers
Date: 12 Feb 2000 22:44:03 -0500
Organization: University of Washington, Seattle, WA
Keywords: parse

Hello:


I have determined that I would like to be able to create a parser
program/library that can handle possibly simultaneous instances of
itself. Based on what I'm reading in the Bison documentation, the
%pure_parser handles that though they don't really mention recursion
or simultaneous instances as an example. It seems to eliminate the
use of global variables to avoid collision in the namespace.


However, the program flex appears to rely on quite a few global
symbols like yyin which defines the input stream to be parsed.
Furthermore, passing arguments to yyparse() requires some
configuration hoops to jump through if you're interested in passing
pointers into the parser to fill up data structures.


Questions:


1) Can pccts 1.33 handle recursive instances of its parser in ANSI C?


2) Can its lexer do the same? I've seen people using flex with antlr, and
      it seems I will have to avoid this to keep from the limitations defined
      above.


If there's something I'm glossing over, please let me know.


Thanks,


-Clint


Post a followup to this message

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