summaryrefslogtreecommitdiff
path: root/web/yacco2/qa/lalr1_dp2.lex
blob: 863d029e977082913cb203a2a837d24617023d19 (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
/*
$echo     FILE:  lalr1_dp2.lex
$echo     A laLR1 grammar
$echo     from Deremer and Pennello paper
$echo     efficient computation: lalr(1) look-ahead sets
$echo     acm trans on prog lang and systems vol. 4 no. 4 oct 82
$echo     page 633
$echo Okay
*/
/@
@** |lalr1_dp2| grammar.\fbreak
    A laLR1 grammar
    from Deremer and Pennello paper
    efficient computation: lalr(1) look-ahead sets
    acm trans on prog lang and systems vol. 4 no. 4 oct 82
    page 633
@/
fsm	
  (fsm-id     "lalr1_dp2.lex",fsm-filename lalr1_dp2,fsm-namespace NS_lalr1_dp2
  ,fsm-class  Clalr1_dp2
  ,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_dp2(){ 
      -> RS1 eog 
    }

  RS1(){ 
      -> c d
      -> a RB d
      -> RC RB g
    }
	 
  RB(){ 
      -> RD RE 
    }
  
  RC(){ 
      -> c 
    }

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