diff options
Diffstat (limited to 'web/yacco2/qa/pathological.lex')
-rw-r--r-- | web/yacco2/qa/pathological.lex | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/web/yacco2/qa/pathological.lex b/web/yacco2/qa/pathological.lex new file mode 100644 index 0000000000..0c93754e23 --- /dev/null +++ b/web/yacco2/qa/pathological.lex @@ -0,0 +1,77 @@ +/* +$echo FILE: pathological.lex +$echo Purpose: Rules that do no derive T strings +$echo Error +*/ +/@ +@** pathological Grammar.\fbreak +Test on the variants on pathological grammars.\fbreak +RA,RB,RD,RF are variants on rules not deriving ${^* \Rightarrow}$ t. +@/ +fsm +(fsm-id "pathological.lex",fsm-filename pathological,fsm-namespace NS_pathological +,fsm-class Cpathological +,fsm-version "1.0",fsm-date "24 Mar. 2006",fsm-debug "true" +,fsm-comments "pathological grammar") +@"/usr/local/yacco2/compiler/grammars/yacco2_T_includes.T" + +/@ +@** Rules.\fbreak +@/ +rules{ +Rstart AD AB(){ + -> RA eog + -> RB eog + -> RD eog + -> RF eog +} + +/@ +@** |RA| rule.\fbreak +Call self. +@/ +RA AD AB() +{ + -> RA +} + +/@ +@** |RB| rule.\fbreak +Indirect call on self. +@/ + +RB AD AB() +{ + -> RC +} +RC AD AB() +{ + -> RB +} + +/@ +@** |RD| rule.\fbreak +${\alpha}${} ${^* \Rightarrow}${} ${\epsilon}${} with right recursion. +@/ +RD AD AB() +{ + -> RE RD +} +RE AD AB() +{ + -> +} +/@ +@** |RF| rule.\fbreak +${\alpha}${} ${^+ \Rightarrow}${} ${1}${} with right recursion. +@/ + +RF AD AB() +{ + -> RG RF +} +RG AD AB() +{ + -> 1 +} +}// end of rules |