summaryrefslogtreecommitdiff
path: root/web/yacco2/qa/knu2.lex
blob: 12472449e5dedc9f65b19e07d53f3e8563ea3975 (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
/*	
$echo FILE:        knu2.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 (25) grammar
$echo Okay lr1.		
FILE:   
dates:   23 oct 2008	
*/
/@
@** |knu2| Grammar.\fbreak
Test out (25) 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 "knu2.lex",fsm-filename knu2,fsm-namespace NS_knu2
,fsm-class Cknu2
,fsm-version	"1.0",fsm-date "23 oct 2008",fsm-debug "true"
,fsm-comments	"knuth grammar (25)")
@"/usr/local/yacco2/compiler/grammars/yacco2_T_includes.T"

rules{
Rstart(){
  -> RS eog 
}

RS (){
  -> a
  -> ( RS + RS )
}
}// end of rules