tests: remove useless support of '.' in integers

* tests/calc.at: here.
* doc/bison.texi: Avoid uninitialized variables.
This commit is contained in:
Akim Demaille
2019-06-04 08:34:40 +02:00
parent 7f017ae1c9
commit dfef525920
2 changed files with 6 additions and 6 deletions

View File

@@ -2715,11 +2715,11 @@ operators in @code{yylex}.
int
yylex (void)
@{
int c;
int c = getchar ();
/* Ignore white space, get first nonwhite character. */
while ((c = getchar ()) == ' ' || c == '\t')
continue;
while (c == ' ' || c == '\t')
c = getchar ();
if (c == EOF)
return 0;

View File

@@ -168,7 +168,7 @@ class CalcLexer(R) : Lexer
return YYTokenType.EOF;
// Numbers.
if (input.front == '.' || input.front.isNumber)
if (input.front.isNumber)
{
import std.conv : parse;
semanticVal_.ival = input.parse!int;
@@ -257,8 +257,8 @@ read_integer (]AT_YYLEX_FORMALS[)
}
while ((c = get_char (]AT_YYLEX_ARGS[)) == ' ' || c == '\t');
/* Process numbers */
if (c == '.' || isdigit (c))
/* Process numbers. */
if (isdigit (c))
{
unget_char (]AT_YYLEX_PRE_ARGS[ c);
]AT_VAL[.ival = read_integer (]AT_YYLEX_ARGS[);