X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/9280d3ef893b90b36c89fa7737512f2d640e41d9..c97011bfc1cabd3f7aa8e263f83d9e8a18a262bf:/tests/calc.at?ds=sidebyside diff --git a/tests/calc.at b/tests/calc.at index 3b2e1378..8875f9cd 100644 --- a/tests/calc.at +++ b/tests/calc.at @@ -67,30 +67,17 @@ typedef int value_t; %} -/* Exercise M4 quoting: '@:>@@:>@', 0. */ - -/* Also exercise %union. */ +/* Exercise %union. */ %union { - value_t ival; /* A comment to exercise an old bug. */ + value_t ival; }; -/* Exercise post-prologue dependency to %union. */ -%{ -static void id (YYSTYPE *lval); - -/* Exercise quotes in declarations. */ -char quote[] = "@:>@@:>@,"; -%} - /* Bison Declarations */ %token CALC_EOF 0 "end of file" %token NUM "number" %type exp -/* Exercise quotes in strings. */ -%token FAKE "fake @>:@@>:@," - %nonassoc '=' /* comparison */ %left '-' '+' %left '*' '/' @@ -107,15 +94,10 @@ input: ; line: - '\n' -| exp '\n' - { - /* Exercise quotes in braces. */ - char tmp[] = "@>:@@:>@,"; - } + '\n' {} +| exp '\n' {} ; -/* Exercise M4 quoting: '@:>@@:>@', 1. */ exp: NUM { $$ = $1; } | exp '=' exp @@ -137,7 +119,6 @@ exp: /* The input. */ FILE *yyin; -/* Exercise M4 quoting: '@:>@@:>@', 2. */ static void yyerror (const char *s) { @@ -259,11 +240,6 @@ power (int base, int exponent) return res; } -void -id (YYSTYPE* lval) -{ -} - int main (int argc, const char **argv) { @@ -314,7 +290,7 @@ m4_define([_AT_CHECK_CALC], [AT_DATA([[input]], [[$2 ]]) -AT_CHECK([./calc input], 0, [], [stderr])dnl +AT_PARSER_CHECK([./calc input], 0, [], [stderr])dnl AT_CHECK([wc -l