help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bison-1.50: how to parse apostrophe?


From: Akim Demaille
Subject: Re: bison-1.50: how to parse apostrophe?
Date: 13 Oct 2002 20:53:30 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter)

| In LilyPond's parser.yy we have:
| 
|    #define YYPARSE_PARAM my_lily_parser
|    #define YYLEX_PARAM my_lily_parser
| 
|    extern My_lily_parser * current_parser;
| 
|    int
|    yylex (YYSTYPE *s,  void * v)
|    {
|            My_lily_parser      *pars = (My_lily_parser*) v;
|            My_lily_lexer * lex = pars->lexer_;
| 
|            lex->lexval = (void*) s;
|            lex->prepare_for_next_token();
|            return lex->yylex ();
|    }
| 
| Which works with bison <= 1.35, but doesn't with 1.50a.  Has anything
| changed wrt this?  If it doesn't ring a bell, I'll investigate some
| further tomorrow or on Monday.
| 
| Thanks.
| Greetings,
| Jan.
| 
| bison -o out/parser.cc parser.yy
| parser.yy: warning: 2 shift/reduce conflicts
| mv -f parser.yy.tab.c out/parser.cc # bison < 1.30
| mv: cannot stat `parser.yy.tab.c': No such file or directory
| make: [out/parser.cc] Error 1 (ignored)
| rm -f ./out/parser.dep; DEPENDENCIES_OUTPUT="./out/parser.dep ./out/parser.o" 
c++ -c   -DHAVE_CONFIG_H  -Iinclude -I./out -I../flower/include 
-I../flower/./out -I../flower/include -g   
-I/home/fred/usr/pkg/guile-1.7.0/include     -g   
-I/home/fred/usr/pkg/guile-1.7.0/include -Wall  -W -Wmissing-prototypes 
-Wconversion  -o out/parser.o out/parser.cc
| out/parser.cc: In function `void yyreport_parse_error(int, int, yystype)':
| out/parser.cc:1703: `my_lily_parser' undeclared (first use this function)
| out/parser.cc:1703: (Each undeclared identifier is reported only once
| out/parser.cc:1703: for each function it appears in.)
| make: *** [out/parser.o] Error 1
| rm out/parser.cc


Actually what you probably hid is that yyerror is #defined.  This will
be fixed in the forthcoming release.  Thanks!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]