mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 15:23:02 +00:00
fix hexadecimal token number support.
* src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2009-05-05 Akim Demaille <demaille@gostai.com>
|
||||||
|
|
||||||
|
fix hexadecimal token number support.
|
||||||
|
* src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
|
||||||
|
|
||||||
2009-05-05 Akim Demaille <demaille@gostai.com>
|
2009-05-05 Akim Demaille <demaille@gostai.com>
|
||||||
|
|
||||||
tests: check token numbers.
|
tests: check token numbers.
|
||||||
|
|||||||
@@ -208,12 +208,6 @@ splice (\\[ \f\t\v]*\n)*
|
|||||||
complain_at (*loc, _("invalid directive: %s"), quote (yytext));
|
complain_at (*loc, _("invalid directive: %s"), quote (yytext));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Identifiers may not start with a digit. Yet, don't silently
|
|
||||||
accept "1FOO" as "1 FOO". */
|
|
||||||
{int}{id} {
|
|
||||||
complain_at (*loc, _("invalid identifier: %s"), quote (yytext));
|
|
||||||
}
|
|
||||||
|
|
||||||
"=" return EQUAL;
|
"=" return EQUAL;
|
||||||
"|" return PIPE;
|
"|" return PIPE;
|
||||||
";" return SEMICOLON;
|
";" return SEMICOLON;
|
||||||
@@ -235,6 +229,12 @@ splice (\\[ \f\t\v]*\n)*
|
|||||||
return INT;
|
return INT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Identifiers may not start with a digit. Yet, don't silently
|
||||||
|
accept "1FOO" as "1 FOO". */
|
||||||
|
{int}{id} {
|
||||||
|
complain_at (*loc, _("invalid identifier: %s"), quote (yytext));
|
||||||
|
}
|
||||||
|
|
||||||
/* Characters. We don't check there is only one. */
|
/* Characters. We don't check there is only one. */
|
||||||
"'" STRING_GROW; token_start = loc->start; BEGIN SC_ESCAPED_CHARACTER;
|
"'" STRING_GROW; token_start = loc->start; BEGIN SC_ESCAPED_CHARACTER;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user