bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/3] output: capitalize State


From: Theophile Ranquet
Subject: [PATCH 1/3] output: capitalize State
Date: Wed, 24 Oct 2012 12:13:56 +0000

* src/print.c (print_state): Here.
* tests/conflicts.at, tests/existing.at, tests/local.at, tests/reduce.at,
tests/regression.at, tests/sets.at: Adjust.
---
 src/print.c         |   2 +-
 tests/conflicts.at  |  64 ++++++++---------
 tests/existing.at   |  40 +++++------
 tests/local.at      |   4 +-
 tests/reduce.at     | 198 ++++++++++++++++++++++++++--------------------------
 tests/regression.at |  44 ++++++------
 tests/sets.at       |   2 +-
 7 files changed, 177 insertions(+), 177 deletions(-)

diff --git a/src/print.c b/src/print.c
index cb227aa..5fdb28b 100644
--- a/src/print.c
+++ b/src/print.c
@@ -370,7 +370,7 @@ static void
 print_state (FILE *out, state *s)
 {
   fputs ("\n\n", out);
-  fprintf (out, _("state %d"), s->number);
+  fprintf (out, _("State %d"), s->number);
   fputc ('\n', out);
   print_core (out, s);
   print_actions (out, s);
diff --git a/tests/conflicts.at b/tests/conflicts.at
index 3934a6c..a13d754 100644
--- a/tests/conflicts.at
+++ b/tests/conflicts.at
@@ -580,7 +580,7 @@ exp (6)
     on left: 1 2, on right: 0 1
 
 
-state 0
+State 0
 
     0 $accept: . exp $end
     1 exp: . exp OP exp
@@ -591,14 +591,14 @@ state 0
     exp  go to state 2
 
 
-state 1
+State 1
 
     2 exp: NUM .
 
     $default  reduce using rule 2 (exp)
 
 
-state 2
+State 2
 
     0 $accept: exp . $end
     1 exp: exp . OP exp
@@ -607,14 +607,14 @@ state 2
     OP    shift, and go to state 4
 
 
-state 3
+State 3
 
     0 $accept: exp $end .
 
     $default  accept
 
 
-state 4
+State 4
 
     1 exp: . exp OP exp
     1    | exp OP . exp
@@ -625,7 +625,7 @@ state 4
     exp  go to state 5
 
 
-state 5
+State 5
 
     1 exp: exp . OP exp
     1    | exp OP exp .  [$end, OP]
@@ -683,7 +683,7 @@ exp (6)
     on left: 1 2, on right: 0 1
 
 
-state 0
+State 0
 
     0 $accept: . exp $end
     1 exp: . exp OP exp
@@ -694,14 +694,14 @@ state 0
     exp  go to state 2
 
 
-state 1
+State 1
 
     2 exp: NUM .
 
     $default  reduce using rule 2 (exp)
 
 
-state 2
+State 2
 
     0 $accept: exp . $end
     1 exp: exp . OP exp
@@ -710,14 +710,14 @@ state 2
     OP    shift, and go to state 4
 
 
-state 3
+State 3
 
     0 $accept: exp $end .
 
     $default  accept
 
 
-state 4
+State 4
 
     1 exp: . exp OP exp
     1    | exp OP . exp
@@ -728,7 +728,7 @@ state 4
     exp  go to state 5
 
 
-state 5
+State 5
 
     1 exp: exp . OP exp
     1    | exp OP exp .  [$end, OP]
@@ -823,7 +823,7 @@ id (7)
     on left: 4, on right: 2
 
 
-state 0
+State 0
 
     0 $accept: . exp $end
     1 exp: . num
@@ -838,7 +838,7 @@ state 0
     id   go to state 4
 
 
-state 1
+State 1
 
     3 num: '0' .  [$end]
     4 id: '0' .  [$end]
@@ -848,28 +848,28 @@ state 1
     $default  reduce using rule 3 (num)
 
 
-state 2
+State 2
 
     0 $accept: exp . $end
 
     $end  shift, and go to state 5
 
 
-state 3
+State 3
 
     1 exp: num .
 
     $default  reduce using rule 1 (exp)
 
 
-state 4
+State 4
 
     2 exp: id .
 
     $default  reduce using rule 2 (exp)
 
 
-state 5
+State 5
 
     0 $accept: exp $end .
 
@@ -1170,7 +1170,7 @@ reported_conflicts (9)
     on left: 8 9 10, on right: 1
 
 
-state 0
+State 0
 
     0 $accept: . start $end
     1 start: . resolved_conflict 'a' reported_conflicts 'a'
@@ -1185,28 +1185,28 @@ state 0
     Conflict between rule 3 and token 'a' resolved as reduce (%left 'a').
 
 
-state 1
+State 1
 
     0 $accept: start . $end
 
     $end  shift, and go to state 3
 
 
-state 2
+State 2
 
     1 start: resolved_conflict . 'a' reported_conflicts 'a'
 
     'a'  shift, and go to state 4
 
 
-state 3
+State 3
 
     0 $accept: start $end .
 
     $default  accept
 
 
-state 4
+State 4
 
     1 start: resolved_conflict 'a' . reported_conflicts 'a'
     8 reported_conflicts: . 'a'
@@ -1220,7 +1220,7 @@ state 4
     reported_conflicts  go to state 6
 
 
-state 5
+State 5
 
     8 reported_conflicts: 'a' .  ['a']
     9                   | 'a' .  ['a']
@@ -1230,14 +1230,14 @@ state 5
     $default  reduce using rule 8 (reported_conflicts)
 
 
-state 6
+State 6
 
     1 start: resolved_conflict 'a' reported_conflicts . 'a'
 
     'a'  shift, and go to state 7
 
 
-state 7
+State 7
 
     1 start: resolved_conflict 'a' reported_conflicts 'a' .
 
@@ -1291,8 +1291,8 @@ empty_c2: %prec 'c' ;
 empty_c3: %prec 'd' ;
 ]])
 AT_BISON_CHECK([[--report=all -o input.c input.y]], 0, [], [ignore])
