This commit is contained in:
parent
f857751606
commit
aae2e8e05f
168 changed files with 11625 additions and 0 deletions
30
Utils/Parser Generator/SOURCE/yymless.c
Normal file
30
Utils/Parser Generator/SOURCE/yymless.c
Normal file
|
@ -0,0 +1,30 @@
|
|||
/************************************************************
|
||||
yymless.c
|
||||
This file can be freely modified for the generation of
|
||||
custom code.
|
||||
|
||||
Copyright (c) 1999 Bumble-Bee Software Ltd.
|
||||
************************************************************/
|
||||
|
||||
#include "mlex.h"
|
||||
|
||||
#ifdef YYPROTOTYPE
|
||||
void YYCDECL yymless(yymlex_t YYFAR *yy, int length)
|
||||
#else
|
||||
void YYCDECL yymless(yy, length)
|
||||
yymlex_t YYFAR *yy;
|
||||
int length;
|
||||
#endif
|
||||
{
|
||||
yyassert(yy != NULL);
|
||||
yyassert(length >= 0 && length <= yy->yymleng);
|
||||
while (yy->yymleng > length) {
|
||||
(*yy->yymunput)(yy, (unsigned char) yy->yymtext[--yy->yymleng]);
|
||||
}
|
||||
if (yy->yymleng > 0) {
|
||||
yy->yymeol = (unsigned char) (yy->yymtext[yy->yymleng - 1] == '\n');
|
||||
}
|
||||
else {
|
||||
yy->yymeol = yy->yymoldeol;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue