summaryrefslogtreecommitdiff
path: root/web/yacco2/qa/lr1_sp4.lex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /web/yacco2/qa/lr1_sp4.lex
Initial commit
Diffstat (limited to 'web/yacco2/qa/lr1_sp4.lex')
-rw-r--r--web/yacco2/qa/lr1_sp4.lex41
1 files changed, 41 insertions, 0 deletions
diff --git a/web/yacco2/qa/lr1_sp4.lex b/web/yacco2/qa/lr1_sp4.lex
new file mode 100644
index 0000000000..3eebc14660
--- /dev/null
+++ b/web/yacco2/qa/lr1_sp4.lex
@@ -0,0 +1,41 @@
+/*
+$echo FILE: LR1_sp4.lex
+$echo A LR1 GRAMMAR FROM
+$echo FULL LR(1) PARSER GENERATOR
+$echo BY DAVID SPECTOR
+$echo SIGPLAN VOL 16 NO 8 AUG 1981
+$echo G1 P. 61
+$echo Okay
+*/
+/@
+@** |LR1_sp4| grammar.\fbreak
+ A LR1 GRAMMAR FROM
+ DAVID SPECTOR
+ SIGPLAN VOL 23 NO 12 DEC/88
+@/
+fsm (fsm-id "lr1_sp4.lex",fsm-filename LR1_sp4,fsm-namespace NS_LR1_sp4
+ ,fsm-class Clr1_sp4_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_sp4(){
+ -> RS eog
+ }
+
+ RS(){
+ -> a RA c
+ -> a RB d
+ -> b RA d
+ -> b RB c
+ }
+
+ RA(){
+ -> f
+ }
+
+ RB(){
+ -> f
+ }
+} // end of grammar