Re: bison's yyparse() several times

Wilfred.Hansen@cs.cmu.edu
Fri, 20 May 1994 15:40:33 GMT

          From comp.compilers

Related articles
bison's yyparse() several times hanss@stud.cs.uit.no (1994-05-19)
Re: bison's yyparse() several times Wilfred.Hansen@cs.cmu.edu (1994-05-20)
Re: bison's yyparse() several times hanss@stud.cs.uit.no (1994-05-30)
| List of all articles for this month |
Newsgroups: comp.compilers
From: Wilfred.Hansen@cs.cmu.edu
Keywords: parse
Organization: Carnegie Mellon, Pittsburgh, PA
References: 94-05-074
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
application.


Look for it on ftp.andrew.cmu.edu/pub/AUIS/bison. Below is part of
the README.


Fred Hansen




9 April 1994


Bison version A2.2
Wilfred J. Hansen
Dirctor, Andrew Consortium
School of Computer Science
Carnegie Mellon
wjh+@cmu.edu


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
                unhindered use.


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.)
--


Post a followup to this message

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