/[bison]/bison/tests/regression.at
ViewVC logotype

Diff of /bison/tests/regression.at

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.55 by akim, Sat Jun 15 18:23:12 2002 UTC revision 1.56 by akim, Sun Jun 30 17:33:08 2002 UTC
# Line 184  expr (7) Line 184  expr (7)
184    
185  state 0  state 0
186    
187      $axiom  ->  . expr $   (rule 0)      0 $axiom: . expr $
188    
189      'a'         shift, and go to state 1      'a'         shift, and go to state 1
190    
# Line 197  state 0 Line 197  state 0
197    
198  state 1  state 1
199    
200      expr  ->  'a' . @1 'b'   (rule 2)      2 expr: 'a' . @1 'b'
201    
202      $default    reduce using rule 1 (@1)      $default    reduce using rule 1 (@1)
203    
# Line 207  state 1 Line 207  state 1
207    
208  state 2  state 2
209    
210      $axiom  ->  expr . $   (rule 0)      0 $axiom: expr . $
211    
212      $           shift, and go to state 5      $           shift, and go to state 5
213    
# Line 215  state 2 Line 215  state 2
215    
216  state 3  state 3
217    
218      expr  ->  @2 . 'c'   (rule 4)      4 expr: @2 . 'c'
219    
220      'c'         shift, and go to state 6      'c'         shift, and go to state 6
221    
# Line 223  state 3 Line 223  state 3
223    
224  state 4  state 4
225    
226      expr  ->  'a' @1 . 'b'   (rule 2)      2 expr: 'a' @1 . 'b'
227    
228      'b'         shift, and go to state 7      'b'         shift, and go to state 7
229    
# Line 231  state 4 Line 231  state 4
231    
232  state 5  state 5
233    
234      $axiom  ->  expr $ .   (rule 0)      0 $axiom: expr $ .
235    
236      $default    accept      $default    accept
237    
238    
239  state 6  state 6
240    
241      expr  ->  @2 'c' .   (rule 4)      4 expr: @2 'c' .
242    
243      $default    reduce using rule 4 (expr)      $default    reduce using rule 4 (expr)
244    
# Line 246  state 6 Line 246  state 6
246    
247  state 7  state 7
248    
249      expr  ->  'a' @1 'b' .   (rule 2)      2 expr: 'a' @1 'b' .
250    
251      $default    reduce using rule 2 (expr)      $default    reduce using rule 2 (expr)
252    
# Line 375  CONST_DEC: Line 375  CONST_DEC:
375            { } undef_id_tok '=' const_id_tok ';'            { } undef_id_tok '=' const_id_tok ';'
376          ;          ;
377  %%  %%
   
