%}
+/* Exercise M4 quoting: '@:>@@:>@', 0. */
+
/* Also exercise %union. */
%union
{
/* Exercise post-prologue dependency to %union. */
%{
static void id (YYSTYPE *lval);
+
+/* Exercise quotes in declarations. */
+char quote[] = "@:>@@:>@,";
%}
/* Bison Declarations */
%token <ival> NUM "number"
%type <ival> exp
+/* Exercise quotes in strings. */
+%token "fake @>:@@>:@,"
+
%nonassoc '=' /* comparison */
%left '-' '+'
%left '*' '/'
line:
'\n'
-| exp '\n' {}
+| exp '\n'
+ {
+ /* Exercise quotes in braces. */
+ char tmp[] = "@>:@@:>@,";
+ }
;
+/* Exercise M4 quoting: '@:>@@:>@', 1. */
exp:
NUM { $$ = $1; }
| exp '=' exp
/* The input. */
FILE *yyin;
+/* Exercise M4 quoting: '@:>@@:>@', 2. */
static void
yyerror (const char *s)
{