blob: 78913d4a64590e64ca323165d139cd1d8f81dd9f (
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
|
/*
$echo FILE: knu1.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 Information and control, vol. 8 of 6, pages 607--639, 1965
$echo (24) grammar
$echo Okay lr1.
FILE:
dates: 23 oct 2008
*/
/@
@** |knu1| Grammar.\fbreak
Test out (24) 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 "knu1.lex",fsm-filename knu1,fsm-namespace NS_knu1
,fsm-class Cknu1
,fsm-version "1.0",fsm-date "23 oct 2008",fsm-debug "true"
,fsm-comments "knuth grammar (24)")
@"/usr/local/yacco2/compiler/grammars/yacco2_T_includes.T"
rules{
Rstart(){
-> RS eog
}
RS (){
->
-> a RA b RS
-> b RB a RS
}
RA (){
->
-> a RA b RA
}
RB (){
->
-> b RB a RB
}
}// end of rules
|