summaryrefslogtreecommitdiff
path: root/src/GF/JavaScript
diff options
context:
space:
mode:
authorbringert <bringert@cs.chalmers.se>2006-12-20 20:10:15 +0000
committerbringert <bringert@cs.chalmers.se>2006-12-20 20:10:15 +0000
commitf9621483a0caeb49512bf4d15420bd05ea57cb22 (patch)
tree44e21f8e2fd66b9f53f9a312ddde52bdab0fc4df /src/GF/JavaScript
parentc7df9f4167f7b554a93a216245a013e16cca420d (diff)
Use LCLR algorithm for eliminating left-recursion, with lambda terms in SISR for getting trees right.
Diffstat (limited to 'src/GF/JavaScript')
-rw-r--r--src/GF/JavaScript/AbsJS.hs1
-rw-r--r--src/GF/JavaScript/JS.cf4
-rw-r--r--src/GF/JavaScript/LexJS.hs10
-rw-r--r--src/GF/JavaScript/Makefile14
-rw-r--r--src/GF/JavaScript/ParJS.hs448
-rw-r--r--src/GF/JavaScript/ParJS.y2
-rw-r--r--src/GF/JavaScript/PrintJS.hs5
-rw-r--r--src/GF/JavaScript/SkelJS.hs1
8 files changed, 321 insertions, 164 deletions
diff --git a/src/GF/JavaScript/AbsJS.hs b/src/GF/JavaScript/AbsJS.hs
index 843180835..932ab2380 100644
--- a/src/GF/JavaScript/AbsJS.hs
+++ b/src/GF/JavaScript/AbsJS.hs
@@ -44,5 +44,6 @@ data Expr =
| ENull
| EThis
| EFun [Ident] [Stmt]
+ | ESeq [Expr]
deriving (Eq,Ord,Show)
diff --git a/src/GF/JavaScript/JS.cf b/src/GF/JavaScript/JS.cf
index 6f5c7481e..47017ecf7 100644
--- a/src/GF/JavaScript/JS.cf
+++ b/src/GF/JavaScript/JS.cf
@@ -39,6 +39,10 @@ ENull. Expr16 ::= "null" ;
EThis. Expr16 ::= "this" ;
EFun. Expr16 ::= "function" "(" [Ident] ")" "{" [Stmt] "}" ;
+eseq1. Expr16 ::= "(" Expr "," [Expr] ")";
+internal ESeq. Expr16 ::= "(" [Expr] ")" ;
+define eseq1 x xs = ESeq (x:xs);
+
separator Expr "," ;
coercions Expr 16 ;
diff --git a/src/GF/JavaScript/LexJS.hs b/src/GF/JavaScript/LexJS.hs
index 12178afe6..e7629bf6a 100644
--- a/src/GF/JavaScript/LexJS.hs
+++ b/src/GF/JavaScript/LexJS.hs
@@ -1,5 +1,5 @@
{-# OPTIONS -fglasgow-exts -cpp #-}
-{-# LINE 3 "GF/JavaScript/LexJS.x" #-}
+{-# LINE 3 "LexJS.x" #-}
{-# OPTIONS -fno-warn-incomplete-patterns #-}
module GF.JavaScript.LexJS where
@@ -27,16 +27,16 @@ alex_base :: AlexAddr
alex_base = AlexA# "\xf8\xff\xff\xff\xfd\xff\xff\xff\x02\x00\x00\x00\x00\x00\x00\x00\xc8\x00\x00\x00\x00\x00\x00\x00\x73\x00\x00\x00\x01\x01\x00\x00\x4e\x00\x00\x00\x13\x01\x00\x00\x58\x00\x00\x00\x66\x00\x00\x00\x70\x00\x00\x00\x7d\x00\x00\x00"#
alex_table :: AlexAddr
-alex_table = AlexA# "\x00\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x06\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x03\x00\x03\x00\x02\x00\x00\x00\x03\x00\x00\x00\x03\x00\x00\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x03\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x03\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\xff\xff\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x05\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0c\x00\x00\x00\x00\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x00\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x07\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x06\x00\x00\x00\x00\x00\x00\x00\x04\x00\x06\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x00\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x00\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
+alex_table = AlexA# "\x00\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x06\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x03\x00\x03\x00\x02\x00\x00\x00\x03\x00\x00\x00\x03\x00\x00\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x00\x00\x03\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x03\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x03\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\xff\xff\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x08\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x05\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0c\x00\x00\x00\x00\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x00\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x07\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x06\x00\x00\x00\x00\x00\x00\x00\x04\x00\x06\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x00\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x00\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
alex_check :: AlexAddr
-alex_check = AlexA# "\xff\xff\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\x20\x00\xff\xff\xff\xff\x28\x00\x29\x00\x20\x00\xff\xff\x2c\x00\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\xff\xff\x5d\x00\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\x7d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\x0a\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x22\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\x5c\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\x27\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x22\x00\xff\xff\xff\xff\xff\xff\x5f\x00\x27\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xff\xff\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xff\xff\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#
+alex_check = AlexA# "\xff\xff\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x22\x00\xff\xff\xff\xff\x20\x00\xff\xff\xff\xff\x28\x00\x29\x00\x20\x00\xff\xff\x2c\x00\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\xff\xff\x3d\x00\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\xff\xff\x5d\x00\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\x7d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\x0a\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x22\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\x5c\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\x27\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x22\x00\xff\xff\xff\xff\xff\xff\x5f\x00\x27\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xff\xff\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xff\xff\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#
alex_deflt :: AlexAddr
alex_deflt = AlexA# "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x06\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#
alex_accept = listArray (0::Int,13) [[],[],[(AlexAccSkip)],[(AlexAcc (alex_action_1))],[(AlexAcc (alex_action_2))],[(AlexAcc (alex_action_3))],[],[],[(AlexAcc (alex_action_4))],[(AlexAcc (alex_action_5))],[(AlexAcc (alex_action_5))],[],[],[]]
-{-# LINE 32 "GF/JavaScript/LexJS.x" #-}
+{-# LINE 32 "LexJS.x" #-}
tok f p s = f p s
@@ -84,7 +84,7 @@ eitherResIdent tv s = treeFind resWords
| s > a = treeFind right
| s == a = t
-resWords = b "null" (b "function" (b "false" N N) (b "new" N N)) (b "this" (b "return" N N) (b "true" N N))
+resWords = b "return" (b "new" (b "function" (b "false" N N) N) (b "null" N N)) (b "true" (b "this" N N) (b "var" N N))
where b s = B s (TS s)
unescapeInitTail :: String -> String
diff --git a/src/GF/JavaScript/Makefile b/src/GF/JavaScript/Makefile
new file mode 100644
index 000000000..10f867b06
--- /dev/null
+++ b/src/GF/JavaScript/Makefile
@@ -0,0 +1,14 @@
+all:
+ happy -gca ParJS.y
+ alex -g LexJS.x
+
+bnfc:
+ (cd ../.. && bnfc -p GF.JavaScript GF/JavaScript/JS.cf)
+ -rm -f *.bak
+
+clean:
+ -rm -f *.log *.aux *.hi *.o *.dvi
+ -rm -f DocJS.ps
+distclean: clean
+ -rm -f DocJS.* LexJS.* ParJS.* LayoutJS.* SkelJS.* PrintJS.* TestJS.* AbsJS.* TestJS ErrM.* SharedString.* JS.dtd XMLJS.* Makefile*
+
diff --git a/src/GF/JavaScript/ParJS.hs b/src/GF/JavaScript/ParJS.hs
index 7265740f1..13726b1bf 100644
--- a/src/GF/JavaScript/ParJS.hs
+++ b/src/GF/JavaScript/ParJS.hs
@@ -78,28 +78,28 @@ happyIn13 x = unsafeCoerce# x
happyOut13 :: (HappyAbsSyn ) -> ([Stmt])
happyOut13 x = unsafeCoerce# x
{-# INLINE happyOut13 #-}
-happyIn14 :: (Expr) -> (HappyAbsSyn )
+happyIn14 :: (DeclOrExpr) -> (HappyAbsSyn )
happyIn14 x = unsafeCoerce# x
{-# INLINE happyIn14 #-}
-happyOut14 :: (HappyAbsSyn ) -> (Expr)
+happyOut14 :: (HappyAbsSyn ) -> (DeclOrExpr)
happyOut14 x = unsafeCoerce# x
{-# INLINE happyOut14 #-}
-happyIn15 :: (Expr) -> (HappyAbsSyn )
+happyIn15 :: (DeclVar) -> (HappyAbsSyn )
happyIn15 x = unsafeCoerce# x
{-# INLINE happyIn15 #-}
-happyOut15 :: (HappyAbsSyn ) -> (Expr)
+happyOut15 :: (HappyAbsSyn ) -> (DeclVar)
happyOut15 x = unsafeCoerce# x
{-# INLINE happyOut15 #-}
-happyIn16 :: (Expr) -> (HappyAbsSyn )
+happyIn16 :: ([DeclVar]) -> (HappyAbsSyn )
happyIn16 x = unsafeCoerce# x
{-# INLINE happyIn16 #-}
-happyOut16 :: (HappyAbsSyn ) -> (Expr)
+happyOut16 :: (HappyAbsSyn ) -> ([DeclVar])
happyOut16 x = unsafeCoerce# x
{-# INLINE happyOut16 #-}
-happyIn17 :: ([Expr]) -> (HappyAbsSyn )
+happyIn17 :: (Expr) -> (HappyAbsSyn )
happyIn17 x = unsafeCoerce# x
{-# INLINE happyIn17 #-}
-happyOut17 :: (HappyAbsSyn ) -> ([Expr])
+happyOut17 :: (HappyAbsSyn ) -> (Expr)
happyOut17 x = unsafeCoerce# x
{-# INLINE happyOut17 #-}
happyIn18 :: (Expr) -> (HappyAbsSyn )
@@ -120,10 +120,10 @@ happyIn20 x = unsafeCoerce# x
happyOut20 :: (HappyAbsSyn ) -> (Expr)
happyOut20 x = unsafeCoerce# x
{-# INLINE happyOut20 #-}
-happyIn21 :: (Expr) -> (HappyAbsSyn )
+happyIn21 :: ([Expr]) -> (HappyAbsSyn )
happyIn21 x = unsafeCoerce# x
{-# INLINE happyIn21 #-}
-happyOut21 :: (HappyAbsSyn ) -> (Expr)
+happyOut21 :: (HappyAbsSyn ) -> ([Expr])
happyOut21 x = unsafeCoerce# x
{-# INLINE happyOut21 #-}
happyIn22 :: (Expr) -> (HappyAbsSyn )
@@ -186,6 +186,24 @@ happyIn31 x = unsafeCoerce# x
happyOut31 :: (HappyAbsSyn ) -> (Expr)
happyOut31 x = unsafeCoerce# x
{-# INLINE happyOut31 #-}
+happyIn32 :: (Expr) -> (HappyAbsSyn )
+happyIn32 x = unsafeCoerce# x
+{-# INLINE happyIn32 #-}
+happyOut32 :: (HappyAbsSyn ) -> (Expr)
+happyOut32 x = unsafeCoerce# x
+{-# INLINE happyOut32 #-}
+happyIn33 :: (Expr) -> (HappyAbsSyn )
+happyIn33 x = unsafeCoerce# x
+{-# INLINE happyIn33 #-}
+happyOut33 :: (HappyAbsSyn ) -> (Expr)
+happyOut33 x = unsafeCoerce# x
+{-# INLINE happyOut33 #-}
+happyIn34 :: (Expr) -> (HappyAbsSyn )
+happyIn34 x = unsafeCoerce# x
+{-# INLINE happyIn34 #-}
+happyOut34 :: (HappyAbsSyn ) -> (Expr)
+happyOut34 x = unsafeCoerce# x
+{-# INLINE happyOut34 #-}
happyInTok :: Token -> (HappyAbsSyn )
happyInTok x = unsafeCoerce# x
{-# INLINE happyInTok #-}
@@ -194,21 +212,21 @@ happyOutTok x = unsafeCoerce# x
{-# INLINE happyOutTok #-}
happyActOffsets :: HappyAddr
-happyActOffsets = HappyA# "\x00\x00\x68\x00\x00\x00\x62\x00\xdc\x00\x00\x00\x00\x00\x00\x00\x65\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\x00\x00\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\xda\x00\x00\x00\x00\x00\x4b\x00\x59\x00\x57\x00\x00\x00\xb5\x00\xc2\x00\xb5\x00\x36\x00\x00\x00\x3f\x00\x3d\x00\x00\x00\xb5\x00\x3b\x00\x3c\x00\x3a\x00\x15\x00\x23\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00"#
+happyActOffsets = HappyA# "\x00\x00\x76\x00\x00\x00\x70\x00\x78\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x00\x00\x00\x9a\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x01\x00\x00\x00\x00\x11\x00\x73\x00\x00\x00\x8e\x01\x00\x00\x00\x00\x73\x00\x00\x00\x00\x00\x00\x00\x99\x00\x82\x00\x00\x00\x7f\x00\x00\x00\x83\x00\x81\x00\x69\x00\x56\x00\x62\x01\x05\x00\x9c\x01\x56\x00\x9c\x01\x9c\x01\x00\x00\x00\x00\x59\x00\x00\x00\x66\x00\x7e\x00\x00\x00\x9c\x01\x00\x00\x00\x00\x7c\x00\x65\x00\x35\x00\x9c\x01\x00\x00\x35\x00\x9c\x01\x00\x00\x00\x00\x64\x00\x63\x00\x61\x00\x34\x00\x60\x00\x9c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x46\x00\x00\x00\x00\x00\x4c\x01\x00\x00\x36\x01\x00\x00\x00\x00"#
happyGotoOffsets :: HappyAddr
-happyGotoOffsets = HappyA# "\x1e\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x1a\x00\x21\x00\x8d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x71\x00\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\xff\x00\x00\x00\x00\x77\x00\x00\x00\x00\x00\x00\x00\x39\x00\xd7\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xfd\xff\x00\x00\x00\x00"#
+happyGotoOffsets = HappyA# "\x23\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x01\x3d\x00\x00\x00\x45\x00\x31\x00\x00\x00\xf9\x00\x00\x00\x00\x00\xbb\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x20\x00\x00\x00\x9c\x00\x2b\x00\xda\x00\xb3\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x5e\x00\x00\x00\xae\x01\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x00\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d\x00\x00\x00\x00\x00\xff\xff\x20\x00\x00\x00\x20\x00\x00\x00\x00\x00"#
happyDefActions :: HappyAddr
-happyDefActions = HappyA# "\xf7\xff\x00\x00\xfe\xff\x00\x00\xfa\xff\xf6\xff\xf8\xff\xef\xff\x00\x00\x00\x00\xe7\xff\xe6\xff\xe5\xff\xe4\xff\xce\xff\xec\xff\xe8\xff\x00\x00\xdb\xff\xda\xff\xd9\xff\xd8\xff\xd7\xff\xd6\xff\xd5\xff\xd4\xff\xd3\xff\xd2\xff\xd1\xff\xd0\xff\xcf\xff\x00\x00\xf1\xff\xe2\xff\x00\x00\xe1\xff\xe0\xff\xe3\xff\xfd\xff\xfc\xff\xfb\xff\x00\x00\x00\x00\xee\xff\xf2\xff\xf5\xff\x00\x00\x00\x00\xf0\xff\xde\xff\x00\x00\x00\x00\x00\x00\xeb\xff\x00\x00\xdd\xff\xdf\xff\xde\xff\xf4\xff\x00\x00\x00\x00\xf5\xff\x00\x00\xde\xff\xe9\xff\xea\xff\xdc\xff\xed\xff\xf3\xff\xef\xff\x00\x00\xf9\xff"#
+happyDefActions = HappyA# "\xf7\xff\x00\x00\xfe\xff\x00\x00\xfa\xff\xdd\xff\xdc\xff\xdb\xff\xda\xff\xf6\xff\xf8\xff\x00\x00\xc3\xff\xe4\xff\xe2\xff\xde\xff\xeb\xff\xcf\xff\xce\xff\xcd\xff\xcc\xff\xcb\xff\xca\xff\xc9\xff\xc8\xff\xc7\xff\xc6\xff\xc5\xff\xc4\xff\x00\x00\xee\xff\xd8\xff\x00\x00\x00\x00\xd7\xff\x00\x00\xd6\xff\xd9\xff\xe8\xff\xfd\xff\xfc\xff\xfb\xff\xea\xff\xe7\xff\xec\xff\x00\x00\xf1\xff\x00\x00\x00\x00\x00\x00\xf5\xff\x00\x00\x00\x00\xd2\xff\x00\x00\x00\x00\x00\x00\xef\xff\xe5\xff\x00\x00\xe1\xff\x00\x00\xd1\xff\xd3\xff\xd2\xff\xed\xff\xf2\xff\xf4\xff\x00\x00\xf5\xff\xd2\xff\xf0\xff\xe8\xff\x00\x00\xe9\xff\xe6\xff\x00\x00\x00\x00\x00\x00\xf5\xff\x00\x00\xd2\xff\xdf\xff\xe0\xff\xd0\xff\xd4\xff\xf3\xff\xee\xff\x00\x00\xe3\xff\xee\xff\x00\x00\xd5\xff\x00\x00\xf9\xff"#
happyCheck :: HappyAddr
-happyCheck = HappyA# "\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\x08\x00\x08\x00\x05\x00\x09\x00\x00\x00\x08\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x01\x00\x02\x00\x03\x00\x00\x00\x04\x00\x09\x00\x06\x00\x02\x00\x11\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x01\x00\x02\x00\x03\x00\x03\x00\x02\x00\x09\x00\x05\x00\x02\x00\x05\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x01\x00\x02\x00\x03\x00\x02\x00\x01\x00\x00\x00\x11\x00\x01\x00\x11\x00\x0a\x00\x0b\x00\x0c\x00\x07\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x01\x00\x02\x00\x03\x00\x06\x00\x11\x00\x00\x00\x16\x00\x11\x00\xff\xff\x0a\x00\x0b\x00\x0c\x00\x07\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x0b\x00\x0c\x00\xff\xff\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x01\x00\x01\x00\xff\xff\xff\xff\xff\xff\x06\x00\xff\xff\x07\x00\x08\x00\x0a\x00\xff\xff\x0c\x00\x0d\x00\x01\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\xff\xff\xff\xff\x0a\x00\xff\xff\x0c\x00\x0d\x00\x01\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\x0d\x00\xff\xff\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x00\x00\x01\x00\x02\x00\x03\x00\x03\x00\x04\x00\x03\x00\x04\x00\x03\x00\xff\xff\xff\xff\xff\xff\x0c\x00\xff\xff\xff\xff\x0e\x00\x0b\x00\x0e\x00\xff\xff\x0e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#
+happyCheck = HappyA# "\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\x01\x00\x05\x00\x02\x00\x09\x00\x08\x00\x05\x00\x0a\x00\x08\x00\x09\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x01\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x03\x00\x13\x00\x00\x00\x09\x00\x04\x00\x08\x00\x06\x00\x0a\x00\x00\x00\x07\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x00\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x03\x00\x00\x00\x00\x00\x00\x00\x09\x00\x13\x00\x13\x00\x03\x00\x07\x00\x07\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x03\x00\x02\x00\x0a\x00\x03\x00\x02\x00\x02\x00\x02\x00\x02\x00\x13\x00\x01\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x03\x00\x05\x00\x01\x00\x05\x00\x01\x00\x06\x00\x13\x00\x05\x00\x18\x00\x13\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x03\x00\x07\x00\x07\x00\xff\xff\x06\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x01\x00\xff\xff\x03\x00\x04\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x01\x00\xff\xff\x03\x00\x04\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x01\x00\xff\xff\x03\x00\x04\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x01\x00\xff\xff\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x01\x00\xff\xff\xff\xff\xff\xff\xff\xff\x06\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x01\x00\x10\x00\x11\x00\xff\xff\x13\x00\x14\x00\x15\x00\x16\x00\xff\xff\xff\xff\x0b\x00\x0c\x00\x0d\x00\x0e\x00\xff\xff\x10\x00\x11\x00\x00\x00\x13\x00\x14\x00\x15\x00\x16\x00\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\x0b\x00\x0c\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\xff\xff\x0b\x00\x0c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#
happyTable :: HappyAddr
-happyTable = HappyA# "\x00\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x2b\x00\x2b\x00\x05\x00\x46\x00\x2e\x00\x06\x00\x0e\x00\x0f\x00\x10\x00\x42\x00\x37\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x29\x00\x03\x00\x2a\x00\x04\x00\x44\x00\x03\x00\x0e\x00\x0f\x00\x10\x00\x3e\x00\x37\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x46\x00\x3d\x00\x42\x00\x3e\x00\x41\x00\x40\x00\x0e\x00\x0f\x00\x10\x00\x36\x00\x37\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x39\x00\x3a\x00\x3a\x00\x03\x00\x2e\x00\x03\x00\x0e\x00\x0f\x00\x10\x00\x44\x00\x34\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x31\x00\x03\x00\x3a\x00\xff\xff\x03\x00\x00\x00\x0e\x00\x0f\x00\x10\x00\x3b\x00\x2f\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x10\x00\x00\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x20\x00\x32\x00\x00\x00\x00\x00\x00\x00\x21\x00\x00\x00\x33\x00\x34\x00\x22\x00\x00\x00\x23\x00\x24\x00\x20\x00\x25\x00\x26\x00\x03\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x22\x00\x00\x00\x23\x00\x24\x00\x20\x00\x25\x00\x26\x00\x03\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x22\x00\x00\x00\x00\x00\x24\x00\x00\x00\x25\x00\x26\x00\x03\x00\x27\x00\x28\x00\x29\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x08\x00\x48\x00\x08\x00\x2d\x00\x08\x00\x00\x00\x00\x00\x00\x00\x35\x00\x00\x00\x00\x00\x0a\x00\x09\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
+happyTable = HappyA# "\x00\x00\x05\x00\x06\x00\x07\x00\x08\x00\x36\x00\x09\x00\x40\x00\x5d\x00\x0a\x00\x41\x00\x0b\x00\x37\x00\x38\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x33\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x05\x00\x06\x00\x07\x00\x08\x00\x03\x00\x43\x00\x5b\x00\x03\x00\x41\x00\x04\x00\x0b\x00\x3c\x00\x56\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x30\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x05\x00\x06\x00\x07\x00\x08\x00\x43\x00\x43\x00\x31\x00\x33\x00\x03\x00\x03\x00\x5b\x00\x4d\x00\x44\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x54\x00\x3e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x05\x00\x06\x00\x07\x00\x08\x00\x56\x00\x54\x00\x58\x00\x59\x00\x5a\x00\x4f\x00\x53\x00\x03\x00\x46\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x4c\x00\x3e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x05\x00\x06\x00\x07\x00\x08\x00\x50\x00\x47\x00\x52\x00\x33\x00\x48\x00\x03\x00\x49\x00\xff\xff\x03\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x50\x00\x3e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x05\x00\x06\x00\x07\x00\x08\x00\x4a\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x3d\x00\x3e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x00\x00\x4a\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x00\x00\x3b\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x00\x00\x2d\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x00\x00\x34\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1e\x00\x00\x00\x1f\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x30\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x03\x00\x28\x00\x29\x00\x2a\x00\x1e\x00\x00\x00\x1f\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x30\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x03\x00\x28\x00\x29\x00\x2a\x00\x1e\x00\x00\x00\x1f\x00\x43\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x30\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x03\x00\x28\x00\x29\x00\x2a\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x03\x00\x28\x00\x29\x00\x2a\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x30\x00\x22\x00\x23\x00\x1e\x00\x25\x00\x26\x00\x00\x00\x03\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x20\x00\x30\x00\x22\x00\x23\x00\x00\x00\x25\x00\x26\x00\x2a\x00\x03\x00\x28\x00\x29\x00\x2a\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x2b\x00\x4b\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x0d\x00\x0e\x00\x0f\x00\x00\x00\x00\x00\x2b\x00\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
-happyReduceArr = array (1, 49) [
+happyReduceArr = array (1, 60) [
(1 , happyReduce_1),
(2 , happyReduce_2),
(3 , happyReduce_3),
@@ -257,11 +275,22 @@ happyReduceArr = array (1, 49) [
(46 , happyReduce_46),
(47 , happyReduce_47),
(48 , happyReduce_48),
- (49 , happyReduce_49)
+ (49 , happyReduce_49),
+ (50 , happyReduce_50),
+ (51 , happyReduce_51),
+ (52 , happyReduce_52),
+ (53 , happyReduce_53),
+ (54 , happyReduce_54),
+ (55 , happyReduce_55),
+ (56 , happyReduce_56),
+ (57 , happyReduce_57),
+ (58 , happyReduce_58),
+ (59 , happyReduce_59),
+ (60 , happyReduce_60)
]
-happy_n_terms = 23 :: Int
-happy_n_nonterms = 28 :: Int
+happy_n_terms = 25 :: Int
+happy_n_nonterms = 31 :: Int
happyReduce_1 = happySpecReduce_1 0# happyReduction_1
happyReduction_1 happy_x_1
@@ -364,32 +393,40 @@ happyReduction_13 happy_x_3
happy_x_1
= case happyOut13 happy_x_2 of { happy_var_2 ->
happyIn12
- (Compound (reverse happy_var_2)
+ (SCompound (reverse happy_var_2)
)}
happyReduce_14 = happySpecReduce_2 8# happyReduction_14
happyReduction_14 happy_x_2
happy_x_1
= happyIn12
- (ReturnVoid
+ (SReturnVoid
)
happyReduce_15 = happySpecReduce_3 8# happyReduction_15
happyReduction_15 happy_x_3
happy_x_2
happy_x_1
- = case happyOut18 happy_x_2 of { happy_var_2 ->
+ = case happyOut22 happy_x_2 of { happy_var_2 ->
happyIn12
- (Return happy_var_2
+ (SReturn happy_var_2
)}
-happyReduce_16 = happySpecReduce_0 9# happyReduction_16
-happyReduction_16 = happyIn13
+happyReduce_16 = happySpecReduce_2 8# happyReduction_16
+happyReduction_16 happy_x_2
+ happy_x_1
+ = case happyOut14 happy_x_1 of { happy_var_1 ->
+ happyIn12
+ (SDeclOrExpr happy_var_1
+ )}
+
+happyReduce_17 = happySpecReduce_0 9# happyReduction_17
+happyReduction_17 = happyIn13
([]
)
-happyReduce_17 = happySpecReduce_2 9# happyReduction_17
-happyReduction_17 happy_x_2
+happyReduce_18 = happySpecReduce_2 9# happyReduction_18
+happyReduction_18 happy_x_2
happy_x_1
= case happyOut13 happy_x_1 of { happy_var_1 ->
case happyOut12 happy_x_2 of { happy_var_2 ->
@@ -397,250 +434,342 @@ happyReduction_17 happy_x_2
(flip (:) happy_var_1 happy_var_2
)}}
-happyReduce_18 = happyReduce 5# 10# happyReduction_18
-happyReduction_18 (happy_x_5 `HappyStk`
+happyReduce_19 = happySpecReduce_2 10# happyReduction_19
+happyReduction_19 happy_x_2
+ happy_x_1
+ = case happyOut16 happy_x_2 of { happy_var_2 ->
+ happyIn14
+ (Decl happy_var_2
+ )}
+
+happyReduce_20 = happySpecReduce_1 10# happyReduction_20
+happyReduction_20 happy_x_1
+ = case happyOut22 happy_x_1 of { happy_var_1 ->
+ happyIn14
+ (DExpr happy_var_1
+ )}
+
+happyReduce_21 = happySpecReduce_1 11# happyReduction_21
+happyReduction_21 happy_x_1
+ = case happyOut4 happy_x_1 of { happy_var_1 ->
+ happyIn15
+ (DVar happy_var_1
+ )}
+
+happyReduce_22 = happySpecReduce_3 11# happyReduction_22
+happyReduction_22 happy_x_3
+ happy_x_2
+ happy_x_1
+ = case happyOut4 happy_x_1 of { happy_var_1 ->
+ case happyOut22 happy_x_3 of { happy_var_3 ->
+ happyIn15
+ (DInit happy_var_1 happy_var_3
+ )}}
+
+happyReduce_23 = happySpecReduce_0 12# happyReduction_23
+happyReduction_23 = happyIn16
+ ([]
+ )
+
+happyReduce_24 = happySpecReduce_1 12# happyReduction_24
+happyReduction_24 happy_x_1
+ = case happyOut15 happy_x_1 of { happy_var_1 ->
+ happyIn16
+ ((:[]) happy_var_1
+ )}
+
+happyReduce_25 = happySpecReduce_3 12# happyReduction_25
+happyReduction_25 happy_x_3
+ happy_x_2
+ happy_x_1
+ = case happyOut15 happy_x_1 of { happy_var_1 ->
+ case happyOut16 happy_x_3 of { happy_var_3 ->
+ happyIn16
+ ((:) happy_var_1 happy_var_3
+ )}}
+
+happyReduce_26 = happySpecReduce_3 13# happyReduction_26
+happyReduction_26 happy_x_3
+ happy_x_2
+ happy_x_1
+ = case happyOut18 happy_x_1 of { happy_var_1 ->
+ case happyOut17 happy_x_3 of { happy_var_3 ->
+ happyIn17
+ (EAssign happy_var_1 happy_var_3
+ )}}
+
+happyReduce_27 = happySpecReduce_1 13# happyReduction_27
+happyReduction_27 happy_x_1
+ = case happyOut18 happy_x_1 of { happy_var_1 ->
+ happyIn17
+ (happy_var_1
+ )}
+
+happyReduce_28 = happyReduce 5# 14# happyReduction_28
+happyReduction_28 (happy_x_5 `HappyStk`
happy_x_4 `HappyStk`
happy_x_3 `HappyStk`
happy_x_2 `HappyStk`
happy_x_1 `HappyStk`
happyRest)
= case happyOut4 happy_x_2 of { happy_var_2 ->
- case happyOut17 happy_x_4 of { happy_var_4 ->
- happyIn14
+ case happyOut21 happy_x_4 of { happy_var_4 ->
+ happyIn18
(ENew happy_var_2 happy_var_4
) `HappyStk` happyRest}}
-happyReduce_19 = happySpecReduce_1 10# happyReduction_19
-happyReduction_19 happy_x_1
- = case happyOut15 happy_x_1 of { happy_var_1 ->
- happyIn14
+happyReduce_29 = happySpecReduce_1 14# happyReduction_29
+happyReduction_29 happy_x_1
+ = case happyOut19 happy_x_1 of { happy_var_1 ->
+ happyIn18
(happy_var_1
)}
-happyReduce_20 = happySpecReduce_3 11# happyReduction_20
-happyReduction_20 happy_x_3
+happyReduce_30 = happySpecReduce_3 15# happyReduction_30
+happyReduction_30 happy_x_3
happy_x_2
happy_x_1
- = case happyOut15 happy_x_1 of { happy_var_1 ->
- case happyOut16 happy_x_3 of { happy_var_3 ->
- happyIn15
+ = case happyOut19 happy_x_1 of { happy_var_1 ->
+ case happyOut4 happy_x_3 of { happy_var_3 ->
+ happyIn19
(EMember happy_var_1 happy_var_3
)}}
-happyReduce_21 = happyReduce 4# 11# happyReduction_21
-happyReduction_21 (happy_x_4 `HappyStk`
+happyReduce_31 = happyReduce 4# 15# happyReduction_31
+happyReduction_31 (happy_x_4 `HappyStk`
happy_x_3 `HappyStk`
happy_x_2 `HappyStk`
happy_x_1 `HappyStk`
happyRest)
- = case happyOut15 happy_x_1 of { happy_var_1 ->
- case happyOut18 happy_x_3 of { happy_var_3 ->
- happyIn15
+ = case happyOut19 happy_x_1 of { happy_var_1 ->
+ case happyOut22 happy_x_3 of { happy_var_3 ->
+ happyIn19
(EIndex happy_var_1 happy_var_3
) `HappyStk` happyRest}}
-happyReduce_22 = happyReduce 4# 11# happyReduction_22
-happyReduction_22 (happy_x_4 `HappyStk`
+happyReduce_32 = happyReduce 4# 15# happyReduction_32
+happyReduction_32 (happy_x_4 `HappyStk`
happy_x_3 `HappyStk`
happy_x_2 `HappyStk`
happy_x_1 `HappyStk`
happyRest)
- = case happyOut15 happy_x_1 of { happy_var_1 ->
- case happyOut17 happy_x_3 of { happy_var_3 ->
- happyIn15
+ = case happyOut19 happy_x_1 of { happy_var_1 ->
+ case happyOut21 happy_x_3 of { happy_var_3 ->
+ happyIn19
(ECall happy_var_1 happy_var_3
) `HappyStk` happyRest}}
-happyReduce_23 = happySpecReduce_1 11# happyReduction_23
-happyReduction_23 happy_x_1
- = case happyOut16 happy_x_1 of { happy_var_1 ->
- happyIn15
+happyReduce_33 = happySpecReduce_1 15# happyReduction_33
+happyReduction_33 happy_x_1
+ = case happyOut20 happy_x_1 of { happy_var_1 ->
+ happyIn19
(happy_var_1
)}
-happyReduce_24 = happySpecReduce_1 12# happyReduction_24
-happyReduction_24 happy_x_1
+happyReduce_34 = happySpecReduce_1 16# happyReduction_34
+happyReduction_34 happy_x_1
= case happyOut4 happy_x_1 of { happy_var_1 ->
- happyIn16
+ happyIn20
(EVar happy_var_1
)}
-happyReduce_25 = happySpecReduce_1 12# happyReduction_25
-happyReduction_25 happy_x_1
+happyReduce_35 = happySpecReduce_1 16# happyReduction_35
+happyReduction_35 happy_x_1
= case happyOut5 happy_x_1 of { happy_var_1 ->
- happyIn16
+ happyIn20
(EInt happy_var_1
)}
-happyReduce_26 = happySpecReduce_1 12# happyReduction_26
-happyReduction_26 happy_x_1
+happyReduce_36 = happySpecReduce_1 16# happyReduction_36
+happyReduction_36 happy_x_1
= case happyOut6 happy_x_1 of { happy_var_1 ->
- happyIn16
+ happyIn20
(EDbl happy_var_1
)}
-happyReduce_27 = happySpecReduce_1 12# happyReduction_27
-happyReduction_27 happy_x_1
+happyReduce_37 = happySpecReduce_1 16# happyReduction_37
+happyReduction_37 happy_x_1
= case happyOut7 happy_x_1 of { happy_var_1 ->
- happyIn16
+ happyIn20
(EStr happy_var_1
)}
-happyReduce_28 = happySpecReduce_1 12# happyReduction_28
-happyReduction_28 happy_x_1
- = happyIn16
+happyReduce_38 = happySpecReduce_1 16# happyReduction_38
+happyReduction_38 happy_x_1
+ = happyIn20
(ETrue
)
-happyReduce_29 = happySpecReduce_1 12# happyReduction_29
-happyReduction_29 happy_x_1
- = happyIn16
+happyReduce_39 = happySpecReduce_1 16# happyReduction_39
+happyReduction_39 happy_x_1
+ = happyIn20
(EFalse
)
-happyReduce_30 = happySpecReduce_1 12# happyReduction_30
-happyReduction_30 happy_x_1
- = happyIn16
+happyReduce_40 = happySpecReduce_1 16# happyReduction_40
+happyReduction_40 happy_x_1
+ = happyIn20
(ENull
)
-happyReduce_31 = happySpecReduce_1 12# happyReduction_31
-happyReduction_31 happy_x_1
- = happyIn16
+happyReduce_41 = happySpecReduce_1 16# happyReduction_41
+happyReduction_41 happy_x_1
+ = happyIn20
(EThis
)
-happyReduce_32 = happySpecReduce_3 12# happyReduction_32
-happyReduction_32 happy_x_3
+happyReduce_42 = happyReduce 7# 16# happyReduction_42
+happyReduction_42 (happy_x_7 `HappyStk`
+ happy_x_6 `HappyStk`
+ happy_x_5 `HappyStk`
+ happy_x_4 `HappyStk`
+ happy_x_3 `HappyStk`
+ happy_x_2 `HappyStk`
+ happy_x_1 `HappyStk`
+ happyRest)
+ = case happyOut11 happy_x_3 of { happy_var_3 ->
+ case happyOut13 happy_x_6 of { happy_var_6 ->
+ happyIn20
+ (EFun happy_var_3 (reverse happy_var_6)
+ ) `HappyStk` happyRest}}
+
+happyReduce_43 = happyReduce 5# 16# happyReduction_43
+happyReduction_43 (happy_x_5 `HappyStk`
+ happy_x_4 `HappyStk`
+ happy_x_3 `HappyStk`
+ happy_x_2 `HappyStk`
+ happy_x_1 `HappyStk`
+ happyRest)
+ = case happyOut22 happy_x_2 of { happy_var_2 ->
+ case happyOut21 happy_x_4 of { happy_var_4 ->
+ happyIn20
+ (eseq1_ happy_var_2 happy_var_4
+ ) `HappyStk` happyRest}}
+
+happyReduce_44 = happySpecReduce_3 16# happyReduction_44
+happyReduction_44 happy_x_3
happy_x_2
happy_x_1
- = case happyOut18 happy_x_2 of { happy_var_2 ->
- happyIn16
+ = case happyOut22 happy_x_2 of { happy_var_2 ->
+ happyIn20
(happy_var_2
)}
-happyReduce_33 = happySpecReduce_0 13# happyReduction_33
-happyReduction_33 = happyIn17
+happyReduce_45 = happySpecReduce_0 17# happyReduction_45
+happyReduction_45 = happyIn21
([]
)
-happyReduce_34 = happySpecReduce_1 13# happyReduction_34
-happyReduction_34 happy_x_1
- = case happyOut18 happy_x_1 of { happy_var_1 ->
- happyIn17
+happyReduce_46 = happySpecReduce_1 17# happyReduction_46
+happyReduction_46 happy_x_1
+ = case happyOut22 happy_x_1 of { happy_var_1 ->
+ happyIn21
((:[]) happy_var_1
)}
-happyReduce_35 = happySpecReduce_3 13# happyReduction_35
-happyReduction_35 happy_x_3
+happyReduce_47 = happySpecReduce_3 17# happyReduction_47
+happyReduction_47 happy_x_3
happy_x_2
happy_x_1
- = case happyOut18 happy_x_1 of { happy_var_1 ->
- case happyOut17 happy_x_3 of { happy_var_3 ->
- happyIn17
- ((:) happy_var_1 happy_var_3
- )}}
-
-happyReduce_36 = happySpecReduce_1 14# happyReduction_36
-happyReduction_36 happy_x_1
- = case happyOut19 happy_x_1 of { happy_var_1 ->
- happyIn18
- (happy_var_1
- )}
-
-happyReduce_37 = happySpecReduce_1 15# happyReduction_37
-happyReduction_37 happy_x_1
- = case happyOut20 happy_x_1 of { happy_var_1 ->
- happyIn19
- (happy_var_1
- )}
-
-happyReduce_38 = happySpecReduce_1 16# happyReduction_38
-happyReduction_38 happy_x_1
- = case happyOut21 happy_x_1 of { happy_var_1 ->
- happyIn20
- (happy_var_1
- )}
-
-happyReduce_39 = happySpecReduce_1 17# happyReduction_39
-happyReduction_39 happy_x_1
= case happyOut22 happy_x_1 of { happy_var_1 ->
+ case happyOut21 happy_x_3 of { happy_var_3 ->
happyIn21
- (happy_var_1
- )}
+ ((:) happy_var_1 happy_var_3
+ )}}
-happyReduce_40 = happySpecReduce_1 18# happyReduction_40
-happyReduction_40 happy_x_1
+happyReduce_48 = happySpecReduce_1 18# happyReduction_48
+happyReduction_48 happy_x_1
= case happyOut23 happy_x_1 of { happy_var_1 ->
happyIn22
(happy_var_1
)}
-happyReduce_41 = happySpecReduce_1 19# happyReduction_41
-happyReduction_41 happy_x_1
+happyReduce_49 = happySpecReduce_1 19# happyReduction_49
+happyReduction_49 happy_x_1
= case happyOut24 happy_x_1 of { happy_var_1 ->
happyIn23
(happy_var_1
)}
-happyReduce_42 = happySpecReduce_1 20# happyReduction_42
-happyReduction_42 happy_x_1
+happyReduce_50 = happySpecReduce_1 20# happyReduction_50
+happyReduction_50 happy_x_1
= case happyOut25 happy_x_1 of { happy_var_1 ->
happyIn24
(happy_var_1
)}
-happyReduce_43 = happySpecReduce_1 21# happyReduction_43
-happyReduction_43 happy_x_1
+happyReduce_51 = happySpecReduce_1 21# happyReduction_51
+happyReduction_51 happy_x_1
= case happyOut26 happy_x_1 of { happy_var_1 ->
happyIn25
(happy_var_1
)}
-happyReduce_44 = happySpecReduce_1 22# happyReduction_44
-happyReduction_44 happy_x_1
+happyReduce_52 = happySpecReduce_1 22# happyReduction_52
+happyReduction_52 happy_x_1
= case happyOut27 happy_x_1 of { happy_var_1 ->
happyIn26
(happy_var_1
)}
-happyReduce_45 = happySpecReduce_1 23# happyReduction_45
-happyReduction_45 happy_x_1
+happyReduce_53 = happySpecReduce_1 23# happyReduction_53
+happyReduction_53 happy_x_1
= case happyOut28 happy_x_1 of { happy_var_1 ->
happyIn27
(happy_var_1
)}
-happyReduce_46 = happySpecReduce_1 24# happyReduction_46
-happyReduction_46 happy_x_1
+happyReduce_54 = happySpecReduce_1 24# happyReduction_54
+happyReduction_54 happy_x_1
= case happyOut29 happy_x_1 of { happy_var_1 ->
happyIn28
(happy_var_1
)}
-happyReduce_47 = happySpecReduce_1 25# happyReduction_47
-happyReduction_47 happy_x_1
+happyReduce_55 = happySpecReduce_1 25# happyReduction_55
+happyReduction_55 happy_x_1
= case happyOut30 happy_x_1 of { happy_var_1 ->
happyIn29
(happy_var_1
)}
-happyReduce_48 = happySpecReduce_1 26# happyReduction_48
-happyReduction_48 happy_x_1
+happyReduce_56 = happySpecReduce_1 26# happyReduction_56
+happyReduction_56 happy_x_1
= case happyOut31 happy_x_1 of { happy_var_1 ->
happyIn30
(happy_var_1
)}
-happyReduce_49 = happySpecReduce_1 27# happyReduction_49
-happyReduction_49 happy_x_1
- = case happyOut14 happy_x_1 of { happy_var_1 ->
+happyReduce_57 = happySpecReduce_1 27# happyReduction_57
+happyReduction_57 happy_x_1
+ = case happyOut32 happy_x_1 of { happy_var_1 ->
happyIn31
(happy_var_1
)}
+happyReduce_58 = happySpecReduce_1 28# happyReduction_58
+happyReduction_58 happy_x_1
+ = case happyOut33 happy_x_1 of { happy_var_1 ->
+ happyIn32
+ (happy_var_1
+ )}
+
+happyReduce_59 = happySpecReduce_1 29# happyReduction_59
+happyReduction_59 happy_x_1
+ = case happyOut34 happy_x_1 of { happy_var_1 ->
+ happyIn33
+ (happy_var_1
+ )}
+
+happyReduce_60 = happySpecReduce_1 30# happyReduction_60
+happyReduction_60 happy_x_1
+ = case happyOut17 happy_x_1 of { happy_var_1 ->
+ happyIn34
+ (happy_var_1
+ )}
+
happyNewToken action sts stk [] =
- happyDoAction 22# notHappyAtAll action sts stk []
+ happyDoAction 24# notHappyAtAll action sts stk []
happyNewToken action sts stk (tk:tks) =
let cont i = happyDoAction i tk action sts stk tks in
@@ -651,21 +780,23 @@ happyNewToken action sts stk (tk:tks) =
PT _ (TS "}") -> cont 4#;
PT _ (TS ",") -> cont 5#;
PT _ (TS ";") -> cont 6#;
- PT _ (TS ".") -> cont 7#;
- PT _ (TS "[") -> cont 8#;
- PT _ (TS "]") -> cont 9#;
- PT _ (TS "false") -> cont 10#;
- PT _ (TS "function") -> cont 11#;
- PT _ (TS "new") -> cont 12#;
- PT _ (TS "null") -> cont 13#;
- PT _ (TS "return") -> cont 14#;
- PT _ (TS "this") -> cont 15#;
- PT _ (TS "true") -> cont 16#;
- PT _ (TV happy_dollar_dollar) -> cont 17#;
- PT _ (TI happy_dollar_dollar) -> cont 18#;
- PT _ (TD happy_dollar_dollar) -> cont 19#;
- PT _ (TL happy_dollar_dollar) -> cont 20#;
- _ -> cont 21#;
+ PT _ (TS "=") -> cont 7#;
+ PT _ (TS ".") -> cont 8#;
+ PT _ (TS "[") -> cont 9#;
+ PT _ (TS "]") -> cont 10#;
+ PT _ (TS "false") -> cont 11#;
+ PT _ (TS "function") -> cont 12#;
+ PT _ (TS "new") -> cont 13#;
+ PT _ (TS "null") -> cont 14#;
+ PT _ (TS "return") -> cont 15#;
+ PT _ (TS "this") -> cont 16#;
+ PT _ (TS "true") -> cont 17#;
+ PT _ (TS "var") -> cont 18#;
+ PT _ (TV happy_dollar_dollar) -> cont 19#;
+ PT _ (TI happy_dollar_dollar) -> cont 20#;
+ PT _ (TD happy_dollar_dollar) -> cont 21#;
+ PT _ (TL happy_dollar_dollar) -> cont 22#;
+ _ -> cont 23#;
_ -> happyError' (tk:tks)
}
@@ -702,6 +833,7 @@ happyError ts =
_ -> " before " ++ unwords (map prToken (take 4 ts))
myLexer = tokens
+eseq1_ x_ xs_ = ESeq (x_ : xs_)
{-# LINE 1 "GenericTemplate.hs" #-}
{-# LINE 1 "<built-in>" #-}
{-# LINE 1 "<command line>" #-}
diff --git a/src/GF/JavaScript/ParJS.y b/src/GF/JavaScript/ParJS.y
index 8f03fcd1c..b159d8790 100644
--- a/src/GF/JavaScript/ParJS.y
+++ b/src/GF/JavaScript/ParJS.y
@@ -122,6 +122,7 @@ Expr16 : Ident { EVar $1 }
| 'null' { ENull }
| 'this' { EThis }
| 'function' '(' ListIdent ')' '{' ListStmt '}' { EFun $3 (reverse $6) }
+ | '(' Expr ',' ListExpr ')' { eseq1_ $2 $4 }
| '(' Expr ')' { $2 }
@@ -201,5 +202,6 @@ happyError ts =
_ -> " before " ++ unwords (map prToken (take 4 ts))
myLexer = tokens
+eseq1_ x_ xs_ = ESeq (x_ : xs_)
}
diff --git a/src/GF/JavaScript/PrintJS.hs b/src/GF/JavaScript/PrintJS.hs
index 79829dec8..af9504c74 100644
--- a/src/GF/JavaScript/PrintJS.hs
+++ b/src/GF/JavaScript/PrintJS.hs
@@ -1,5 +1,5 @@
{-# OPTIONS -fno-warn-incomplete-patterns #-}
-module GF.JavaScript.PrintJS where
+module GF.JavaScript.PrintJS (printTree, Doc, Print(..)) where
-- pretty-printer generated by the BNF converter
@@ -25,8 +25,10 @@ render d = rend 0 (map ($ "") $ d []) "" where
"}" :ts -> new (i-1) . showChar '}' . new (i-1) . rend (i-1) ts
";" :ts -> showChar ';' . new i . rend i ts
t : "," :ts -> showString t . space "," . rend i ts
+ t : "." :ts -> showString t . showString "." . rend i ts
t : ")" :ts -> showString t . showChar ')' . rend i ts
t : "]" :ts -> showString t . showChar ']' . rend i ts
+ t : "[" :ts -> showString t . showChar '[' . rend i ts
t :ts -> space t . rend i ts
_ -> id
new i = showChar '\n' . replicateS (2*i) (showChar ' ') . dropWhile isSpace
@@ -143,6 +145,7 @@ instance Print Expr where
ENull -> prPrec i 16 (concatD [doc (showString "null")])
EThis -> prPrec i 16 (concatD [doc (showString "this")])
EFun ids stmts -> prPrec i 16 (concatD [doc (showString "function") , doc (showString "(") , prt 0 ids , doc (showString ")") , doc (showString "{") , prt 0 stmts , doc (showString "}")])
+ ESeq exprs -> prPrec i 16 (concatD [doc (showString "(") , prt 0 exprs , doc (showString ")")])
prtList es = case es of
[] -> (concatD [])
diff --git a/src/GF/JavaScript/SkelJS.hs b/src/GF/JavaScript/SkelJS.hs
index 08e202588..30d7ab391 100644
--- a/src/GF/JavaScript/SkelJS.hs
+++ b/src/GF/JavaScript/SkelJS.hs
@@ -61,6 +61,7 @@ transExpr x = case x of
ENull -> failure x
EThis -> failure x
EFun ids stmts -> failure x
+ ESeq exprs -> failure x