This commit is contained in:
parent
f857751606
commit
aae2e8e05f
168 changed files with 11625 additions and 0 deletions
40
Utils/Parser Generator/SOURCE/yymdeci.c
Normal file
40
Utils/Parser Generator/SOURCE/yymdeci.c
Normal file
|
@ -0,0 +1,40 @@
|
|||
/************************************************************
|
||||
yymdeci.c
|
||||
This file can be freely modified for the generation of
|
||||
custom code.
|
||||
|
||||
Copyright (c) 1999 Bumble-Bee Software Ltd.
|
||||
************************************************************/
|
||||
|
||||
#include <string.h>
|
||||
#include "myacc.h"
|
||||
|
||||
#ifdef YYPROTOTYPE
|
||||
void YYCDECL yymdestructclearin(yymparse_t YYFAR *yy)
|
||||
#else
|
||||
void YYCDECL yymdestructclearin(yy)
|
||||
yymparse_t YYFAR *yy;
|
||||
#endif
|
||||
{
|
||||
yyassert(yy != NULL);
|
||||
yyassert(yymisfastparser(yy)); /* make sure it's a fast parser */
|
||||
|
||||
if (yy->yymlookahead) {
|
||||
/* clean up any token attributes */
|
||||
if (yy->yymtokendestptr != NULL) {
|
||||
int index = yy->yymtokendestbase + yy->yymchar;
|
||||
if (index >= 0 && index < yy->yymtokendest_size) {
|
||||
int action = yy->yymtokendestptr[index];
|
||||
if (action != -1) {
|
||||
/* user actions in here */
|
||||
memcpy(yy->yymvalptr, yy->yymlvalptr, yy->yymattribute_size);
|
||||
|
||||
(*yy->yymparseaction)(yy, action);
|
||||
|
||||
memcpy(yy->yymlvalptr, yy->yymvalptr, yy->yymattribute_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
yy->yymlookahead = 0;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue