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/knu2.lex |
Initial commit
Diffstat (limited to 'web/yacco2/qa/knu2.lex')
-rw-r--r-- | web/yacco2/qa/knu2.lex | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/web/yacco2/qa/knu2.lex b/web/yacco2/qa/knu2.lex new file mode 100644 index 0000000000..12472449e5 --- /dev/null +++ b/web/yacco2/qa/knu2.lex @@ -0,0 +1,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 |