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/grammar-testsuite/dp_2.lex |
Initial commit
Diffstat (limited to 'web/yacco2/grammar-testsuite/dp_2.lex')
-rw-r--r-- | web/yacco2/grammar-testsuite/dp_2.lex | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/web/yacco2/grammar-testsuite/dp_2.lex b/web/yacco2/grammar-testsuite/dp_2.lex new file mode 100644 index 0000000000..822b88fb8c --- /dev/null +++ b/web/yacco2/grammar-testsuite/dp_2.lex @@ -0,0 +1,46 @@ +/* +Author: Dave Bone +FILE: dp_2.lex +Date: 7 mar 2014 +Purpose: Test out compiler/compiler with Deremer and Pennello lair grammar page 633 +*/ +/@ +@** Deremer and Pennello page 633 Lalr(0) Grammar.\fbreak +Efficient Computation of LALR(1) Look-Ahead Sets\fbreak +ACM Transactions on Programming Languages and Systems, 4(4):615—649, 1982\fbreak +@/ +fsm +(fsm-id "dp_2.lex",fsm-filename dp_2,fsm-namespace NS_dp_2 +,fsm-class Cdp_2 +,fsm-version "1.0",fsm-date "7 mar 2014",fsm-debug "false" +,fsm-comments "LR(0) Deremer and Pennello grammar from page 633.") +@"/usr/local/yacco2/compiler/grammars/yacco2_T_includes.T" + +rules{ +Rs(){ + -> Rs1 eog +} + +Rs1(){ + -> c d + -> a Rb d + -> Rc Rb g +} + +Rb(){ + -> Rd Re +} + +Rc(){ + -> c +} + +Rd(){ + -> +} + +Re(){ + -> +} +} + |