]> git.saurik.com Git - bison.git/blobdiff - tests/actions.at
(MUSCLE_TAB_H_): Was misspelled as MUSCLE_TAB_H_.
[bison.git] / tests / actions.at
index 5331bfc61cb14b85a3e38468663eaf796d39898d..e6e23866d7a052d43de0d30a824d92c28a5a80ae 100644 (file)
@@ -72,9 +72,9 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison input.y -d -v -o input.c])
-AT_CHECK([$CC $CFLAGS $CPPFLAGS input.c -o input], 0, [], [ignore])
-AT_CHECK([./input], 0,
+AT_CHECK([bison -d -v -o input.c input.y])
+AT_COMPILE([input])
+AT_PARSER_CHECK([./input], 0,
 [[0123456789
 ]])
 
@@ -103,18 +103,18 @@ AT_DATA([[input.y]],
   int val;
 };
 
-%type <val> a_1 a_2 a_4 a_5
+%type <val> a_1 a_2 a_5
             sum_of_the_five_previous_values
 
 %%
-exp: a_1 a_2 { $<val>$ = 3; } a_4 a_5 sum_of_the_five_previous_values
+exp: a_1 a_2 { $<val>$ = 3; } { $<val>$ = $<val>3 + 1; } a_5
+     sum_of_the_five_previous_values
     {
        printf ("%d\n", $6);
     }
 ;
 a_1: { $$ = 1; };
 a_2: { $$ = 2; };
-a_4: { $$ = 4; };
 a_5: { $$ = 5; };
 
 sum_of_the_five_previous_values:
@@ -143,9 +143,9 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison input.y -d -v -o input.c])
-AT_CHECK([$CC $CFLAGS $CPPFLAGS input.c -o input], 0, [], [ignore])
-AT_CHECK([./input], 0,
+AT_CHECK([bison -d -v -o input.c input.y])
+AT_COMPILE([input])
+AT_PARSER_CHECK([./input], 0,
 [[15
 ]])
 
@@ -295,9 +295,9 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison input.y --location -d -v -o input.c])
-AT_CHECK([$CC $CFLAGS $CPPFLAGS input.c -o input], 0, [], [ignore])
-AT_CHECK([./input], 1,
+AT_CHECK([bison --location -d -v -o input.c input.y])
+AT_COMPILE([input])
+AT_PARSER_CHECK([./input], 1,
 [[sending: 'x' (value = 0, line 0)
 thing(0): 'x'(0)
 sending: 'x' (value = 1, line 10)
@@ -327,7 +327,7 @@ thing(10): 'x'(10)
 sending: ';' (value = 11, line 110)
 line(10): thing(10) ';'
 sending: 'y' (value = 12, line 120)
-120: parse error, unexpected $undefined., expecting $ or error or 'x'
+120: parse error, unexpected $undefined, expecting $end or 'x'
 sending: EOF
 Freeing nterm line (10 from 100)
 Freeing nterm line (7 from 70)