# Executing Actions. -*- Autotest -*-
-# Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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
# action.
AT_DATA_GRAMMAR([[input.y]],
-[[%{
+[[%error-verbose
+%debug
+%{
# include <stdio.h>
# include <stdlib.h>
static void yyerror (const char *msg);
static int yylex (void);
-# define YYDEBUG 1
-# define YYERROR_VERBOSE 1
%}
%%
exp: { putchar ('0'); }
AT_SETUP([Exotic Dollars])
AT_DATA_GRAMMAR([[input.y]],
-[[%{
+[[%error-verbose
+%debug
+%{
# include <stdio.h>
# include <stdlib.h>
static void yyerror (const char *msg);
static int yylex (void);
-# define YYDEBUG 1
-# define YYERROR_VERBOSE 1
+# define USE(Var)
%}
%union
exp: a_1 a_2 { $<val>$ = 3; } { $<val>$ = $<val>3 + 1; } a_5
sum_of_the_five_previous_values
{
+ USE (($1, $2, $<foo>3, $<foo>4, $5));
printf ("%d\n", $6);
}
;
}
]])
-AT_CHECK([bison -d -v -o input.c input.y])
+AT_CHECK([bison -d -v -o input.c input.y], 0)
AT_COMPILE([input])
AT_PARSER_CHECK([./input], 0,
[[15
{
int ival;
}])
+AT_LALR1_CC_IF([%define "global_tokens_and_yystype"])
[
%{
]AT_LALR1_CC_IF([typedef yy::location YYLTYPE;