X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Faltlex.c;h=52532248fe88df3c0bf6aba7248a2e055c5a712a;hb=4f59e9748a5ba3638324cf2ada80152975eca459;hp=5de195461cc1f424ddec2d0c42eba71a9ca918fe;hpb=817beb07e406ae505fb0b1354d42025a1bfd14ce;p=fw%2Fsdcc diff --git a/src/altlex.c b/src/altlex.c index 5de19546..52532248 100644 --- a/src/altlex.c +++ b/src/altlex.c @@ -47,7 +47,7 @@ extern char *filename; FILE *yyin; -int yylineno; +int mylineno; char *currFname; char *yytext; @@ -292,8 +292,8 @@ handle_line (void) if (line[0] == '\0') error ("Error in number in #line"); /* This is weird but cpp seems to add an extra three to the line no */ - yylineno = atoi (line) - 3; - lineno = yylineno; + mylineno = atoi (line) - 3; + lineno = mylineno; /* Fetch the filename if there is one */ while (c == '\t' || c == ' ') c = GETC (); @@ -325,8 +325,8 @@ static INLINE int check_newline (void) { int c; - yylineno++; - lineno = yylineno; + mylineno++; + lineno = mylineno; /* Skip any leading white space */ c = GETC (); @@ -843,6 +843,7 @@ yylex (void) ENTRY (SIGNED); ENTRY (UNSIGNED); ENTRY (FLOAT); + ENTRY (FIXED16X16); ENTRY (DOUBLE); ENTRY (CONST); ENTRY (VOLATILE); @@ -1042,6 +1043,7 @@ altlex_runtests (void) TEST (altlex_testparse ("enum") == ENUM); TEST (altlex_testparse ("extern") == EXTERN); TEST (altlex_testparse ("float") == FLOAT); + TEST (altlex_testparse ("fixed16x16") == FIXED16X16); TEST (altlex_testparse ("for") == FOR); TEST (altlex_testparse ("goto") == GOTO); TEST (altlex_testparse ("if") == IF);