blob: 4e27c7ba78455adb58e3d9724982819c3309ef30 (
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
|
/*
$echo FILE: TS_path1.lex
$echo Purpose: Pathological test
$echo Error --- Rule |RA| does not completely derive a subrule
*/
/@
@** |TS_path1| grammar.\fbreak
Pathological test grammar.\fbreak
Rule |RA| does not completely derive a subrule.
This is a left or right recursion situation: it depends on how u view the
the epsilon situation. i'm slanted towards the left.
Before left recursion can take place, one of its subrules must be derived
before it can continue deriving its $\beta$ string.
I allow printing of the PDF document but there can be down stream
annoyances caused by my PDF implementation: the fsc file is expected.
now I have corrected the emitted ``xx.w'' file to test
for its existance.
Also notice that i corrected the single symbol left recursion: i just bypass
trying to draw it as it is pathological.\fbreak
|RA| $\rightarrow$ $\alpha_{\epsilon}$ |RA| $\beta_{\epsilon}$ \fbreak
@/
fsm
(fsm-id "TS_path1.lex",fsm-filename TS_path1
,fsm-namespace NS_TS_path1
,fsm-class CTS_path1
,fsm-version "1.0" ,fsm-date "17 Juin 2003",fsm-debug "true"
,fsm-comments "Pathological grammar -- does not derives a terminal string")
@"/usr/local/yacco2/compiler/grammars/yacco2_T_includes.T"
rules{
Rstart AD AB(){
-> RA
}
RA AD AB()
{
-> RA
}
}// end of rules
|