summaryrefslogtreecommitdiff
path: root/web/yacco2/qa/lr1_sp2.lex
blob: 1e158949a7b2a2f9ca067e0377f11c5f0dbed9d0 (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
73
74
75
76
77
78
/*
$echo 	FILE: LR1_SP2.lex
$echo 	A LR1 GRAMMAR FROM
$echo 		DAVID SPECTOR
$echo 		SIGPLAN VOL 23 DEC/88
$echo Okay		
*/
/@
@** |LR1_SP2| grammar.\fbreak
    A LR1 GRAMMAR FROM
        DAVID SPECTOR
        SIGPLAN VOL 23 NO 12 DEC/88
@/
fsm (fsm-id    "lr1_sp2.lex",fsm-filename lr1_sp2,fsm-namespace NS_lr1_sp2
    ,fsm-class		Clr1_sp2_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
{ 
  Rlr1_sp2(){ 
      -> RS eog 
    }	  
 
  RS(){ 
      -> t  RE a 
      -> t  RF b 
      -> t  RG c 
      -> t  RH d 
      -> u  RE b 
      -> u  RF c 
      -> u  RG d 
      -> u  RH a 
      -> v  RE c 
      -> v  RF d 
      -> v  RG a 
      -> v  RH b 
      -> w  RE d 
      -> w  RF a 
      -> w  RG b 
      -> w  RH c 
    }
		  
  RE(){ 
      -> x  RA
      -> y  RD 
    }
		  
  RF(){ 
      -> x  RB
      -> y  RA 
    }

  RG(){ 
      -> x  RC
      -> y  RB 
    }

  RH(){ 
      -> x  RD
      -> y  RC 
    } 
  RA(){ 
      -> z 
    }

  RB(){ 
      -> z 
    }
		  
  RC(){ 
      -> z 
	}

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