mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Make EOF token name consistent across Bison versions
The "end of file" name apparently only became a default recently
This commit is contained in:
@@ -1815,7 +1815,7 @@ static int yylex_NORMAL(void)
|
|||||||
return T_NEWLINE;
|
return T_NEWLINE;
|
||||||
|
|
||||||
case EOF:
|
case EOF:
|
||||||
return 0;
|
return T_EOF;
|
||||||
|
|
||||||
/* Handle escapes */
|
/* Handle escapes */
|
||||||
|
|
||||||
@@ -2025,7 +2025,7 @@ static int skipIfBlock(bool toEndc)
|
|||||||
int c = nextChar();
|
int c = nextChar();
|
||||||
|
|
||||||
if (c == EOF) {
|
if (c == EOF) {
|
||||||
token = 0;
|
token = T_EOF;
|
||||||
goto finish;
|
goto finish;
|
||||||
} else if (c == '\\') {
|
} else if (c == '\\') {
|
||||||
/* Unconditionally skip the next char, including line conts */
|
/* Unconditionally skip the next char, including line conts */
|
||||||
@@ -2163,8 +2163,7 @@ restart:
|
|||||||
};
|
};
|
||||||
int token = lexerModeFuncs[lexerState->mode]();
|
int token = lexerModeFuncs[lexerState->mode]();
|
||||||
|
|
||||||
/* Make sure to terminate files with a line feed */
|
if (token == T_EOF) {
|
||||||
if (token == 0) {
|
|
||||||
/* Try to switch to new buffer; if it succeeds, scan again */
|
/* Try to switch to new buffer; if it succeeds, scan again */
|
||||||
dbgPrint("Reached EOF!\n");
|
dbgPrint("Reached EOF!\n");
|
||||||
/* Captures end at their buffer's boundary no matter what */
|
/* Captures end at their buffer's boundary no matter what */
|
||||||
@@ -2172,7 +2171,7 @@ restart:
|
|||||||
if (!yywrap())
|
if (!yywrap())
|
||||||
goto restart;
|
goto restart;
|
||||||
dbgPrint("Reached end of input.");
|
dbgPrint("Reached end of input.");
|
||||||
return 0;
|
return T_EOF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -581,6 +581,8 @@ enum {
|
|||||||
%type <nConstValue> op_hl_ss
|
%type <nConstValue> op_hl_ss
|
||||||
%type <sVal> op_mem_ind
|
%type <sVal> op_mem_ind
|
||||||
%type <assertType> assert_type
|
%type <assertType> assert_type
|
||||||
|
|
||||||
|
%token T_EOF 0 "end of file"
|
||||||
%start asmfile
|
%start asmfile
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
|||||||
Reference in New Issue
Block a user