diff --git a/pub/src/xax_lex.lpp b/pub/src/xax_lex.lpp index 23c66844626fe2eee6f0c25fd7862fa4fb7f917e..f41f80813cbe6d99627f07d6bfc7e44e3f11c109 100644 --- a/pub/src/xax_lex.lpp +++ b/pub/src/xax_lex.lpp @@ -133,14 +133,14 @@ e { <<EOF>> { return END; } %% -int xaxparse( void* ); +int xaxparse( PNode* ); boost::shared_ptr<class CNode> user_xaxparse( const char *lin ) { boost::shared_ptr<class CNode> T; int err; xax_scan_string(lin); - err=xaxparse((void*) &T); + err=xaxparse( &T ); xax_delete_buffer(YY_CURRENT_BUFFER); if( err ) throw "lexer/parser error " + triv::strg(err); diff --git a/pub/src/xax_yacc.ypp b/pub/src/xax_yacc.ypp index c839ab24778f9a39e44d0ca9ef68b88e3b17f29b..45b658d6a12670d6bdde423056401b898dfece2b 100644 --- a/pub/src/xax_yacc.ypp +++ b/pub/src/xax_yacc.ypp @@ -17,7 +17,7 @@ #include "expr.hpp" #include "node.hpp" -int xaxerror( const char *s ) +int xaxerror( PNode* T, const char *s ) { throw( string( "invalid expression: " ) + s ); return 1; @@ -35,9 +35,8 @@ struct xaxtype { #define YYSTYPE xaxtype #define YYERROR_VERBOSE 1 -%parse-param{ PNode* T } -int xaxerror(const char*); /* provided by calling code (expr.cpp, ...) */ -int xaxlex(YYSTYPE *xaxlval); /* created by lex.l */ +int xaxerror( PNode* T, const char*); +int xaxlex(YYSTYPE *xaxlval); // created by lex.l #define MONFUNC(op,v1) \ PNode( new CNodeFun(NFunctions::find(op),v1.t ) ) @@ -47,6 +46,7 @@ int xaxlex(YYSTYPE *xaxlval); /* created by lex.l */ PNode( new CNodeFun(NFunctions::find(op),v1.t,v2.t,v3.t) ) %} +%parse-param{ PNode* T } %pure-parser %debug