diff options
Diffstat (limited to 'web/yacco2/qa/TS_pathsp2.lex')
-rw-r--r-- | web/yacco2/qa/TS_pathsp2.lex | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/web/yacco2/qa/TS_pathsp2.lex b/web/yacco2/qa/TS_pathsp2.lex new file mode 100644 index 0000000000..899a5a6e63 --- /dev/null +++ b/web/yacco2/qa/TS_pathsp2.lex @@ -0,0 +1,82 @@ +/* +$echo FILE: TS_pathSP2.lex +$echo Copy of lr1_sp2.lex modified to show not lr(1) +$echo Test on common closure state but vector y for RE not lr1 +$echo Merge into own closure gened state. so stop gening +$echo A LR1 GRAMMAR FROM +$echo DAVID SPECTOR +$echo SIGPLAN VOL 23 DEC/88 +$echo Not lr1 +*/ +/@ +@** |LR1_SP2| grammar.\fbreak + A LR1 GRAMMAR FROM + DAVID SPECTOR + SIGPLAN VOL 23 NO 12 DEC/88 +@/ +fsm (fsm-id "lr1_sp2.lex",fsm-filename lr1_sp2,fsm-namespace NS_lr1_sp2 + ,fsm-class Clr1_sp2_fsm + ,fsm-version "1.0",fsm-date "8-oct-96" + ,fsm-debug "true",fsm-comments "test out lr1") +@"/usr/local/yacco2/compiler/grammars/yacco2_T_includes.T" +rules +{ + Rlr1_sp2(){ + -> RS eog + } + + RS(){ + -> t RE a + -> t RF b + -> t RG c + -> t RH d + -> u RE b + -> u RF c + -> u RG d + -> u RH a + + -> v RE c + -> v RF d + -> v RG a + -> v RH b + -> w RE d + -> w RF a + -> w RG b + -> w RH c + } + + RE(){ + -> x RA + -> y RD + } + + RF(){ + -> x RB + -> y RA + } + + RG(){ + -> x RC + -> y RB + } + + RH(){ + -> x RD + -> y RC + } + RA(){ + -> z + } + + RB(){ + -> z + } + + RC(){ + -> z + } + + RD(){ + -> z + } +} // end of grammar |