summaryrefslogtreecommitdiff
path: root/web/yacco2/grammar-testsuite/pager_2.lex
blob: f34ffe201448b5befcbf9916924027e826b478af (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
/*
Author: Dave Bone 
FILE:    pager_2.lex
Date:    7 mar 2014	
Purpose: Test out David Pager lr(1) resolution page 61
*/
/@
@** David Pager  Grammar.\fbreak
David Pager\fbreak
The Lane Table Method Of Constructing LR(1) Parsers.\fbreak
@/
fsm	
(fsm-id "pager_2.lex",fsm-filename pager_2,fsm-namespace NS_pager_2
,fsm-class Cpager_2
,fsm-version	"1.0",fsm-date "7 mar 2014",fsm-debug "false"
,fsm-comments	"Test out David Pager LR(1) resolution page 61.")
@"/usr/local/yacco2/compiler/grammars/yacco2_T_includes.T"

rules{

Rs(){
  -> Rg eog 
}

Rg(){
  -> x Rw a
  -> x Rv t
  -> y Rw b
  -> y Rv t
  -> z Rw r
  -> z Rv b
  -> u Ru Rx a
  -> u Ru Ry r
}

Rw(){
  -> Ru Rx Rc
}

Rv(){
  -> Ru Ry d
}

Rx(){
  -> k t Ru Rx Rp
  -> k t
}

Ry(){
 -> k t Ru Ry u
 -> k t
}

Ru(){
 -> Ru k t
 -> s
}

Re(){
 -> a
 -> b
 -> c
 -> v
}

Rc(){
 -> c
 -> w
}

Rp(){
 -> z
}

}