summaryrefslogtreecommitdiff
path: root/web/yacco2/qa/lr1_sp4.lex
blob: 3eebc1466095796aa4595dbad6704addf0ffe38b (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
/*
$echo     FILE:	LR1_sp4.lex
$echo     A LR1 GRAMMAR FROM
$echo     FULL LR(1) PARSER GENERATOR
$echo     BY DAVID SPECTOR
$echo     SIGPLAN VOL 16 NO 8 AUG 1981
$echo     G1 P. 61
$echo Okay
*/
/@
@** |LR1_sp4| grammar.\fbreak
    A LR1 GRAMMAR FROM
        DAVID SPECTOR
        SIGPLAN VOL 23 NO 12 DEC/88
@/
fsm (fsm-id    "lr1_sp4.lex",fsm-filename LR1_sp4,fsm-namespace NS_LR1_sp4
    ,fsm-class Clr1_sp4_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_sp4(){ 
      -> RS eog 
    }

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

  RA(){ 
      -> f 
    }

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