mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 23:03:04 +00:00
tests: calc: minor refactoring.
* tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
(cherry picked from commit 67f1a2c254)
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2010-04-13 Akim Demaille <demaille@gostai.com>
|
||||||
|
|
||||||
|
tests: calc: minor refactoring.
|
||||||
|
* tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
|
||||||
|
|
||||||
2010-04-13 Akim Demaille <demaille@gostai.com>
|
2010-04-13 Akim Demaille <demaille@gostai.com>
|
||||||
|
|
||||||
tests: calc: simplify location management.
|
tests: calc: simplify location management.
|
||||||
|
|||||||
@@ -122,19 +122,15 @@ int
|
|||||||
])[
|
])[
|
||||||
}
|
}
|
||||||
|
|
||||||
]AT_LOCATION_IF([
|
/* Skip current token, then white spaces. */
|
||||||
AT_LOC_FIRST_COLUMN = AT_LOC_LAST_COLUMN;
|
do
|
||||||
AT_LOC_FIRST_LINE = AT_LOC_LAST_LINE;
|
|
||||||
])[
|
|
||||||
|
|
||||||
/* Skip white space. */
|
|
||||||
while ((c = get_char (]AT_LEX_ARGS[)) == ' ' || c == '\t')
|
|
||||||
{
|
{
|
||||||
]AT_LOCATION_IF(
|
]AT_LOCATION_IF(
|
||||||
[ AT_LOC_FIRST_COLUMN = AT_LOC_LAST_COLUMN;
|
[ AT_LOC_FIRST_COLUMN = AT_LOC_LAST_COLUMN;
|
||||||
AT_LOC_FIRST_LINE = AT_LOC_LAST_LINE;
|
AT_LOC_FIRST_LINE = AT_LOC_LAST_LINE;
|
||||||
])[
|
])[
|
||||||
}
|
}
|
||||||
|
while ((c = get_char (]AT_LEX_ARGS[)) == ' ' || c == '\t');
|
||||||
|
|
||||||
/* process numbers */
|
/* process numbers */
|
||||||
if (c == '.' || isdigit (c))
|
if (c == '.' || isdigit (c))
|
||||||
|
|||||||
Reference in New Issue
Block a user