help-bison
[Top][All Lists]
Advanced

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

bison 2.7 to bison 3.0.4 update assistance


From: David Barto
Subject: bison 2.7 to bison 3.0.4 update assistance
Date: Mon, 13 Aug 2018 13:30:21 -0700

I’m not a bison/yacc/flex expert. I probably don’t even qualify as a novice.

We have some very (very very) old yacc files that bison 2.7.12 does just fine 
with. When I attempt to use bison-3.0.5 I get the following error.

/Users/barto/UnixEnvironment/CSI/repo5/source/parse/sbxgrammar.y: In function 
'int sbx::yyparse()':
/Users/barto/UnixEnvironment/CSI/repo5/source/parse/sbxgrammar.y:461:7: error: 
'pstate' was not declared in this scope
      { pstate->parsetree = $1; }
       ^~~~~~

Our Yacc file has the following:
#define YYPARSE_PARAM nuthin UNUSED, ParserState *pstate, Q_alloc *heap

And the old bison output the following, which used that YYPARSE_PARAM to 
generate the interface for yyparse that we call.

#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
#else
int yyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int yyparse (void);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */

What do I need to do to get the new bison to generate the interface we need. 
I’ve run duckduckgo until I can’t think of any more options to get guided 
assistance, and I’ve read the email list back issues looking for any guidance 
there.

        David


David Barto
address@hidden

Sometimes, my best code does nothing. Most of the rest of it has bugs.






reply via email to

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