blob: f4e8d6eea22522af48599560d362ad281ddb7daa (
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
|
/*
$echo FILE: lr1_pa1.lex
$echo A LR1 GRAMMAR FROM
$echo ACTA INFORMATICA 7 249-268(1977)
$echo A PRACTICAL GENERAL METHOD FOR CONSTRUCTING LR(K) PARSERS
$echo BY DAVID PAGER
$echo P. 256 GRAMMAR G2
$echo Okay
*/
/@
@** |lr1_pa1| grammar.\fbreak
A LR1 GRAMMAR FROM
ACTA INFORMATICA 7 249-268(1977)
A PRACTICAL GENERAL METHOD FOR CONSTRUCTING LR(K) PARSERS
BY DAVID PAGER
P. 256 GRAMMAR G2
@/
fsm(fsm-id "lr1_pa1.lex",fsm-filename lr1_pa1,fsm-namespace NS_lr1_pa1
,fsm-class Clr1_pa1_rul_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_pa1(){
-> RX eog
}
RX(){
-> a RY d
-> a RZ c
-> a RT
-> b RY e
-> b RZ d
-> b RT
}
RY(){
-> t RW
-> u RX
}
RZ(){
-> t u
}
RT(){
-> u RX a
}
RW(){
-> u RV
}
RV(){
->
}
} // end of grammar
|