aboutsummaryrefslogtreecommitdiff
path: root/tool/lempar.c
diff options
context:
space:
mode:
Diffstat (limited to 'tool/lempar.c')
-rw-r--r--tool/lempar.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/tool/lempar.c b/tool/lempar.c
index 061331f67..f5fafd4c2 100644
--- a/tool/lempar.c
+++ b/tool/lempar.c
@@ -273,7 +273,12 @@ void *ParseAlloc(void *(*mallocProc)(size_t)){
** "yymajor" is the symbol code, and "yypminor" is a pointer to
** the value.
*/
-static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){
+static void yy_destructor(
+ yyParser *yypParser, /* The parser */
+ YYCODETYPE yymajor, /* Type code for object to destroy */
+ YYMINORTYPE *yypminor /* The object to be destroyed */
+){
+ ParseARG_FETCH;
switch( yymajor ){
/* Here is inserted the actions which take place when a
** terminal or non-terminal is destroyed. This can happen
@@ -311,7 +316,7 @@ static int yy_pop_parser_stack(yyParser *pParser){
}
#endif
yymajor = yytos->major;
- yy_destructor( yymajor, &yytos->minor);
+ yy_destructor(pParser, yymajor, &yytos->minor);
pParser->yyidx--;
return yymajor;
}
@@ -758,7 +763,7 @@ void Parse(
yyTracePrompt,yyTokenName[yymajor]);
}
#endif
- yy_destructor(yymajor,&yyminorunion);
+ yy_destructor(yypParser, yymajor,&yyminorunion);
yymajor = YYNOCODE;
}else{
while(
@@ -771,7 +776,7 @@ void Parse(
yy_pop_parser_stack(yypParser);
}
if( yypParser->yyidx < 0 || yymajor==0 ){
- yy_destructor(yymajor,&yyminorunion);
+ yy_destructor(yypParser,yymajor,&yyminorunion);
yy_parse_failed(yypParser);
yymajor = YYNOCODE;
}else if( yymx!=YYERRORSYMBOL ){
@@ -796,7 +801,7 @@ void Parse(
yy_syntax_error(yypParser,yymajor,yyminorunion);
}
yypParser->yyerrcnt = 3;
- yy_destructor(yymajor,&yyminorunion);
+ yy_destructor(yypParser,yymajor,&yyminorunion);
if( yyendofinput ){
yy_parse_failed(yypParser);
}