]> git.saurik.com Git - bison.git/blobdiff - tests/actions.at
* data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
[bison.git] / tests / actions.at
index 7d7109f97dfbad4405faa827d631d49f298c45a8..3b4d05d5cbb387a8c3d5749141006beda112d236 100644 (file)
@@ -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)
     {