Renamed from "Improper handling of embedded actions and $-N in GLR
parsers", work around an Autoconf bug with dollar signs in test names.
# Checking GLR Parsing: Regression Tests -*- Autotest -*-
# Checking GLR Parsing: Regression Tests -*- Autotest -*-
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
## Improper handling of embedded actions and $-N in GLR parsers ##
## ------------------------------------------------------------ ##
## Improper handling of embedded actions and $-N in GLR parsers ##
## ------------------------------------------------------------ ##
-AT_SETUP([Improper handling of embedded actions and $-N in GLR parsers])
+AT_SETUP([Improper handling of embedded actions and dollar(-N) in GLR parsers])
AT_DATA_GRAMMAR([glr-regr2a.y],
[[/* Regression Test: Improper handling of embedded actions and $-N */
AT_DATA_GRAMMAR([glr-regr2a.y],
[[/* Regression Test: Improper handling of embedded actions and $-N */
- { printf ("Variable: '%s'\n", $2); }
+ { printf ("Variable: '%s'\n", $2); }
'v' 'x' 'q'
| 's' var_list 't' 'e'
{ printf ("Varlist: '%s'\n", $2); }
'v' 'x' 'q'
| 's' var_list 't' 'e'
{ printf ("Varlist: '%s'\n", $2); }
| var ',' var_list
{
char buffer[50];
| var ',' var_list
{
char buffer[50];
strcat (buffer, ",");
strcat (buffer, $3);
$$ = strdup (buffer);
strcat (buffer, ",");
strcat (buffer, $3);
$$ = strdup (buffer);
char buf[50];
switch (fscanf (yyin, " %1[a-z,]", buf)) {
case 1:
char buf[50];
switch (fscanf (yyin, " %1[a-z,]", buf)) {
case 1:
int
main (int argc, char **argv)
int
main (int argc, char **argv)
yyin = stdin;
if (argc == 2 && !(yyin = fopen (argv[1], "r"))) return 1;
return yyparse ();
yyin = stdin;
if (argc == 2 && !(yyin = fopen (argv[1], "r"))) return 1;
return yyparse ();