This commit is contained in:
parent
f857751606
commit
aae2e8e05f
168 changed files with 11625 additions and 0 deletions
39
Utils/Parser Generator/SOURCE/yysinput.c
Normal file
39
Utils/Parser Generator/SOURCE/yysinput.c
Normal file
|
@ -0,0 +1,39 @@
|
|||
/************************************************************
|
||||
yysinput.c
|
||||
This file can be freely modified for the generation of
|
||||
custom code.
|
||||
|
||||
Copyright (c) 1999 Bumble-Bee Software Ltd.
|
||||
************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include "lex.h"
|
||||
|
||||
#ifdef YYPROTOTYPE
|
||||
int YYCDECL yyinput(void)
|
||||
#else
|
||||
int YYCDECL yyinput()
|
||||
#endif
|
||||
{
|
||||
int ch;
|
||||
if (yyunputindex > 0) {
|
||||
ch = yyunputbufptr[--yyunputindex];
|
||||
}
|
||||
else {
|
||||
ch = yygetchar();
|
||||
}
|
||||
if (ch == '\n') {
|
||||
yylineno++;
|
||||
}
|
||||
|
||||
#ifdef YYDEBUG
|
||||
if (yydebug || yylexdebug) {
|
||||
yylexdebugoutput("input: \'");
|
||||
yydebugoutput(ch);
|
||||
yylexdebugoutput("\'\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
return ch;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue