Le 14 avr. 2010 à 13:19, Akim Demaille a écrit : > I have installed a first batch of changes in 2.5 and 2.6 to this end. I > think I failed to keep you in CC, please have a look at the archive (it > should appear in > http://lists.gnu.org/archive/html/bison-patches/2010-04/threads.html I guess).
Installed in master and 2.5. From 67f1a2c254e71e15125a1f4f64fae8f68deaa4fd Mon Sep 17 00:00:00 2001 From: Akim Demaille <[email protected]> Date: Tue, 13 Apr 2010 23:09:14 +0200 Subject: [PATCH 06/18] tests: calc: minor refactoring. * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex. --- ChangeLog | 5 +++++ tests/calc.at | 10 +++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 81817c7..86d3f3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-04-13 Akim Demaille <[email protected]> + tests: calc: minor refactoring. + * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex. + +2010-04-13 Akim Demaille <[email protected]> + tests: calc: simplify location management. * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New. (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to diff --git a/tests/calc.at b/tests/calc.at index fddddee..1a3096e 100644 --- a/tests/calc.at +++ b/tests/calc.at @@ -122,19 +122,15 @@ int ])[ } -]AT_LOCATION_IF([ - AT_LOC_FIRST_COLUMN = AT_LOC_LAST_COLUMN; - AT_LOC_FIRST_LINE = AT_LOC_LAST_LINE; -])[ - - /* Skip white space. */ - while ((c = get_char (]AT_LEX_ARGS[)) == ' ' || c == '\t') + /* Skip current token, then white spaces. */ + do { ]AT_LOCATION_IF( [ AT_LOC_FIRST_COLUMN = AT_LOC_LAST_COLUMN; AT_LOC_FIRST_LINE = AT_LOC_LAST_LINE; ])[ } + while ((c = get_char (]AT_LEX_ARGS[)) == ' ' || c == '\t'); /* process numbers */ if (c == '.' || isdigit (c)) -- 1.7.0.5
