mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 23:03:04 +00:00
tests: remove useless support of '.' in integers
* tests/calc.at: here. * doc/bison.texi: Avoid uninitialized variables.
This commit is contained in:
@@ -2715,11 +2715,11 @@ operators in @code{yylex}.
|
|||||||
int
|
int
|
||||||
yylex (void)
|
yylex (void)
|
||||||
@{
|
@{
|
||||||
int c;
|
int c = getchar ();
|
||||||
|
|
||||||
/* Ignore white space, get first nonwhite character. */
|
/* Ignore white space, get first nonwhite character. */
|
||||||
while ((c = getchar ()) == ' ' || c == '\t')
|
while (c == ' ' || c == '\t')
|
||||||
continue;
|
c = getchar ();
|
||||||
|
|
||||||
if (c == EOF)
|
if (c == EOF)
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ class CalcLexer(R) : Lexer
|
|||||||
return YYTokenType.EOF;
|
return YYTokenType.EOF;
|
||||||
|
|
||||||
// Numbers.
|
// Numbers.
|
||||||
if (input.front == '.' || input.front.isNumber)
|
if (input.front.isNumber)
|
||||||
{
|
{
|
||||||
import std.conv : parse;
|
import std.conv : parse;
|
||||||
semanticVal_.ival = input.parse!int;
|
semanticVal_.ival = input.parse!int;
|
||||||
@@ -257,8 +257,8 @@ read_integer (]AT_YYLEX_FORMALS[)
|
|||||||
}
|
}
|
||||||
while ((c = get_char (]AT_YYLEX_ARGS[)) == ' ' || c == '\t');
|
while ((c = get_char (]AT_YYLEX_ARGS[)) == ' ' || c == '\t');
|
||||||
|
|
||||||
/* Process numbers */
|
/* Process numbers. */
|
||||||
if (c == '.' || isdigit (c))
|
if (isdigit (c))
|
||||||
{
|
{
|
||||||
unget_char (]AT_YYLEX_PRE_ARGS[ c);
|
unget_char (]AT_YYLEX_PRE_ARGS[ c);
|
||||||
]AT_VAL[.ival = read_integer (]AT_YYLEX_ARGS[);
|
]AT_VAL[.ival = read_integer (]AT_YYLEX_ARGS[);
|
||||||
|
|||||||
Reference in New Issue
Block a user