X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/1a05945136faf21ac5e3a07cfcdee8ee2e8ab6ae..a1373f559a4365b9c03d2bacd6961317d0f8393b:/tests/actions.at diff --git a/tests/actions.at b/tests/actions.at index 8ca79669..3b4d05d5 100644 --- a/tests/actions.at +++ b/tests/actions.at @@ -187,6 +187,7 @@ m4_ifval([$6], [%union { int ival; }]) +AT_LALR1_CC_IF([%define "global_tokens_and_yystype"]) [ %{ ]AT_LALR1_CC_IF([typedef yy::location YYLTYPE; @@ -286,7 +287,7 @@ thing: ; %% /* Alias to ARGV[1]. */ -const char *yysource = 0; +const char *source = 0; static int yylex (]AT_LEX_FORMALS[) @@ -303,12 +304,12 @@ yylex (]AT_LEX_FORMALS[) AT_LOC.last_line = AT_LOC.last_column = AT_LOC.first_line + 9; ])[ - if (yysource[c]) - printf ("sending: '%c'", yysource[c]); + if (source[c]) + printf ("sending: '%c'", source[c]); else printf ("sending: EOF"); printf (" (%d@%d-%d)\n", c, RANGE (]AT_LOC[)); - return yysource[c]; + return source[c]; } ]AT_LALR1_CC_IF( @@ -340,7 +341,7 @@ main (int argc, const char *argv[]) int status; yydebug = !!getenv ("YYDEBUG"); assert (argc == 2); - yysource = argv[1]; + source = argv[1]; status = yyparse (); switch (status) { @@ -373,6 +374,7 @@ line (0@0-29): '(' (0@0-9) thing (1@10-19) ')' (2@20-29) sending: EOF (3@30-39) input (0@29-29): /* Nothing */ input (2@0-29): line (0@0-29) input (0@29-29) +Freeing nterm input (2@0-29) Successful parse. ]]) @@ -391,6 +393,7 @@ line (-1@0-29): '(' (0@0-9) error (@10-19) ')' (2@20-29) sending: EOF (3@30-39) input (0@29-29): /* Nothing */ input (2@0-29): line (-1@0-29) input (0@29-29) +Freeing nterm input (2@0-29) Successful parse. ]])