summaryrefslogtreecommitdiff
path: root/web/yacco2/qa/lr1_sp6.lex
blob: c43a9c1a933634397fd3f614ccf9d76c0952778a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
$echo     FILE:{	LR1_sp6.lex
$echo     A LR1 GRAMMAR FROM
$echo     FULL LR(1) PARSER GENERATION
$echo     BY DAVID SPECTOR
$echo     P. 62 GRAMMAR G2
$echo     SIGPLAN VOL 16 NO 8 AUG 1981
$echo     with interior epsilon
$echo NOT LR! due to epsilon on eog rule ---- my modification test
*/
/@
@** |LR1_sp6| grammar.\fbreak
    A LR1 GRAMMAR FROM
        DAVID SPECTOR
        SIGPLAN VOL 23 NO 12 DEC/88
    with interior epsilon
@/
fsm (fsm-id    "lr1_sp6.lex",fsm-filename lr1_sp6,fsm-namespace NS_lr1_sp6
    ,fsm-class Clr1_sp6_fsm
   ,fsm-version "1.0",fsm-date     "8-oct-96"
   ,fsm-debug   "true",fsm-comments "test out lr1")
@"/usr/local/yacco2/compiler/grammars/yacco2_T_includes.T"
rules
{
  Repi_test(){ 
      -> u Repi_rt_bnd_tst Repi_eog 
    }
    
  Repi_rt_bnd_tst(){ 
      -> Rlr1_sp5 Repi 
    }
    
  Repi(){ 
      -> 
      -> m 
    }
  Repi_eog(){ 
      -> eog
      ->
    }

  Rlr1_sp5(){ 
      -> RS
    }

  RS(){ 
      -> a b RA RE
      -> a b RB x 
      -> a RD
      -> RA z 
      -> RB x 
    }

  RA(){ 
      -> d 
    }

  RB(){ 
      -> d 
    }

  RD(){ 
      -> f RA
      -> f RB x 
      -> f a RD
    }

  RE(){ 
      -> 
      -> z 
    }
}	// end of grammar