378  ]])  ]])
379    
380  AT_CHECK([bison -v input.y])  AT_CHECK([bison -v input.y])
381    sed -n 's/  *$//;/^$/!p' input.output >input.report
382  AT_CHECK([sed -n 's/  *$//;/^$/!p' input.output], 0,  AT_CHECK([cat input.report], 0,
383  [[Grammar  [[Grammar
384      0 $axiom: CONST_DEC_PART $      0 $axiom: CONST_DEC_PART $
385      1 CONST_DEC_PART: CONST_DEC_LIST      1 CONST_DEC_PART: CONST_DEC_LIST
# Line 407  CONST_DEC (10) Line 406  CONST_DEC (10)
406  @1 (11)  @1 (11)
407      on left: 4, on right: 5      on left: 4, on right: 5
408  state 0  state 0
409      $axiom  ->  . CONST_DEC_PART $   (rule 0)      0 $axiom: . CONST_DEC_PART $
410      $default    reduce using rule 4 (@1)      $default    reduce using rule 4 (@1)
411      CONST_DEC_PART      go to state 1      CONST_DEC_PART      go to state 1
412      CONST_DEC_LIST      go to state 2      CONST_DEC_LIST      go to state 2
413      CONST_DEC   go to state 3      CONST_DEC   go to state 3
414      @1          go to state 4      @1          go to state 4
415  state 1  state 1
416      $axiom  ->  CONST_DEC_PART . $   (rule 0)      0 $axiom: CONST_DEC_PART . $
417      $           shift, and go to state 5      $           shift, and go to state 5
418  state 2  state 2
419      CONST_DEC_PART  ->  CONST_DEC_LIST .   (rule 1)      1 CONST_DEC_PART: CONST_DEC_LIST .
420      CONST_DEC_LIST  ->  CONST_DEC_LIST . CONST_DEC   (rule 3)      3 CONST_DEC_LIST: CONST_DEC_LIST . CONST_DEC
421      undef_id_tok        reduce using rule 4 (@1)      undef_id_tok        reduce using rule 4 (@1)
422      $default    reduce using rule 1 (CONST_DEC_PART)      $default    reduce using rule 1 (CONST_DEC_PART)
423      CONST_DEC   go to state 6      CONST_DEC   go to state 6
424      @1          go to state 4      @1          go to state 4
425  state 3  state 3
426      CONST_DEC_LIST  ->  CONST_DEC .   (rule 2)      2 CONST_DEC_LIST: CONST_DEC .
427      $default    reduce using rule 2 (CONST_DEC_LIST)      $default    reduce using rule 2 (CONST_DEC_LIST)
428  state 4  state 4
429      CONST_DEC  ->  @1 . undef_id_tok '=' const_id_tok ';'   (rule 5)      5 CONST_DEC: @1 . undef_id_tok '=' const_id_tok ';'
430      undef_id_tok        shift, and go to state 7      undef_id_tok        shift, and go to state 7
431  state 5  state 5
432      $axiom  ->  CONST_DEC_PART $ .   (rule 0)      0 $axiom: CONST_DEC_PART $ .
433      $default    accept      $default    accept
434  state 6  state 6
435      CONST_DEC_LIST  ->  CONST_DEC_LIST CONST_DEC .   (rule 3)      3 CONST_DEC_LIST: CONST_DEC_LIST CONST_DEC .
436      $default    reduce using rule 3 (CONST_DEC_LIST)      $default    reduce using rule 3 (CONST_DEC_LIST)
437  state 7  state 7
438      CONST_DEC  ->  @1 undef_id_tok . '=' const_id_tok ';'   (rule 5)      5 CONST_DEC: @1 undef_id_tok . '=' const_id_tok ';'
439      '='         shift, and go to state 8      '='         shift, and go to state 8
440  state 8  state 8
441      CONST_DEC  ->  @1 undef_id_tok '=' . const_id_tok ';'   (rule 5)      5 CONST_DEC: @1 undef_id_tok '=' . const_id_tok ';'
442      const_id_tok        shift, and go to state 9      const_id_tok        shift, and go to state 9
443  state 9  state 9
444      CONST_DEC  ->  @1 undef_id_tok '=' const_id_tok . ';'   (rule 5)      5 CONST_DEC: @1 undef_id_tok '=' const_id_tok . ';'
445      ';'         shift, and go to state 10      ';'         shift, and go to state 10
446  state 10  state 10
447      CONST_DEC  ->  @1 undef_id_tok '=' const_id_tok ';' .   (rule 5)      5 CONST_DEC: @1 undef_id_tok '=' const_id_tok ';' .
448      $default    reduce using rule 5 (CONST_DEC)      $default    reduce using rule 5 (CONST_DEC)
449  ]])  ]])
450    
# Line 491  AT_CHECK([bison -v input.y -o input.c]) Line 490  AT_CHECK([bison -v input.y -o input.c])
490    
491  # Check only the tables.  We don't use --no-parser, because it is  # Check only the tables.  We don't use --no-parser, because it is
492  # still to be implemented in the experimental branch of Bison.  # still to be implemented in the experimental branch of Bison.
493  AT_CHECK([[sed -n 's/  *$//;/^static const.*\[\] =/,/^}/p' input.c]], 0,  [sed -n 's/  *$//;/^static const.*\[\] =/,/^}/p' input.c >tables.c]
494    
495    AT_CHECK([[cat tables.c]], 0,
496  [[static const unsigned char yytranslate[] =  [[static const unsigned char yytranslate[] =
497  {  {
498         0,     2,     2,     2,     2,     2,     2,     2,     2,     2,         0,     2,     2,     2,     2,     2,     2,     2,     2,     2,

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26