summaryrefslogtreecommitdiff
path: root/web/yacco2/qa/lr1_sp2.lex
diff options
context:
space:
mode:
Diffstat (limited to 'web/yacco2/qa/lr1_sp2.lex')
-rw-r--r--web/yacco2/qa/lr1_sp2.lex78
1 files changed, 78 insertions, 0 deletions
diff --git a/web/yacco2/qa/lr1_sp2.lex b/web/yacco2/qa/lr1_sp2.lex
new file mode 100644
index 0000000000..1e158949a7
--- /dev/null
+++ b/web/yacco2/qa/lr1_sp2.lex
@@ -0,0 +1,78 @@
+/*
+$echo FILE: LR1_SP2.lex
+$echo A LR1 GRAMMAR FROM
+$echo DAVID SPECTOR
+$echo SIGPLAN VOL 23 DEC/88
+$echo Okay
+*/
+/@
+@** |LR1_SP2| grammar.\fbreak
+ A LR1 GRAMMAR FROM
+ DAVID SPECTOR
+ SIGPLAN VOL 23 NO 12 DEC/88
+@/
+fsm (fsm-id "lr1_sp2.lex",fsm-filename lr1_sp2,fsm-namespace NS_lr1_sp2
+ ,fsm-class Clr1_sp2_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_sp2(){
+ -> RS eog
+ }
+
+ RS(){
+ -> t RE a
+ -> t RF b
+ -> t RG c
+ -> t RH d
+ -> u RE b
+ -> u RF c
+ -> u RG d
+ -> u RH a
+ -> v RE c
+ -> v RF d
+ -> v RG a
+ -> v RH b
+ -> w RE d
+ -> w RF a
+ -> w RG b
+ -> w RH c
+ }
+
+ RE(){
+ -> x RA
+ -> y RD
+ }
+
+ RF(){
+ -> x RB
+ -> y RA
+ }
+
+ RG(){
+ -> x RC
+ -> y RB
+ }
+
+ RH(){
+ -> x RD
+ -> y RC
+ }
+ RA(){
+ -> z
+ }
+
+ RB(){
+ -> z
+ }
+
+ RC(){
+ -> z
+ }
+
+ RD(){
+ -> z
+ }
+} // end of grammar