diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /web/yacco2/qa/lr1_sp5.lex |
Initial commit
Diffstat (limited to 'web/yacco2/qa/lr1_sp5.lex')
-rw-r--r-- | web/yacco2/qa/lr1_sp5.lex | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/web/yacco2/qa/lr1_sp5.lex b/web/yacco2/qa/lr1_sp5.lex new file mode 100644 index 0000000000..c0f870d554 --- /dev/null +++ b/web/yacco2/qa/lr1_sp5.lex @@ -0,0 +1,53 @@ +/* +$echo FILE:{ LR1_sp5.lex +$echo A LR1 GRAMMAR FROM +$echo FULL LR(1) PARSER GENERATION +$echo BY DAVID SPECTOR +$echo P. 62 GRAMMAR G2 +$echo SIGPLAN VOL 16 NO 8 AUG 1981 +$echo Okay +*/ +/@ +@** |lr1_sp5| grammar.\fbreak + A LR1 GRAMMAR FROM + DAVID SPECTOR + SIGPLAN VOL 23 NO 12 DEC/88 +@/ +fsm (fsm-id "lr1_sp5.lex",fsm-filename LR1_sp5,fsm-namespace NS_LR1_sp5 + ,fsm-class Clr1_sp5_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_sp5(){ + -> RS eog + } + + RS(){ + -> a b RA RE + -> a b RB x + -> a RD + -> RA z + -> RB x + } + + RA(){ + -> d + } + + RB(){ + -> d + } + + RD(){ + -> f RA + -> f RB x + -> f a RD + } + + RE(){ + -> + -> z + } +} // end of grammar |