|bison's yyparse() several times email@example.com (1994-05-19)|
|Re: bison's yyparse() several times Wilfred.Hansen@cs.cmu.edu (1994-05-20)|
|Re: bison's yyparse() several times firstname.lastname@example.org (1994-05-30)|
|Organization:||Carnegie Mellon, Pittsburgh, PA|
|Date:||Fri, 20 May 1994 15:40:33 GMT|
> I'm building an interpreter using GNU Bison (1.19). I have a problem with
> invoking the parser more than once from a program. It always works fine
> the first time I call yyparse(), but it always gets a "parse error" when I
> call it again.
> . . .
> [I'd suspect a smashed pointer somewhere. If you don't need any of Bison's
> unique features, you're probably better off with the smaller and faster
> Berkeley Yacc anyway. -John]
Bison A2.2 from the Andrew Consortium offers an alternate parser and
fully supports reuse of the parser and multiple parsers in the same
Look for it on ftp.andrew.cmu.edu/pub/AUIS/bison. Below is part of
9 April 1994
Bison version A2.2
Wilfred J. Hansen
Dirctor, Andrew Consortium
School of Computer Science
Bison is the GNU parser generator; an alternative to yacc. This directory
contains Bison version A2.2, derived from GNU Bison version 1.22.
It also includes parser generators for C and C++ which have these advantages
No symbol conflicts. Each parser is represented by a single name.
Shared parser code. All grammars use a single instance of the
parser object code.
C++ object. For C++, the generated parser is an object. Utilize it with
GrammarName *grammar = new GrammarName;
License free. The license on the parser code permits effectively
Bison-A2.2 has these advantages over other versions of Bison:
Errors in the grammar do not terminate input; all errors are
found in one pass. A complete example and test case is
the file mess.y in the distribution.
Tokens may now be specified as multiple-character strings:
"<=" can appear where formerly would have to be LESSEQ.
The -n switch produces the parser tables without including
the parser; a project can now use its own parser
and avoid the GNU license for the resulting application.
(The parser and C++ packages do this also, but differently.)
Return to the
Search the comp.compilers archives again.