summaryrefslogtreecommitdiff
path: root/web/yacco2/qa/lalr1_dp1.lex
blob: 5e6f44a8ec0c0cb9abab63d679a0df9ac3283890 (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
/*
$echo FILE:	lalr1_dp1.lex
$echo Test out lalr grammar --- okay parse 
$echo A laLR1 grammar 
$echo from deremer and pennello paper
$echo efficient computation of lalr(1) look-ahead sets
$echo acm trans on prog lang and systems 
$echo vol. 4 no. 4 oct 82
$echo page 632
$echo Okay
*/
/@
@** |lalr1_dp1| grammar.\fbreak
    A laLR1 grammar 
    from deremer and pennello paper
    efficient computation of lalr(1) look-ahead sets
    acm trans on prog lang and systems 
    vol. 4 no. 4 oct 82
    page 632
@/
fsm	
  (fsm-id    "lalr1_dp1.lex",fsm-filename lalr1_dp1,fsm-namespace NS_lalr1_dp1
  ,fsm-class Clalr1_dp1
  ,fsm-version  "1.0",fsm-date     "13-sep-97"
  ,fsm-debug    "true",fsm-comments "test out lr1")
@"/usr/local/yacco2/compiler/grammars/yacco2_T_includes.T"
rules
{ 
  Rlalr1_dp1(){ 
      -> RS1 eog 
    }

  RS1(){ 
      -> a  RA c 
      -> a  g  d 
      -> b  RA d 
      -> b  g  c 
    }
	 
  RA(){ 
      -> RB 
    }

  RB(){ 
      -> g 
    }
}	// end of grammar