# 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
## 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 */
command:
's' var 't'
- { printf ("Variable: '%s'\n", $2); }
+ { printf ("Variable: '%s'\n", $2); }
'v' 'x' 'q'
| 's' var_list 't' 'e'
{ printf ("Varlist: '%s'\n", $2); }
| var ',' var_list
{
char buffer[50];
- strcpy (buffer, $1);
+ strcpy (buffer, $1);
strcat (buffer, ",");
strcat (buffer, $3);
$$ = strdup (buffer);
- }
+ }
;
var_printer: 'v'
int
yylex (void)
-{
+{
char buf[50];
switch (fscanf (yyin, " %1[a-z,]", buf)) {
case 1:
int
main (int argc, char **argv)
-{
+{
yyin = stdin;
if (argc == 2 && !(yyin = fopen (argv[1], "r"))) return 1;
return yyparse ();