diff options
Diffstat (limited to 'web/yacco2/grammar-testsuite/km_1.lex')
-rw-r--r-- | web/yacco2/grammar-testsuite/km_1.lex | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/web/yacco2/grammar-testsuite/km_1.lex b/web/yacco2/grammar-testsuite/km_1.lex new file mode 100644 index 0000000000..90b1adaad1 --- /dev/null +++ b/web/yacco2/grammar-testsuite/km_1.lex @@ -0,0 +1,41 @@ +/* +Author: Dave Bone +FILE: km_1.lex +Date: 7 mar 2014 +Purpose: Test out compiler/compiler with Kristensen and Madsen grammar - lalr resolution +*/ +/@ +@** Kristensen and Madsen Grammar.\fbreak +Bent Bruun Kristensen and Ole Lehrmann Madsen\fbreak +Correspondence ACM Sigplan Notices, 19(8), August 1984.\fbreak +Test out LALR(1) resolution. +@/ +fsm +(fsm-id "km_1.lex",fsm-filename km_1,fsm-namespace NS_km_1 +,fsm-class Ckm_1 +,fsm-version "1.0",fsm-date "7 mar 2014",fsm-debug "false" +,fsm-comments "Test out LALR(1) resolution.") +@"/usr/local/yacco2/compiler/grammars/yacco2_T_includes.T" + +rules{ +Rs(){ + -> Re eog +} + +Re(){ + -> Ra a + -> Rb b + -> u Ra b + -> u Rb a +} + +Ra(){ + -> x y z Ra + -> x q +} + +Rb(){ + -> x y z Rb + -> x q +} +} |