This commit is contained in:
parent
f857751606
commit
aae2e8e05f
168 changed files with 11625 additions and 0 deletions
40
Utils/Parser Generator/SOURCE/yyccdeci.cpp
Normal file
40
Utils/Parser Generator/SOURCE/yyccdeci.cpp
Normal file
|
@ -0,0 +1,40 @@
|
|||
/************************************************************
|
||||
yyccdeci.cpp
|
||||
This file can be freely modified for the generation of
|
||||
custom code.
|
||||
|
||||
Copyright (c) 1999 Bumble-Bee Software Ltd.
|
||||
************************************************************/
|
||||
|
||||
#include <string.h>
|
||||
#include "cyacc.h"
|
||||
|
||||
// the Visual C++ v1.52 compiler generates an error in NT if this isn't present!
|
||||
#ifdef _MSC_VER
|
||||
#if defined(M_I86HM) && defined(NDEBUG)
|
||||
#pragma function(memcpy)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void yycparser::yydestructclearin()
|
||||
{
|
||||
if (yylookahead) {
|
||||
// clean up any token attributes
|
||||
if (yyctokendestptr != NULL) {
|
||||
const yyctokendest_t YYNEARFAR* tokendestptr = yyctokendestptr;
|
||||
while (tokendestptr->token != 0) {
|
||||
if (tokendestptr->token == yychar) {
|
||||
// user actions in here
|
||||
memcpy(yyvalptr, yylvalptr, yyattribute_size);
|
||||
|
||||
yyaction(tokendestptr->action);
|
||||
|
||||
memcpy(yylvalptr, yyvalptr, yyattribute_size);
|
||||
break;
|
||||
}
|
||||
tokendestptr++;
|
||||
}
|
||||
}
|
||||
yylookahead = 0;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue