blob: 61fdea2010ef1d232420bc8b7770894bf6952fde (
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
|
/*
$echo FILE: knu3.lex
$echo Purpose: test out lr1 from knuth's paper
$echo Knuth's paper
$echo On the Translation of languages from left to right
$echo from Infromation and control, vol. 8 of 6, pages 607--639, 1965
$echo (26) grammar
$echo Okay lr1.
FILE:
dates: 23 oct 2008
*/
/@
@** |knu3| Grammar.\fbreak
Test out (26) grammar from Knuth's paper:
``On the Translation of languages from left to right''
from Information and control, vol. 8 of 6, pages 607--639, 1965.
@/
fsm
(fsm-id "knu26.lex",fsm-filename knu3,fsm-namespace NS_knu3
,fsm-class Cknu3
,fsm-version "1.0",fsm-date "23 oct 2008",fsm-debug "true"
,fsm-comments "knuth grammar (26)")
@"/usr/local/yacco2/compiler/grammars/yacco2_T_includes.T"
rules{
RS (){
-> RB eog
}
RB (){
-> a
->RL RR
}
RL (){
-> a
-> RL RN b
}
RR (){
-> a
-> b RN RR
}
RN (){
-> a
-> b RN RN b
}
}// end of rules
|