X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/94556574b56eed6d42395bf8264f1ee9eec08eac..abcd36ca1b658b108fc926f19cb9e45fb41daa65:/tests/actions.at diff --git a/tests/actions.at b/tests/actions.at index 2da52941..8be86f07 100644 --- a/tests/actions.at +++ b/tests/actions.at @@ -29,7 +29,7 @@ AT_SETUP([Mid-rule actions]) # action. AT_DATA_GRAMMAR([[input.y]], -[[%error-verbose +[[%define parse.error verbose %debug %{ # include @@ -93,7 +93,7 @@ AT_CLEANUP AT_SETUP([Exotic Dollars]) AT_DATA_GRAMMAR([[input.y]], -[[%error-verbose +[[%define parse.error verbose %debug %{ # include @@ -298,11 +298,11 @@ input: printf ("input (%d@%d-%d): /* Nothing */\n", $$, RANGE (@$)); } | line input /* Right recursive to load the stack so that popping at - END can be exercised. */ + END can be exercised. */ { $$ = 2; printf ("input (%d@%d-%d): line (%d@%d-%d) input (%d@%d-%d)\n", - $$, RANGE (@$), $1, RANGE (@1), $2, RANGE (@2)); + $$, RANGE (@$), $1, RANGE (@1), $2, RANGE (@2)); } ; @@ -345,7 +345,7 @@ thing: ; %% /* Alias to ARGV[1]. */ -const char *source = 0; +const char *source = YY_NULL; static int yylex (]AT_LEX_FORMALS[) @@ -603,7 +603,7 @@ m4_define([AT_CHECK_PRINTER_AND_DESTRUCTOR], $3 _AT_CHECK_PRINTER_AND_DESTRUCTOR($[1], $[2], $[3], $[4], -[%error-verbose +[%define parse.error verbose %debug %verbose %locations @@ -634,7 +634,7 @@ AT_CHECK_PRINTER_AND_DESTRUCTOR([%glr-parser], [with union]) AT_SETUP([Default tagless %printer and %destructor]) AT_DATA_GRAMMAR([[input.y]], -[[%error-verbose +[[%define parse.error verbose %debug %locations %initial-action { @@ -752,7 +752,7 @@ AT_CLEANUP AT_SETUP([Default tagged and per-type %printer and %destructor]) AT_DATA_GRAMMAR([[input.y]], -[[%error-verbose +[[%define parse.error verbose %debug %{ @@ -889,14 +889,14 @@ AT_CLEANUP AT_SETUP([Default %printer and %destructor for user-defined end token]) # _AT_CHECK_DEFAULT_PRINTER_AND_DESTRUCTOR_FOR_END_TOKEN(TYPED) -# ----------------------------------------------------------------------------- +# ------------------------------------------------------------- m4_define([_AT_CHECK_DEFAULT_PRINTER_AND_DESTRUCTOR_FOR_END_TOKEN], [m4_if($1, 0, [m4_pushdef([kind], []) m4_pushdef([not_kind], [*])], [m4_pushdef([kind], [*]) m4_pushdef([not_kind], [])]) AT_DATA_GRAMMAR([[input]]$1[[.y]], -[[%error-verbose +[[%define parse.error verbose %debug %locations %initial-action { @@ -1363,37 +1363,37 @@ AT_DATA([input.y], start: test2 test1 test0 testc; test2 -: 'a' { semi; /* TEST:N:2 */ } -| 'b' { if (0) {no_semi} /* TEST:N:2 */ } -| 'c' { if (0) {semi;} /* TEST:N:2 */ } -| 'd' { semi; no_semi /* TEST:Y:2 */ } -| 'e' { semi(); no_semi() /* TEST:Y:2 */ } -| 'f' { semi[]; no_semi[] /* TEST:Y:2 */ } -| 'g' { semi++; no_semi++ /* TEST:Y:2 */ } -| 'h' { {no_semi} no_semi /* TEST:Y:2 */ } -| 'i' { {semi;} no_semi /* TEST:Y:2 */ } +: 'a' { semi; /* TEST:N:2 */ } +| 'b' { if (0) {no_semi} /* TEST:N:2 */ } +| 'c' { if (0) {semi;} /* TEST:N:2 */ } +| 'd' { semi; no_semi /* TEST:Y:2 */ } +| 'e' { semi(); no_semi() /* TEST:Y:2 */ } +| 'f' { semi[]; no_semi[] /* TEST:Y:2 */ } +| 'g' { semi++; no_semi++ /* TEST:Y:2 */ } +| 'h' { {no_semi} no_semi /* TEST:Y:2 */ } +| 'i' { {semi;} no_semi /* TEST:Y:2 */ } ; test1 - : 'a' { semi; // TEST:N:1 ; -} | 'b' { if (0) {no_semi} // TEST:N:1 ; -} | 'c' { if (0) {semi;} // TEST:N:1 ; -} | 'd' { semi; no_semi // TEST:Y:1 ; -} | 'e' { semi(); no_semi() // TEST:Y:1 ; -} | 'f' { semi[]; no_semi[] // TEST:Y:1 ; -} | 'g' { semi++; no_semi++ // TEST:Y:1 ; -} | 'h' { {no_semi} no_semi // TEST:Y:1 ; -} | 'i' { {semi;} no_semi // TEST:Y:1 ; + : 'a' { semi; // TEST:N:1 ; +} | 'b' { if (0) {no_semi} // TEST:N:1 ; +} | 'c' { if (0) {semi;} // TEST:N:1 ; +} | 'd' { semi; no_semi // TEST:Y:1 ; +} | 'e' { semi(); no_semi() // TEST:Y:1 ; +} | 'f' { semi[]; no_semi[] // TEST:Y:1 ; +} | 'g' { semi++; no_semi++ // TEST:Y:1 ; +} | 'h' { {no_semi} no_semi // TEST:Y:1 ; +} | 'i' { {semi;} no_semi // TEST:Y:1 ; } ; test0 - : 'a' { semi; // TEST:N:1 {} -} | 'b' { if (0) {no_semi} // TEST:N:1 {} -} | 'c' { if (0) {semi;} // TEST:N:1 {} -} | 'd' { semi; no_semi // TEST:Y:1 {} -} | 'e' { semi(); no_semi() // TEST:Y:1 {} -} | 'f' { semi[]; no_semi[] // TEST:Y:1 {} -} | 'g' { semi++; no_semi++ // TEST:Y:1 {} -} | 'h' { {no_semi} no_semi // TEST:Y:1 {} -} | 'i' { {semi;} no_semi // TEST:Y:1 {} + : 'a' { semi; // TEST:N:1 {} +} | 'b' { if (0) {no_semi} // TEST:N:1 {} +} | 'c' { if (0) {semi;} // TEST:N:1 {} +} | 'd' { semi; no_semi // TEST:Y:1 {} +} | 'e' { semi(); no_semi() // TEST:Y:1 {} +} | 'f' { semi[]; no_semi[] // TEST:Y:1 {} +} | 'g' { semi++; no_semi++ // TEST:Y:1 {} +} | 'h' { {no_semi} no_semi // TEST:Y:1 {} +} | 'i' { {semi;} no_semi // TEST:Y:1 {} } ; testc @@ -1586,7 +1586,6 @@ AT_COMPILE([[input]]) AT_PARSER_CHECK([[./input]], [[0]], [[a: 123 a: 456 -a: 789 ]]) AT_CLEANUP