summaryrefslogtreecommitdiff
path: root/web/yacco2/qa/lr1_sp3.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_sp3.lex
Initial commit
Diffstat (limited to 'web/yacco2/qa/lr1_sp3.lex')
-rw-r--r--web/yacco2/qa/lr1_sp3.lex38
1 files changed, 38 insertions, 0 deletions
diff --git a/web/yacco2/qa/lr1_sp3.lex b/web/yacco2/qa/lr1_sp3.lex
new file mode 100644
index 0000000000..9a6902a1d6
--- /dev/null
+++ b/web/yacco2/qa/lr1_sp3.lex
@@ -0,0 +1,38 @@
+/*
+$echo FILE: LR1_SP3.lex
+$echo A LR1 GRAMMAR FROM
+$echo DAVID SPECTOR
+$echo SIGPLAN VOL 23 NO 12 DEC/88
+$echo Okay
+*/
+/@
+@** |lr1_sp3| grammar.\fbreak
+ A LR1 GRAMMAR FROM
+ DAVID SPECTOR
+ SIGPLAN VOL 23 NO 12 DEC/88
+@/
+fsm (fsm-id "lr1_sp3.lex",fsm-filename lr1_sp3,fsm-namespace NS_lr1_sp3
+ ,fsm-class Clr1_sp3,fsm-version "1.0",fsm-date "27-jun-99"
+ ,fsm-debug "true",fsm-comments "test out lr1 --- D Spector Vol 23 No 12 Dec/88")
+@"/usr/local/yacco2/compiler/grammars/yacco2_T_includes.T"
+rules
+{
+Rlr1_sp3 (){
+ -> RS eog
+ }
+
+ RS (){
+ -> RA b
+ -> RB c
+ }
+
+ RA (){
+ -> a RA c
+ -> a
+ }
+
+ RB (){
+ -> a RB b
+ -> a
+ }
+} // end of grammar