-AT_CHECK([[cat input.output | sed -n '/^state 0$/,/^state 1$/p']], 0,
-[[state 0
+AT_CHECK([[cat input.output | sed -n '/^State 0$/,/^State 1$/p']], 0,
+[[State 0
 
     0 $accept: . start $end
     1 start: . 'a'
@@ -1328,7 +1328,7 @@ AT_CHECK([[cat input.output | sed -n '/^state 0$/,/^state 
1$/p']], 0,
     Conflict between rule 13 and token 'c' resolved as reduce ('c' < 'd').
 
 
-state 1
+State 1
 ]])
 
 AT_CLEANUP
@@ -1367,8 +1367,8 @@ empty_c3: %prec 'c' ;
 ]])
 
 AT_BISON_CHECK([[--report=all -o input.c input.y]], 0, [], [ignore])
-AT_CHECK([[cat input.output | sed -n '/^state 0$/,/^state 1$/p']], 0,
-[[state 0
+AT_CHECK([[cat input.output | sed -n '/^State 0$/,/^State 1$/p']], 0,
+[[State 0
 
     0 $accept: . start $end
     1 start: . 'a'
@@ -1404,7 +1404,7 @@ AT_CHECK([[cat input.output | sed -n '/^state 0$/,/^state 
1$/p']], 0,
     Conflict between rule 11 and token 'c' resolved as an error (%nonassoc 
'c').
 
 
-state 1
+State 1
 ]])
 AT_CLEANUP
 
diff --git a/tests/existing.at b/tests/existing.at
index 149499d..1b6fa4d 100644
--- a/tests/existing.at
+++ b/tests/existing.at
@@ -489,7 +489,7 @@ dnl   - 61 -> 328: reduce -> shift on '*', '/', and '%'
      $default  reduce using rule 45 (statement)
 +
 +
-+state 320
++State 320
 +
 +  139 non_post_simp_exp: . '!' simp_exp
 +  140                  | . '(' exp r_paren
@@ -527,7 +527,7 @@ dnl   - 61 -> 328: reduce -> shift on '*', '/', and '%'
 +    variable           go to state 63
 +
 +
-+state 321
++State 321
 +
 +  146 non_post_simp_exp: INCREMENT . variable
 +  154 variable: . NAME
@@ -540,7 +540,7 @@ dnl   - 61 -> 328: reduce -> shift on '*', '/', and '%'
 +    variable  go to state 50
 +
 +
-+state 322
++State 322
 +
 +  147 non_post_simp_exp: DECREMENT . variable
 +  154 variable: . NAME
@@ -553,7 +553,7 @@ dnl   - 61 -> 328: reduce -> shift on '*', '/', and '%'
 +    variable  go to state 51
 +
 +
-+state 323
++State 323
 +
 +  130 simp_exp: . non_post_simp_exp
 +  131         | . simp_exp '^' simp_exp
@@ -601,7 +601,7 @@ dnl   - 61 -> 328: reduce -> shift on '*', '/', and '%'
 +    variable           go to state 57
 +
 +
-+state 324
++State 324
 +
 +  130 simp_exp: . non_post_simp_exp
 +  131         | . simp_exp '^' simp_exp
@@ -649,7 +649,7 @@ dnl   - 61 -> 328: reduce -> shift on '*', '/', and '%'
 +    variable           go to state 57
 +
 +
-+state 325
++State 325
 +
 +  130 simp_exp: . non_post_simp_exp
 +  131         | . simp_exp '^' simp_exp
@@ -697,7 +697,7 @@ dnl   - 61 -> 328: reduce -> shift on '*', '/', and '%'
 +    variable           go to state 57
 +
 +
-+state 326
++State 326
 +
 +  131 simp_exp: simp_exp . '^' simp_exp
 +  132         | simp_exp . '*' simp_exp
@@ -718,7 +718,7 @@ dnl   - 61 -> 328: reduce -> shift on '*', '/', and '%'
 +    Conflict between rule 151 and token '-' resolved as reduce ('-' < UNARY).
 +
 +
-+state 327
++State 327
 +
 +  131 simp_exp: simp_exp . '^' simp_exp
 +  132         | simp_exp . '*' simp_exp
@@ -739,7 +739,7 @@ dnl   - 61 -> 328: reduce -> shift on '*', '/', and '%'
 +    Conflict between rule 150 and token '-' resolved as reduce ('-' < UNARY).
 +
 +
-+state 328
++State 328
 +
 +  131 simp_exp: simp_exp . '^' simp_exp
 +  132         | simp_exp . '*' simp_exp
@@ -2040,7 +2040,7 @@ dnl   - 383 -> 427
      nth_primitive          go to state 105
 @@ -3256,7 +3256,7 @@
 
- state 102
+ State 102
 
 -  146 place: label .  [$end, LABEL, VARIABLE, NUMBER, TEXT, ORDINAL, 
LEFT_ARROW_HEAD, RIGHT_ARROW_HEAD, DOUBLE_ARROW_HEAD, LAST, UP, DOWN, LEFT, 
RIGHT, HEIGHT, RADIUS, WIDTH, DIAMETER, FROM, TO, AT, WITH, BY, THEN, SOLID, 
DOTTED, DASHED, CHOP, SAME, INVISIBLE, LJUST, RJUST, ABOVE, BELOW, AND, HERE, 
DOT_X, DOT_Y, DOT_HT, DOT_WID, DOT_RAD, SIN, COS, ATAN2, LOG, EXP, SQRT, K_MAX, 
K_MIN, INT, RAND, SRAND, CW, CCW, THICKNESS, FILL, COLORED, OUTLINED, SHADED, 
ALIGNED, SPRINTF, '(', '`', ',', '>', '+', '-', '!', ';', '}', '@:>@', ')']
 +  146 place: label .  [$end, LABEL, VARIABLE, NUMBER, TEXT, ORDINAL, 
LEFT_ARROW_HEAD, RIGHT_ARROW_HEAD, DOUBLE_ARROW_HEAD, LAST, UP, DOWN, LEFT, 
RIGHT, HEIGHT, RADIUS, WIDTH, DIAMETER, FROM, TO, AT, WITH, BY, THEN, SOLID, 
DOTTED, DASHED, CHOP, SAME, INVISIBLE, LJUST, RJUST, ABOVE, BELOW, HERE, DOT_X, 
DOT_Y, DOT_HT, DOT_WID, DOT_RAD, SIN, COS, ATAN2, LOG, EXP, SQRT, K_MAX, K_MIN, 
INT, RAND, SRAND, CW, CCW, THICKNESS, FILL, COLORED, OUTLINED, SHADED, ALIGNED, 
SPRINTF, '(', '`', '+', '-', '!', ';', '}', '@:>@']
@@ -2205,7 +2205,7 @@ dnl   - 383 -> 427
 +    expr                   go to state 424
 
 
- state 165
+ State 165
 @@ -7987,7 +7987,7 @@
      text_expr              go to state 112
      text                   go to state 113
@@ -2322,7 +2322,7 @@ dnl   - 383 -> 427
 +    between  go to state 425
 
 
- state 193
+ State 193
 @@ -10152,7 +10152,7 @@
 
      expr_pair              go to state 317
@@ -2490,7 +2490,7 @@ dnl   - 383 -> 427
 +    expr                   go to state 424
 
 
- state 238
+ State 238
 @@ -12937,7 +12937,7 @@
      '!'           shift, and go to state 94
 
@@ -2577,7 +2577,7 @@ dnl   - 383 -> 427
 +    expr                   go to state 424
 
 
- state 315
+ State 315
 @@ -16124,7 +16124,7 @@
 
      $default  reduce using rule 239 (expr)
@@ -2628,7 +2628,7 @@ dnl   - 383 -> 427
 +    expr                   go to state 424
 
 
- state 383
+ State 383
 @@ -18071,7 +18071,7 @@
      '!'           shift, and go to state 94
 
@@ -2671,7 +2671,7 @@ dnl   - 383 -> 427
      $default  reduce using rule 29 (placeless_element)
 +
 +
-+state 423
++State 423
 +
 +  146 place: label .  [$end, AND, DOT_X, DOT_Y, DOT_HT, DOT_WID, DOT_RAD, 
',', '>', '+', '-', ';', '}', '@:>@', ')']
 +  147      | label . corner
@@ -2742,7 +2742,7 @@ dnl   - 383 -> 427
 +    corner  go to state 205
 +
 +
-+state 424
++State 424
 +
 +  140 position_not_place: expr . between position AND position
 +  141                   | expr . '<' position ',' position '>'
@@ -2785,7 +2785,7 @@ dnl   - 383 -> 427
 +    between  go to state 425
 +
 +
-+state 425
++State 425
 +
 +  134 position: . position_not_place
 +  135         | . place
@@ -2941,7 +2941,7 @@ dnl   - 383 -> 427
 +    expr                   go to state 424
 +
 +
-+state 426
++State 426
 +
 +  137 position_not_place: position . '+' expr_pair
 +  138                   | position . '-' expr_pair
@@ -2952,7 +2952,7 @@ dnl   - 383 -> 427
 +    '-'  shift, and go to state 198
 +
 +
-+state 427
++State 427
 +
 +  134 position: . position_not_place
 +  135         | . place
diff --git a/tests/local.at b/tests/local.at
index 65ff887..b221495 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -824,9 +824,9 @@ m4_if(m4_index(m4_quote($3), [no-xml]), -1,
                                [0], [], m4_dquote($7))
 
 m4_if(m4_index(m4_quote($3), [last-state]), -1,
-      [AT_CHECK([[sed -n '/^state 0$/,$p' input.output]], [[0]],
+      [AT_CHECK([[sed -n '/^State 0$/,$p' input.output]], [[0]],
                 m4_dquote($8))],
-      [AT_CHECK([[sed -n 's/^state //p' input.output | tail -1]], [[0]],
+      [AT_CHECK([[sed -n 's/^State //p' input.output | tail -1]], [[0]],
                 m4_dquote($8)[[
 ]])])
 
diff --git a/tests/reduce.at b/tests/reduce.at
index c528eed..bf43bf9 100644
--- a/tests/reduce.at
+++ b/tests/reduce.at
@@ -437,7 +437,7 @@ dnl BISON-STDERR
 [],
 
 dnl TABLES
-[[state 0
+[[State 0
 
     0 $accept: . S $end
     1 S: . 'a' A 'a'
@@ -451,7 +451,7 @@ dnl TABLES
     S  go to state 4
 
 
-state 1
+State 1
 
     1 S: 'a' . A 'a'
     4 A: . 'a' 'a'
@@ -462,7 +462,7 @@ state 1
     A  go to state 6
 
 
-state 2
+State 2
 
     2 S: 'b' . A 'b'
     4 A: . 'a' 'a'
@@ -473,7 +473,7 @@ state 2
     A  go to state 7
 
 
-state 3
+State 3
 
     3 S: 'c' . c
     4 A: . 'a' 'a'
@@ -487,14 +487,14 @@ state 3
     c  go to state 10
 
 
-state 4
+State 4
 
     0 $accept: S . $end
 
     $end  shift, and go to state 11
 
 
-state 5
+State 5
 
     4 A: 'a' . 'a'
     5  | 'a' .  ]AT_COND_CASE([[LALR]], [[['a', 'b']]], [[['a']]])[
@@ -505,21 +505,21 @@ state 5
     Conflict between rule 5 and token 'a' resolved as reduce (%left 'a').
 
 
-state 6
+State 6
 
     1 S: 'a' A . 'a'
 
     'a'  shift, and go to state 13
 
 
-state 7
+State 7
 
     2 S: 'b' A . 'b'
 
     'b'  shift, and go to state 14
 
 
-state 8
+State 8
 
     4 A: 'a' . 'a'
     5  | 'a' .  [$end]
@@ -533,7 +533,7 @@ state 8
                   [[$default]])[  reduce using rule 5 (A)
 
 
-state 9
+State 9
 
     7 c: A .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -541,7 +541,7 @@ state 9
                   [[$default]])[  reduce using rule 7 (c)
 
 
-state 10
+State 10
 
     3 S: 'c' c .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -549,14 +549,14 @@ state 10
                   [[$default]])[  reduce using rule 3 (S)
 
 
-state 11
+State 11
 
     0 $accept: S $end .
 
     $default  accept
 
 
-state 12
+State 12
 
     4 A: 'a' 'a' .]AT_COND_CASE([[canonical LR]], [[  ['a']]])[
 
@@ -564,7 +564,7 @@ state 12
                   [[$default]])[  reduce using rule 4 (A)
 
 
-state 13
+State 13
 
     1 S: 'a' A 'a' .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -572,7 +572,7 @@ state 13
                   [[$default]])[  reduce using rule 1 (S)
 
 
-state 14
+State 14
 
     2 S: 'b' A 'b' .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -580,7 +580,7 @@ state 14
                   [[$default]])[  reduce using rule 2 (S)
 
 
-state 15
+State 15
 
     6 c: 'a' 'b' .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -589,7 +589,7 @@ state 15
                                                                        [[]], [[
 
 
-state 16
+State 16
 
     4 A: 'a' . 'a'
     5  | 'a' .  ['b']
@@ -601,14 +601,14 @@ state 16
                   [[$default]])[  reduce using rule 5 
(A)]AT_COND_CASE([[canonical LR]], [[
 
 
-state 17
+State 17
 
     4 A: 'a' 'a' .  [$end]
 
     $end  reduce using rule 4 (A)
 
 
-state 18
+State 18
 
     4 A: 'a' 'a' .  ['b']
 
@@ -653,7 +653,7 @@ dnl BISON-STDERR
 [],
 
 dnl TABLES
-[[state 0
+[[State 0
 
     0 $accept: . S $end
     1 S: . 'a' A 'a'
@@ -667,7 +667,7 @@ dnl TABLES
     S  go to state 4
 
 
-state 1
+State 1
 
     1 S: 'a' . A 'a'
     4 A: . 'a' 'a' 'a'
@@ -678,7 +678,7 @@ state 1
     A  go to state 6
 
 
-state 2
+State 2
 
     2 S: 'b' . A 'b'
     4 A: . 'a' 'a' 'a'
@@ -689,7 +689,7 @@ state 2
     A  go to state 7
 
 
-state 3
+State 3
 
     3 S: 'c' . c
     4 A: . 'a' 'a' 'a'
@@ -703,14 +703,14 @@ state 3
     c  go to state 10
 
 
-state 4
+State 4
 
     0 $accept: S . $end
 
     $end  shift, and go to state 11
 
 
-state 5
+State 5
 
     4 A: 'a' . 'a' 'a'
     5  | 'a' . 'a'
@@ -718,21 +718,21 @@ state 5
     'a'  shift, and go to state 12
 
 
-state 6
+State 6
 
     1 S: 'a' A . 'a'
 
     'a'  shift, and go to state 13
 
 
-state 7
+State 7
 
     2 S: 'b' A . 'b'
 
     'b'  shift, and go to state 14
 
 
-state 8
+State 8
 
     4 A: 'a' . 'a' 'a'
     5  | 'a' . 'a'
@@ -741,7 +741,7 @@ state 8
     'a'  shift, and go to state 15
 
 
-state 9
+State 9
 
     7 c: A .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -749,7 +749,7 @@ state 9
                   [[$default]])[  reduce using rule 7 (c)
 
 
-state 10
+State 10
 
     3 S: 'c' c .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -757,14 +757,14 @@ state 10
                   [[$default]])[  reduce using rule 3 (S)
 
 
-state 11
+State 11
 
     0 $accept: S $end .
 
     $default  accept
 
 
-state 12
+State 12
 
     4 A: 'a' 'a' . 'a'
     5  | 'a' 'a' .  ]AT_COND_CASE([[LALR]], [[['a', 'b']]], [[['a']]])[
@@ -775,7 +775,7 @@ state 12
     Conflict between rule 5 and token 'a' resolved as reduce (%left 'a').
 
 
-state 13
+State 13
 
     1 S: 'a' A 'a' .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -783,7 +783,7 @@ state 13
                   [[$default]])[  reduce using rule 1 (S)
 
 
-state 14
+State 14
 
     2 S: 'b' A 'b' .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -791,7 +791,7 @@ state 14
                   [[$default]])[  reduce using rule 2 (S)
 
 
-state 15
+State 15
 
     4 A: 'a' 'a' . 'a'
     5  | 'a' 'a' .  [$end]
@@ -805,7 +805,7 @@ state 15
                   [[$default]])[  reduce using rule 5 (A)
 
 
-state 16
+State 16
 
     4 A: 'a' 'a' 'a' .]AT_COND_CASE([[canonical LR]], [[  ['a']]])[
 
@@ -813,7 +813,7 @@ state 16
                   [[$default]])[  reduce using rule 4 (A)
 
 
-state 17
+State 17
 
     6 c: 'a' 'a' 'b' .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -822,7 +822,7 @@ state 17
                                                                        [[]], [[
 
 
-state 18
+State 18
 
     4 A: 'a' . 'a' 'a'
     5  | 'a' . 'a'
@@ -831,7 +831,7 @@ state 18
                                               [[19]])[
 
 
-state 19]AT_COND_CASE([[canonical LR]], [[
+State 19]AT_COND_CASE([[canonical LR]], [[
 
     4 A: 'a' 'a' 'a' .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -839,7 +839,7 @@ state 19]AT_COND_CASE([[canonical LR]], [[
                   [[$default]])[  reduce using rule 4 (A)
 
 
-state 20]])[
+State 20]])[
 
     4 A: 'a' 'a' . 'a'
     5  | 'a' 'a' .  ['b']
@@ -851,7 +851,7 @@ state 20]])[
                   [[$default]])[  reduce using rule 5 
(A)]AT_COND_CASE([[canonical LR]], [[
 
 
-state 21
+State 21
 
     4 A: 'a' 'a' 'a' .]AT_COND_CASE([[canonical LR]], [[  ['b']]])[
 
@@ -900,7 +900,7 @@ dnl BISON-STDERR
 [],
 
 dnl TABLES
-[[state 0
+[[State 0
 
     0 $accept: . S $end
     1 S: . 'a' A 'a'
@@ -914,7 +914,7 @@ dnl TABLES
     S  go to state 4
 
 
-state 1
+State 1
 
     1 S: 'a' . A 'a'
     4 A: . 'a' 'a' B
@@ -924,7 +924,7 @@ state 1
     A  go to state 6
 
 
-state 2
+State 2
 
     2 S: 'b' . A 'b'
     4 A: . 'a' 'a' B
@@ -934,7 +934,7 @@ state 2
     A  go to state 7
 
 
-state 3
+State 3
 
     3 S: 'c' . c
     4 A: . 'a' 'a' B
@@ -947,35 +947,35 @@ state 3
     c  go to state 10
 
 
-state 4
+State 4
 
     0 $accept: S . $end
 
     $end  shift, and go to state 11
 
 
-state 5
+State 5
 
     4 A: 'a' . 'a' B
 
     'a'  shift, and go to state 12
 
 
-state 6
+State 6
 
     1 S: 'a' A . 'a'
 
     'a'  shift, and go to state 13
 
 
-state 7
+State 7
 
     2 S: 'b' A . 'b'
 
     'b'  shift, and go to state 14
 
 
-state 8
+State 8
 
     4 A: 'a' . 'a' B
     7 c: 'a' . 'a' 'b'
@@ -983,7 +983,7 @@ state 8
     'a'  shift, and go to state 15
 
 
-state 9
+State 9
 
     8 c: A .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -991,7 +991,7 @@ state 9
                   [[$default]])[  reduce using rule 8 (c)
 
 
-state 10
+State 10
 
     3 S: 'c' c .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -999,14 +999,14 @@ state 10
                   [[$default]])[  reduce using rule 3 (S)
 
 
-state 11
+State 11
 
     0 $accept: S $end .
 
     $default  accept
 
 
-state 12
+State 12
 
     4 A: 'a' 'a' . B
     5 B: . 'a'
@@ -1020,7 +1020,7 @@ state 12
     Conflict between rule 6 and token 'a' resolved as reduce (%left 'a').
 
 
-state 13
+State 13
 
     1 S: 'a' A 'a' .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -1028,7 +1028,7 @@ state 13
                   [[$default]])[  reduce using rule 1 (S)
 
 
-state 14
+State 14
 
     2 S: 'b' A 'b' .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -1036,7 +1036,7 @@ state 14
                   [[$default]])[  reduce using rule 2 (S)
 
 
-state 15
+State 15
 
     4 A: 'a' 'a' . B
     5 B: . 'a'
@@ -1053,7 +1053,7 @@ state 15
     B  go to state ]AT_COND_CASE([[canonical LR]], [[21]], [[17]])[
 
 
-state 16
+State 16
 
     5 B: 'a' .]AT_COND_CASE([[canonical LR]], [[  ['a']]])[
 
@@ -1061,7 +1061,7 @@ state 16
                   [[$default]])[  reduce using rule 5 (B)
 
 
-state 17
+State 17
 
     4 A: 'a' 'a' B .]AT_COND_CASE([[canonical LR]], [[  ['a']]])[
 
@@ -1069,7 +1069,7 @@ state 17
                   [[$default]])[  reduce using rule 4 (A)
 
 
-state 18
+State 18
 
     7 c: 'a' 'a' 'b' .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -1077,7 +1077,7 @@ state 18
                   [[$default]])[  reduce using rule 7 
(c)]AT_COND_CASE([[LALR]], [], [[
 
 
-state 19
+State 19
 
     4 A: 'a' . 'a' B
 
@@ -1085,21 +1085,21 @@ state 19
                                               [[20]])[
 
 
-state 20]AT_COND_CASE([[canonical LR]], [[
+State 20]AT_COND_CASE([[canonical LR]], [[
 
     5 B: 'a' .  [$end]
 
     $end  reduce using rule 5 (B)
 
 
-state 21
+State 21
 
     4 A: 'a' 'a' B .  [$end]
 
     $end  reduce using rule 4 (A)
 
 
-state 22]])[
+State 22]])[
 
     4 A: 'a' 'a' . B
     5 B: . 'a'
@@ -1114,14 +1114,14 @@ state 22]])[
     B  go to state ]AT_COND_CASE([[canonical LR]], [[24
 
 
-state 23
+State 23
 
     5 B: 'a' .  ['b']
 
     'b'  reduce using rule 5 (B)
 
 
-state 24
+State 24
 
     4 A: 'a' 'a' B .  ['b']
 
@@ -1195,7 +1195,7 @@ dnl BISON-STDERR
 ]], [])],
 
 dnl TABLES
-[[state 0
+[[State 0
 
     0 $accept: . S $end
     1 S: . 'a' A 'f'
@@ -1213,7 +1213,7 @@ dnl TABLES
     S  go to state 4
 
 
-state 1
+State 1
 
     1 S: 'a' . A 'f'
     2  | 'a' . B
@@ -1226,7 +1226,7 @@ state 1
     B  go to state 7
 
 
-state 2
+State 2
 
     3 S: 'b' . A 'f'
     4  | 'b' . B 'g'
@@ -1240,7 +1240,7 @@ state 2
     B  go to state 10
 
 
-state 3
+State 3
 
     6 S: 'c' . 'c' A 'g'
     7  | 'c' . 'c' B
@@ -1248,14 +1248,14 @@ state 3
     'c'  shift, and go to state 11
 
 
-state 4
+State 4
 
     0 $accept: S . $end
 
     $end  shift, and go to state 12
 
 
-state 5
+State 5
 
     8 A: 'd' . 'e'
     9 B: 'd' . 'e'
@@ -1265,14 +1265,14 @@ state 5
                                                [[20]])[
 
 
-state 6
+State 6
 
     1 S: 'a' A . 'f'
 
     'f'  shift, and go to state 14
 
 
-state 7
+State 7
 
     2 S: 'a' B .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -1280,7 +1280,7 @@ state 7
                   [[$default]])[  reduce using rule 2 (S)
 
 
-state 8
+State 8
 
     5 S: 'b' 'd' .  [$end]
     8 A: 'd' . 'e'
@@ -1293,21 +1293,21 @@ state 8
                   [[$default]])[  reduce using rule 5 (S)
 
 
-state 9
+State 9
 
     3 S: 'b' A . 'f'
 
     'f'  shift, and go to state 15
 
 
-state 10
+State 10
 
     4 S: 'b' B . 'g'
 
     'g'  shift, and go to state 16
 
 
-state 11
+State 11
 
     6 S: 'c' 'c' . A 'g'
     7  | 'c' 'c' . B
@@ -1321,14 +1321,14 @@ state 11
     B  go to state 18
 
 
-state 12
+State 12
 
     0 $accept: S $end .
 
     $default  accept]AT_COND_CASE([[LALR]], [[
 
 
-state 13
+State 13
 
     8 A: 'd' 'e' .  ['f', 'g']
     9 B: 'd' 'e' .  [$end, 'g']
@@ -1339,7 +1339,7 @@ state 13
     $default  reduce using rule 8 (A)]], [[
 
 
-state 13
+State 13
 
     8 A: 'd' 'e' .  ['f']
     9 B: 'd' 'e' .  ]AT_COND_CASE([[canonical LR]], [[[$end]]], [[['g']]])[
@@ -1350,7 +1350,7 @@ state 13
                   [[$default]])[  reduce using rule 8 (A)]])[
 
 
-state 14
+State 14
 
     1 S: 'a' A 'f' .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -1358,7 +1358,7 @@ state 14
                   [[$default]])[  reduce using rule 1 (S)
 
 
-state 15
+State 15
 
     3 S: 'b' A 'f' .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -1366,7 +1366,7 @@ state 15
                   [[$default]])[  reduce using rule 3 (S)
 
 
-state 16
+State 16
 
     4 S: 'b' B 'g' .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -1374,14 +1374,14 @@ state 16
                   [[$default]])[  reduce using rule 4 (S)
 
 
-state 17
+State 17
 
     6 S: 'c' 'c' A . 'g'
 
     'g'  shift, and go to state 19
 
 
-state 18
+State 18
 
     7 S: 'c' 'c' B .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -1389,7 +1389,7 @@ state 18
                   [[$default]])[  reduce using rule 7 (S)
 
 
-state 19
+State 19
 
     6 S: 'c' 'c' A 'g' .]AT_COND_CASE([[canonical LR]], [[  [$end]]])[
 
@@ -1398,7 +1398,7 @@ state 19
                                                                        [[]], [[
 
 
-state 20]AT_COND_CASE([[canonical LR]], [[
+State 20]AT_COND_CASE([[canonical LR]], [[
 
     8 A: 'd' 'e' .  ['f']
     9 B: 'd' 'e' .  ['g']
@@ -1407,7 +1407,7 @@ state 20]AT_COND_CASE([[canonical LR]], [[
     'g'  reduce using rule 9 (B)
 
 
-state 21
+State 21
 
     8 A: 'd' . 'e'
     9 B: 'd' . 'e'
@@ -1415,7 +1415,7 @@ state 21
     'e'  shift, and go to state 22
 
 
-state 22
+State 22
 
     8 A: 'd' 'e' .  ['g']
     9 B: 'd' 'e' .  [$end]
@@ -1491,7 +1491,7 @@ c: ;
 ]],
 dnl Visit each state mentioned above.
 [['a', 'a']],
-[[state 0
+[[State 0
 
     0 $accept: . start $end
     1 start: . a b
@@ -1505,7 +1505,7 @@ dnl Visit each state mentioned above.
     a      go to state 3
 
 
-state 1
+State 1
 
     4 a: 'a' .]AT_COND_CASE([[accepting]], [[  [$end, 'a', 'b']
 
@@ -1516,14 +1516,14 @@ state 1
     $default  reduce using rule 4 (a)]])[
 
 
-state 2
+State 2
 
     0 $accept: start . $end
 
     $end  shift, and go to state 4
 
 
-state 3
+State 3
 
     1 start: a . b
     2      | a . b 'a'
@@ -1542,14 +1542,14 @@ state 3
     c  go to state 6
 
 
-state 4
+State 4
 
     0 $accept: start $end .
 
     $default  accept
 
 
-state 5
+State 5
 
     1 start: a b .  [$end]
     2      | a b . 'a'
@@ -1560,14 +1560,14 @@ state 5
                   [[$end]])[  reduce using rule 1 (start)
 
 
-state 6
+State 6
 
     3 start: a c . 'b'
 
     'b'  shift, and go to state 8
 
 
-state 7
+State 7
 
     2 start: a b 'a' .]AT_COND_CASE([[accepting]], [[  [$end]
 
@@ -1576,7 +1576,7 @@ state 7
     $default  reduce using rule 2 (start)]])[
 
 
-state 8
+State 8
 
     3 start: a c 'b' .]AT_COND_CASE([[accepting]], [[  [$end]
 
diff --git a/tests/regression.at b/tests/regression.at
index c44b9f8..a4bc20b 100644
--- a/tests/regression.at
+++ b/tests/regression.at
@@ -293,7 +293,7 @@ address@hidden (9)
     on left: 3, on right: 4
 
 
-state 0
+State 0
 
     0 $accept: . expr $end
 
@@ -305,7 +305,7 @@ state 0
     address@hidden   go to state 3
 
 
-state 1
+State 1
 
     2 expr: 'a' . address@hidden 'b'
 
@@ -314,42 +314,42 @@ state 1
     address@hidden  go to state 4
 
 
-state 2
+State 2
 
     0 $accept: expr . $end
 
     $end  shift, and go to state 5
 
 
-state 3
+State 3
 
     4 expr: address@hidden . 'c'
 
     'c'  shift, and go to state 6
 
 
-state 4
+State 4
 
     2 expr: 'a' address@hidden . 'b'
 
     'b'  shift, and go to state 7
 
 
-state 5
+State 5
 
     0 $accept: expr $end .
 
     $default  accept
 
 
-state 6
+State 6
 
     4 expr: address@hidden 'c' .
 
     $default  reduce using rule 4 (expr)
 
 
-state 7
+State 7
 
     2 expr: 'a' address@hidden 'b' .
 
@@ -598,7 +598,7 @@ address@hidden (11)
     on left: 4, on right: 5
 
 
-state 0
+State 0
 
     0 $accept: . CONST_DEC_PART $end
 
@@ -610,14 +610,14 @@ state 0
     address@hidden             go to state 4
 
 
-state 1
+State 1
 
     0 $accept: CONST_DEC_PART . $end
 
     $end  shift, and go to state 5
 
 
-state 2
+State 2
 
     1 CONST_DEC_PART: CONST_DEC_LIST .
     3 CONST_DEC_LIST: CONST_DEC_LIST . CONST_DEC
@@ -629,56 +629,56 @@ state 2
     address@hidden        go to state 4
 
 
-state 3
+State 3
 
     2 CONST_DEC_LIST: CONST_DEC .
 
     $default  reduce using rule 2 (CONST_DEC_LIST)
 
 
-state 4
+State 4
 
     5 CONST_DEC: address@hidden . undef_id_tok '=' const_id_tok ';'
 
     undef_id_tok  shift, and go to state 7
 
 
-state 5
+State 5
 
     0 $accept: CONST_DEC_PART $end .
 
     $default  accept
 
 
-state 6
+State 6
 
     3 CONST_DEC_LIST: CONST_DEC_LIST CONST_DEC .
 
     $default  reduce using rule 3 (CONST_DEC_LIST)
 
 
-state 7
+State 7
 
     5 CONST_DEC: address@hidden undef_id_tok . '=' const_id_tok ';'
 
     '='  shift, and go to state 8
 
 
-state 8
+State 8
 
     5 CONST_DEC: address@hidden undef_id_tok '=' . const_id_tok ';'
 
     const_id_tok  shift, and go to state 9
 
 
-state 9
+State 9
 
     5 CONST_DEC: address@hidden undef_id_tok '=' const_id_tok . ';'
 
     ';'  shift, and go to state 10
 
 
-state 10
+State 10
 
     5 CONST_DEC: address@hidden undef_id_tok '=' const_id_tok ';' .
 
@@ -1125,8 +1125,8 @@ a: 'a' ;
 ]])
 
 AT_BISON_CHECK([[--report=all input.y]])
-AT_CHECK([[sed -n '/^state 1$/,/^state 2$/p' input.output]], [[0]],
-[[state 1
+AT_CHECK([[sed -n '/^State 1$/,/^State 2$/p' input.output]], [[0]],
+[[State 1
 
     2 start: 'a' . a 'a'
     3 a: . 'a'
@@ -1139,7 +1139,7 @@ AT_CHECK([[sed -n '/^state 1$/,/^state 2$/p' 
input.output]], [[0]],
     a  go to state 5
 
 
-state 2
+State 2
 ]])
 
 AT_CLEANUP
diff --git a/tests/sets.at b/tests/sets.at
index 388ee09..4cbdfd6 100644
--- a/tests/sets.at
+++ b/tests/sets.at
@@ -287,7 +287,7 @@ mv stdout expout
 
 # Get the final state in the report, from the "accept" action..
 AT_CHECK([sed -n '
-           /^state \(.*\)/{
+           /^State \(.*\)/{
             s//final state \1/
             x
           }
-- 
1.7.11.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]