summaryrefslogtreecommitdiff
path: root/web/yacco2/grammar-testsuite/dp_2.lex
blob: 822b88fb8c62310ed831033e49e9829f1bdb9dbc (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
/*
Author: Dave Bone 
FILE:    dp_2.lex
Date:    7 mar 2014	
Purpose: Test out compiler/compiler with Deremer and Pennello lair grammar page 633
*/
/@
@** Deremer and Pennello page 633 Lalr(0) Grammar.\fbreak
Efficient Computation of LALR(1) Look-Ahead Sets\fbreak
ACM Transactions on Programming Languages and Systems, 4(4):615—649, 1982\fbreak
@/
fsm	
(fsm-id "dp_2.lex",fsm-filename dp_2,fsm-namespace NS_dp_2
,fsm-class Cdp_2
,fsm-version	"1.0",fsm-date "7 mar 2014",fsm-debug "false"
,fsm-comments	"LR(0) Deremer and Pennello grammar from page 633.")
@"/usr/local/yacco2/compiler/grammars/yacco2_T_includes.T"

rules{
Rs(){
  -> Rs1 eog 
}

Rs1(){
  -> c d
  -> a Rb d
  -> Rc Rb g
}

Rb(){
  -> Rd Re
}

Rc(){
  -> c
}

Rd(){
  -> 
}

Re(){
  -> 
}
}