[e-cvs] cvs commit: e/src/jsrc/org/erights/e/ui/elmer EInterpAdapter.java

markm@eros.cs.jhu.edu markm@eros.cs.jhu.edu
Sat, 8 Sep 2001 18:59:22 -0400


markm       01/09/08 18:59:22

  Modified:    src      Makefile
               src/bin/resources/org/erights/e/elang/syntax
                        ParserTables.data
               src/esrc/com/skyhunter/e/lang vatMakerAuthor.emaker
               src/esrc/org/erights/e/elang/cmd
                        evalServerMakerAuthor.emaker
               src/esrc/scripts eBrowser.e
               src/jsrc/org/erights/e/elang/interp InteractiveInterp.java
                        Interp.java
               src/jsrc/org/erights/e/elang/syntax ELexer.java EParser.java
                        NeedMoreException.java e.y
               src/jsrc/org/erights/e/elib/deflect Deflector.java
               src/jsrc/org/erights/e/elib/prim Runner.java
               src/jsrc/org/erights/e/elib/tests TestMultiQMain.java
               src/jsrc/org/erights/e/ui/elmer EInterpAdapter.java
  Added:       src/jsrc/org/erights/e/elib/prim AWTRunner.java
                        RunnerImpl.java
  Removed:     src/jsrc/org/erights/e/elib/deflect EventualDeflector.java
                        ImmediateDeflector.java
  Log:
  Runner refactored -- there's now a headless (RunnerImpl) and a ui
  Runner (AWTRunner). The first is the old Runner logic, which creates a
  new thread servicing a new Queue.  The second uses the AWT EventQueue
  and executed within the AWT Event thread.  All synchronous swing
  interaction should be in the ui Runner, in order to satisfy both
  Swing's and E's concurrency assumptions.

Revision  Changes    Path
1.115     +2 -2      e/src/Makefile

Index: Makefile
===================================================================
RCS file: /cvs/e/src/Makefile,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -r1.114 -r1.115
--- Makefile	2001/09/07 18:11:41	1.114
+++ Makefile	2001/09/08 22:59:20	1.115
@@ -7,8 +7,8 @@
 
 # Prefix tagging this release's attributes
 PREFIX=tl-E
-DOTVER=0.8.9zm
-TAGVER=0_8_9zm
+DOTVER=0.8.9zo
+TAGVER=0_8_9zo
 RELEASE=working
 
 TOP=..



1.19      +13 -15    e/src/bin/resources/org/erights/e/elang/syntax/ParserTables.data

Index: ParserTables.data
===================================================================
RCS file: /cvs/e/src/bin/resources/org/erights/e/elang/syntax/ParserTables.data,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
Binary files /tmp/cvsHiF5TI and /tmp/cvsC3Jyrh differ



1.4       +1 -1      e/src/esrc/com/skyhunter/e/lang/vatMakerAuthor.emaker

Index: vatMakerAuthor.emaker
===================================================================
RCS file: /cvs/e/src/esrc/com/skyhunter/e/lang/vatMakerAuthor.emaker,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- vatMakerAuthor.emaker	2001/09/07 05:49:19	1.3
+++ vatMakerAuthor.emaker	2001/09/08 22:59:20	1.4
@@ -42,7 +42,7 @@
         def alterrBuffer := alterrWriter getBuffer()
         def alterr := TextWriterMaker new(alterrWriter)
 
-        def runner := RunnerMaker new(vatName)
+        def runner := RunnerMaker newHeadless(vatName)
         def sacrificial := TwineFeederMaker new("")
         def altInterp := InterpMaker make(
             args,



1.5       +1 -1      e/src/esrc/org/erights/e/elang/cmd/evalServerMakerAuthor.emaker

Index: evalServerMakerAuthor.emaker
===================================================================
RCS file: /cvs/e/src/esrc/org/erights/e/elang/cmd/evalServerMakerAuthor.emaker,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- evalServerMakerAuthor.emaker	2001/09/07 05:49:19	1.4
+++ evalServerMakerAuthor.emaker	2001/09/08 22:59:20	1.5
@@ -32,7 +32,7 @@
         def [altout, altoutReader] := ioPairMaker()
         def [alterr, alterrReader] := ioPairMaker()
 
-        def runner := RunnerMaker new(vatName)
+        def runner := RunnerMaker newHeadless(vatName)
         def sacrificial := TwineFeederMaker new("")
         def altInterp := InterpMaker make(
             args,



1.39      +4 -4      e/src/esrc/scripts/eBrowser.e

Index: eBrowser.e
===================================================================
RCS file: /cvs/e/src/esrc/scripts/eBrowser.e,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- eBrowser.e	2001/09/07 05:49:19	1.38
+++ eBrowser.e	2001/09/08 22:59:20	1.39
@@ -392,9 +392,9 @@
     def tabActionRunner() {
         def location := textPane getCaretPosition()
         #traceln("position: " + location)
-        textPane replaceRange(tabValue, location, location)
+        textPane insert(tabValue, location)
         textPane setCaretPosition(location + tabValue size())
-        textPane update(textPane getGraphics())
+        # XXX textPane update(textPane getGraphics())
     }
     def tabAction := eActionMaker new()
     tabAction setAction(tabActionRunner)
@@ -414,7 +414,7 @@
             if (canUndent) {
                 textPane replaceRange("",caretPosition -tabSize, caretPosition)
                 textPane setCaretPosition (caretPosition - tabSize)
-                textPane update(textPane getGraphics())
+                # XXX textPane update(textPane getGraphics())
             }
         }
     }
@@ -428,7 +428,7 @@
         def insertIndented(indentation) {
             textPane insert("\n" + indentation, caretPosition)
             textPane setCaretPosition(caretPosition + 1 + indentation size())
-            textPane update(textPane getGraphics())
+            # XXX textPane update(textPane getGraphics())
         }
         def lineNum := textPane getLineOfOffset(caretPosition)
         def lineIndex := textPane getLineStartOffset(lineNum)



1.8       +1 -1      e/src/jsrc/org/erights/e/elang/interp/InteractiveInterp.java

Index: InteractiveInterp.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/InteractiveInterp.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- InteractiveInterp.java	2001/09/07 05:49:21	1.7
+++ InteractiveInterp.java	2001/09/08 22:59:20	1.8
@@ -532,7 +532,7 @@
                                             outs,
                                             errs,
 
-                                            new Runner("Main Vat Thread"),
+                                            Runner.uiRunner(),
                                             null,   //optLineFeeder
                                             null,   //optTopScope
                                             false); //partialFlag



1.70      +1 -1      e/src/jsrc/org/erights/e/elang/interp/Interp.java

Index: Interp.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/Interp.java,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- Interp.java	2001/09/07 05:49:21	1.69
+++ Interp.java	2001/09/08 22:59:20	1.70
@@ -660,7 +660,7 @@
                                  outs,
                                  errs,
 
-                                 new Runner("Main Vat Thread"),
+                                 Runner.uiRunner(),
                                  null,  //optLineFeeder
                                  null); //optTopScope
         } catch (Throwable th) {



1.51      +19 -6     e/src/jsrc/org/erights/e/elang/syntax/ELexer.java

Index: ELexer.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/ELexer.java,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- ELexer.java	2001/09/07 18:11:41	1.50
+++ ELexer.java	2001/09/08 22:59:20	1.51
@@ -207,16 +207,20 @@
             myOptStartPos = -1;
         }
         myPos = -1;
+
+        //This is irritatingly redundant with needMore(..).
+        //XXX Need to refactor, but how?
         char closer = myIndenter.getCloser();
         int indent = myIndenter.getIndent();
         if (myContinueFlag) {
             indent += 2;
         }
-        myLTwine = myInput.optNextLine(
-                ('"' == closer || '`' == closer),
-                indent,
-                closer,
-                myIndenter.getCloseIndent());
+        myLTwine =
+          myInput.optNextLine(('"' == closer || '`' == closer),
+                              indent,
+                              closer,
+                              myIndenter.getCloseIndent());
+
         if (null == myLTwine) {
             //don't clear myContinueFlag on end-of-file
             myLData = null;
@@ -300,12 +304,21 @@
     /*package*/ void needMore(String msg)
     throws NeedMoreException, SyntaxException {
         if (myPartialFlag) {
+
+            //This is irritatingly redundant with nextLine().
+            //XXX Need to refactor, but how?
+            char closer = myIndenter.getCloser();
             int indent = myIndenter.getIndent();
             if (myContinueFlag) {
                 indent += 2;
                 myContinueFlag = false;
             }
-            NeedMoreException nme = new NeedMoreException(msg, indent);
+            NeedMoreException nme =
+              new NeedMoreException(msg,
+                                    ('"' == closer || '`' == closer),
+                                    indent,
+                                    closer,
+                                    myIndenter.getCloseIndent());
             reset();
             throw nme;
         } else {



1.88      +657 -680  e/src/jsrc/org/erights/e/elang/syntax/EParser.java

Index: EParser.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/EParser.java,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- EParser.java	2001/09/06 09:55:46	1.87
+++ EParser.java	2001/09/08 22:59:20	1.88
@@ -12,8 +12,13 @@
 //#line 30 "e.y"
 package org.erights.e.elang.syntax;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInput;
+import java.io.ObjectInputStream;
 import org.erights.build.EYaccFixer;
 import org.erights.e.develop.exception.ThrowableSugar;
+import org.erights.e.elang.evm.EExpr;
 import org.erights.e.elang.evm.ENode;
 import org.erights.e.elang.interp.Interp;
 import org.erights.e.elib.base.Ejector;
@@ -22,11 +27,6 @@
 import org.erights.e.elib.tables.IdentityCacheTable;
 import org.erights.e.elib.tables.IntTable;
 import org.erights.e.elib.tables.Twine;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInput;
-import java.io.ObjectInputStream;
 //#line 28 "EParser.java"
 
 
@@ -327,37 +327,37 @@
    24,   24,   26,   26,   25,   25,   25,   28,   28,   27,
    27,   27,   27,   27,   27,   30,   30,   29,   29,   32,
    32,   31,   31,   31,   31,   31,   33,   33,   33,   33,
-   33,   33,   33,   33,   33,   36,   36,   36,   36,   36,
-   36,   35,   35,   35,   35,   34,   34,   34,   34,   34,
+   33,   33,   36,   36,   36,   36,   35,   35,   35,   35,
+   34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
    34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
    34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
-   34,   34,   34,   34,   34,   34,   34,   34,   34,   39,
-   42,   55,   55,   55,   56,   56,   58,   58,   58,   60,
-   59,   59,   40,   40,   40,   41,   41,   61,   61,   62,
-   62,   63,   64,   64,   66,   66,   67,   68,   68,   45,
-   45,   69,   69,    3,    3,    3,   71,   71,   71,   71,
-   71,   72,   72,   73,   73,   74,   74,   75,   75,   76,
-   76,   77,   77,   77,   70,   70,   70,   70,   70,   70,
-   70,   70,   70,   18,   18,   78,   78,   78,   78,   78,
-   78,   78,   15,   15,   79,   79,   46,   46,   81,   81,
-   82,   82,   82,   82,   82,   83,   83,   83,   48,   48,
-   48,   49,   85,   86,   84,   84,   87,   53,   53,   88,
-   88,   89,    1,    1,    9,    9,   90,   65,   37,   37,
-   80,   80,   43,   43,   91,   91,   38,   13,   13,   17,
-   17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
-   17,   44,   44,   50,   47,   47,   47,   94,   94,   95,
-   95,   93,   93,   51,   51,   54,   96,   52,   52,   57,
-   57,   97,   97,   97,   97,   99,   99,   99,   99,   98,
-   98,   98,  101,  101,  102,  102,  103,  103,  100,  100,
-   92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
-   92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
-   92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
-   92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
-   92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
-   92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
-   92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
-   92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
-   92,   92,   92,   92,   92,
+   34,   34,   34,   34,   40,   43,   56,   56,   56,   57,
+   57,   59,   59,   59,   61,   60,   60,   41,   41,   41,
+   42,   42,   62,   62,   63,   63,   64,   65,   65,   67,
+   67,   68,   69,   69,   46,   46,   70,   70,    3,    3,
+    3,   72,   72,   72,   72,   72,   73,   73,   74,   74,
+   75,   75,   76,   76,   77,   77,   78,   78,   78,   71,
+   71,   71,   71,   71,   71,   71,   71,   71,   18,   18,
+   79,   79,   79,   79,   79,   79,   79,   15,   15,   80,
+   80,   47,   47,   82,   82,   83,   83,   83,   83,   83,
+   84,   84,   84,   49,   49,   49,   50,   86,   87,   85,
+   85,   88,   54,   54,   89,   89,   90,    1,    1,    9,
+    9,   91,   66,   39,   39,   37,   37,   81,   81,   44,
+   44,   92,   92,   38,   13,   13,   17,   17,   17,   17,
+   17,   17,   17,   17,   17,   17,   17,   17,   45,   45,
+   51,   48,   48,   48,   95,   95,   96,   96,   94,   94,
+   52,   52,   55,   97,   53,   53,   58,   58,   98,   98,
+   98,   98,  100,  100,  100,  100,   99,   99,   99,  102,
+  102,  103,  103,  104,  104,  101,  101,   93,   93,   93,
+   93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
+   93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
+   93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
+   93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
+   93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
+   93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
+   93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
+   93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
+   93,   93,
 };
 final static short yylen[] = {                            2,
     1,    1,    2,    1,    1,    3,    3,    1,    3,    1,
@@ -367,29 +367,30 @@
     1,    3,    3,    3,    3,    3,    1,    3,    3,    1,
     3,    3,    1,    1,    1,    3,    3,    1,    1,    1,
     3,    3,    3,    3,    3,    1,    1,    1,    3,    1,
-    1,    1,    2,    2,    2,    2,    1,    1,    4,    6,
-    5,    2,    3,    6,    3,    4,    5,    5,    6,    2,
-    3,    1,    4,    5,    6,    1,    1,    1,    1,    1,
-    1,    1,    3,    2,    1,    3,    3,    1,    3,    3,
-    5,    3,    4,    2,    3,    3,    4,    5,    1,    1,
-    4,    2,    2,    4,    2,    3,    2,    3,    2,    1,
-    3,    3,    5,    5,    4,    4,    0,    1,    1,    0,
-    5,    4,    0,    1,    3,    1,    2,    2,    3,    3,
-    5,    0,    1,    2,    1,    4,    2,    1,    4,    1,
-    1,    3,    2,    1,    3,    4,    1,    3,    5,    3,
-    5,    1,    2,    1,    2,    1,    2,    2,    3,    1,
-    1,    3,    3,    5,    3,    1,    2,    1,    1,    4,
-    4,    4,    2,    4,    2,    1,    1,    2,    4,    4,
-    1,    2,    2,    5,    1,    1,    1,    3,    1,    4,
-    3,    4,    3,    4,    3,    4,    5,    2,    4,    5,
-    2,    5,    3,    2,    0,    2,    3,    7,    5,    1,
-    3,    3,    0,    1,    1,    2,    0,    1,    1,    1,
-    1,    3,    1,    3,    3,    2,    1,    1,    1,    1,
+    1,    1,    2,    2,    2,    2,    1,    1,    4,    4,
+    3,    4,    2,    3,    3,    4,    1,    2,    3,    4,
+    1,    1,    1,    1,    1,    1,    1,    3,    2,    1,
+    3,    3,    1,    3,    3,    5,    3,    4,    2,    3,
+    3,    4,    5,    1,    1,    4,    2,    2,    4,    2,
+    3,    2,    3,    2,    1,    3,    3,    5,    5,    4,
+    4,    0,    1,    1,    0,    5,    4,    0,    1,    3,
+    1,    2,    2,    3,    3,    5,    0,    1,    2,    1,
+    4,    2,    1,    4,    1,    1,    3,    2,    1,    3,
+    4,    1,    3,    5,    3,    5,    1,    2,    1,    2,
+    1,    2,    2,    3,    1,    1,    3,    3,    5,    3,
+    1,    2,    1,    1,    4,    4,    4,    2,    4,    2,
+    1,    1,    2,    4,    4,    1,    2,    2,    5,    1,
+    1,    1,    3,    1,    4,    3,    4,    3,    4,    3,
+    4,    5,    2,    4,    5,    2,    5,    3,    2,    0,
+    2,    3,    7,    5,    1,    3,    3,    0,    1,    1,
+    2,    0,    1,    3,    5,    1,    1,    1,    3,    1,
+    3,    3,    2,    1,    1,    1,    1,    1,    1,    1,
+    1,    1,    1,    1,    1,    1,    1,    1,    3,    5,
+    4,    5,    1,    1,    1,    3,    1,    3,    1,    3,
+    1,    1,    2,    3,    0,    2,    5,    3,    1,    2,
+    2,    4,    2,    4,    2,    4,    2,    5,    4,    2,
+    3,    1,    4,    2,    2,    0,    2,    1,    1,    1,
     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-    1,    3,    5,    4,    5,    1,    1,    1,    3,    1,
-    3,    1,    3,    1,    1,    2,    3,    0,    2,    5,
-    3,    1,    2,    2,    4,    2,    4,    2,    4,    2,
-    5,    4,    2,    3,    1,    4,    2,    2,    0,    2,
     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -397,95 +398,93 @@
     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-    1,    1,    1,    1,    1,
+    1,    1,
 };
 final static short yydefred[] = {                         0,
-  235,    0,    0,    0,    2,    0,  248,    0,    0,    0,
-  301,  302,  303,  304,  305,  306,  307,  308,  309,  310,
-  311,  312,  313,  314,  315,  316,  317,  318,  319,  320,
-  321,  322,  323,  324,  325,  326,  327,  328,  329,  330,
-  331,  332,  333,  334,  335,  336,  337,  338,  339,  340,
-  341,  342,  343,  344,  345,  346,  347,  348,  349,  350,
-  351,  352,  353,  354,  355,  356,  357,  358,  359,  360,
-  361,  362,  363,  364,  365,  366,  367,  368,  369,  370,
-  371,  372,  373,  374,  375,  376,  377,  378,  379,  380,
-  381,  382,  383,  384,  385,    0,    0,    0,    0,    0,
-    0,  188,    3,    0,  189,    0,  174,    0,  167,  172,
-  249,   96,   97,   98,   99,  100,  102,    0,    0,    0,
+  230,    0,    0,    0,    2,    0,  245,    0,    0,    0,
+  298,  299,  300,  301,  302,  303,  304,  305,  306,  307,
+  308,  309,  310,  311,  312,  313,  314,  315,  316,  317,
+  318,  319,  320,  321,  322,  323,  324,  325,  326,  327,
+  328,  329,  330,  331,  332,  333,  334,  335,  336,  337,
+  338,  339,  340,  341,  342,  343,  344,  345,  346,  347,
+  348,  349,  350,  351,  352,  353,  354,  355,  356,  357,
+  358,  359,  360,  361,  362,  363,  364,  365,  366,  367,
+  368,  369,  370,  371,  372,  373,  374,  375,  376,  377,
+  378,  379,  380,  381,  382,    0,    0,    0,    0,    0,
+  183,    0,    3,    0,  184,    0,  169,    0,  162,  167,
+  246,   91,   92,   93,   94,   95,   97,    0,    0,    0,
     0,    4,    0,    0,    0,    0,    0,    0,    0,    0,
     0,    5,    0,    0,    0,    0,    0,    0,    0,    0,
     0,    0,    0,    0,    0,    0,    8,   12,    0,   15,
     0,    0,    0,    0,   28,    0,    0,    0,    0,    0,
-   60,    0,    0,   92,    0,   78,  101,    0,  105,  108,
-  119,  120,  236,    0,    0,    0,    0,    0,  173,  187,
-    0,  238,    0,    0,  153,    0,    0,    0,  158,    0,
-    0,    0,    0,    0,    0,  176,  175,    0,    0,    0,
-  139,  138,    0,    0,  205,  206,    0,    0,    0,    0,
-  197,  196,    0,    0,    0,  201,    0,    0,    0,  161,
-    0,    0,    0,  247,    0,    0,  114,  237,    0,    0,
-    0,    0,    0,    0,    0,  127,   76,   75,   73,   74,
-    0,    0,    0,    0,    0,  239,    0,  243,    0,  122,
-  123,    0,    0,  125,    0,    0,    0,  129,    0,    0,
-    0,    0,    0,    0,    0,    0,    0,    6,    0,    0,
-    0,    0,  250,  251,  252,  253,  254,    0,  255,  256,
-  257,  258,  259,  260,  261,    0,    0,    0,    0,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,    0,  146,
-  104,    0,    0,    0,    0,    0,    0,  163,    0,    0,
-    0,  154,    0,    0,  157,    0,   10,  145,    0,    0,
-  185,    0,    0,  180,  178,  181,    0,  177,  165,  103,
-    0,    0,    0,    0,    0,  266,  267,  202,  198,    0,
-    0,    0,  115,    0,  109,    0,    0,    0,    0,  241,
-    0,    0,    0,  116,    0,  275,  274,    0,    0,  237,
-    0,  110,  126,    0,    0,    0,    0,  130,  246,    0,
-  106,  107,    0,    0,    0,    0,  262,    0,    0,  155,
-    0,    0,    0,  221,  128,    0,    0,    0,    0,    0,
-  112,    0,    9,    0,   16,    0,   21,   23,    0,   18,
-   22,   19,   25,   29,   31,   32,   40,   39,   36,   37,
-   38,   33,   34,   35,   43,   44,   45,   42,   46,    0,
-    0,   54,    0,   51,    0,   59,    0,   56,   57,   67,
-   66,   63,   65,   61,   62,   64,   71,   70,   69,    0,
-    0,    0,    0,    0,    0,    0,  148,    0,  147,  192,
-  131,  166,  194,  162,    0,    0,    0,    0,    7,    0,
-  190,  191,    0,    0,    0,    0,  179,    0,  135,    0,
-  224,    0,  237,  136,    0,    0,    0,  209,    0,    0,
-    0,    0,    0,   86,    0,  237,    0,    0,  117,  276,
-  227,    0,    0,  230,    0,    0,    0,    0,    0,    0,
-    0,    0,  290,  281,  245,    0,  244,  242,  121,    0,
-  124,    0,    0,  226,    0,    0,   24,  113,    0,  203,
-    0,    0,    0,   79,    0,    0,    0,   93,  149,  169,
-  156,  171,    0,  159,   11,  152,  150,  152,  183,  182,
-    0,    0,  223,  268,    0,  199,  200,    0,    0,  111,
-  134,  133,   88,    0,   87,  272,    0,    0,  279,    0,
-    0,    0,  118,    0,    0,    0,  293,    0,  295,    0,
-    0,    0,    0,  282,    0,    0,    0,  300,  263,  219,
-    0,    0,    0,    0,   81,    0,    0,   94,    0,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,    0,  222,
-    0,   89,  264,    0,  277,  232,  229,  231,    0,  298,
-  297,    0,  294,  292,  283,  286,  288,  280,  284,    0,
-    0,  220,    0,   80,   84,   95,  151,  184,  142,    0,
-    0,    0,    0,    0,    0,    0,  269,    0,  265,  210,
-  273,    0,    0,    0,    0,    0,  291,  204,  141,    0,
-  215,    0,    0,    0,  218,  211,  213,  271,  228,  296,
-  285,  287,  289,  214,    0,  212,    0,  216,    0,  217,
+   60,    0,    0,   87,    0,   78,   96,    0,  100,  103,
+  114,  115,  231,    0,    0,    0,    0,    0,  168,  182,
+    0,  233,    0,    0,  148,    0,    0,    0,  153,    0,
+    0,    0,    0,    0,    0,  171,  170,    0,    0,    0,
+  134,  133,    0,    0,  200,  201,    0,    0,    0,    0,
+  192,  191,    0,    0,    0,  196,    0,    0,    0,  156,
+    0,    0,    0,  244,    0,   83,    0,  109,  232,    0,
+    0,    0,    0,    0,    0,    0,  122,   76,   75,   73,
+   74,    0,    0,    0,    0,    0,  236,    0,  240,  117,
+  118,    0,    0,  120,    0,    0,    0,  124,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    6,    0,
+    0,    0,    0,  247,  248,  249,  250,  251,    0,  252,
+  253,  254,  255,  256,  257,  258,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,   88,    0,
+  141,   99,    0,    0,    0,    0,    0,    0,  158,    0,
+    0,    0,  149,    0,    0,  152,    0,    0,    0,   10,
+  140,  180,    0,    0,  175,  173,  176,    0,  172,  160,
+   98,    0,    0,    0,    0,    0,  263,  264,  197,  193,
+    0,    0,    0,  110,    0,  104,    0,    0,    0,   85,
+  238,    0,   84,    0,  111,    0,  272,  271,    0,    0,
+  232,    0,  105,  121,    0,    0,    0,    0,  125,  243,
+    0,  101,  102,    0,    0,    0,  259,    0,    0,  150,
+    0,    0,    0,  216,  123,    0,    0,    0,    0,    0,
+    0,  107,    0,    9,    0,   16,    0,   21,   23,    0,
+   18,   22,   19,   25,   29,   31,   32,   40,   39,   36,
+   37,   38,   33,   34,   35,   43,   44,   45,   42,   46,
+    0,    0,   54,    0,   51,    0,   59,    0,   56,   57,
+   67,   66,   63,   65,   61,   62,   64,   71,   70,   69,
+    0,   81,    0,    0,    0,   89,  143,    0,  142,  187,
+  126,  161,  189,  157,    0,    0,    0,    0,  185,  186,
+    7,    0,    0,    0,    0,    0,  174,    0,  130,    0,
+  219,    0,  232,  131,    0,    0,    0,  204,    0,    0,
+    0,   86,    0,  232,    0,    0,  112,  273,  222,    0,
+    0,  225,    0,    0,    0,    0,    0,    0,    0,    0,
+  287,  278,  242,    0,  241,  239,  116,    0,  119,    0,
+    0,  221,    0,    0,   24,  108,    0,  198,    0,   80,
+   79,   82,   90,  144,  164,  151,  166,    0,  154,   11,
+  147,  145,  147,  178,  177,    0,    0,  218,  265,    0,
+  194,  195,    0,    0,  106,  129,  128,    0,  269,    0,
+    0,  276,    0,    0,    0,  113,    0,    0,    0,    0,
+  279,    0,    0,    0,    0,  290,    0,  292,    0,    0,
+  297,  260,  214,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,  217,    0,  235,
+  261,    0,  274,  227,  224,  226,    0,  280,  283,  285,
+  277,  281,    0,  295,  294,    0,  291,  289,    0,  215,
+    0,  146,  179,  137,    0,    0,    0,    0,    0,    0,
+    0,  266,    0,  262,  205,  270,    0,    0,    0,    0,
+    0,  288,  199,  136,    0,  210,    0,    0,    0,  213,
+  206,  208,  268,  223,  282,  284,  286,  293,  209,    0,
+  207,    0,  211,    0,  212,
 };
 final static short yydgoto[] = {                          3,
-  190,    5,  400,  178,  146,  370,  336,  147,    6,  337,
-  149,  150,  151,  421,  450,  152,  286,  105,  154,  155,
-  156,  429,  157,  158,  159,  444,  160,  448,  161,  452,
-  162,  459,  163,  164,  165,  166,  244,  386,  167,  168,
-  321,  169,  245,  170,  219,  267,  355,  259,  214,  374,
-  375,  509,  231,  376,  171,  172,  236,  203,  489,  490,
-  322,  344,  484,  184,  246,  186,  187,  188,  189,  107,
-  108,  109,  110,  197,  198,  345,  346,  215,  216,  247,
-  499,  617,  654,  675,  356,  357,  232,  513,  514,  377,
-  248,  111,  577,  565,  619,  510,  595,  387,  596,  523,
-  519,  588,  589,
+  192,    5,  400,  178,  146,  371,  339,  147,    6,  340,
+  149,  150,  151,  422,  451,  152,  287,  105,  154,  155,
+  156,  430,  157,  158,  159,  445,  160,  449,  161,  453,
+  162,  460,  163,  164,  165,  166,  245,  387,  226,  167,
+  168,  322,  169,  246,  170,  219,  268,  356,  259,  214,
+  375,  376,  507,  232,  377,  171,  172,  237,  203,  489,
+  490,  323,  345,  484,  184,  185,  186,  187,  188,  189,
+  107,  108,  109,  110,  197,  198,  346,  347,  215,  216,
+  248,  499,  605,  639,  660,  357,  358,  233,  511,  512,
+  378,  249,  111,  570,  560,  607,  508,  582,  388,  583,
+  521,  518,  587,  588,
 };
-final static short yysindex[] = {                      -308,
-    0, 9890,    0,11763,    0, -333,    0,15878,   23,15878,
+final static short yysindex[] = {                      -301,
+    0, 8755,    0,10628,    0, -280,    0,14625,   64,14625,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
@@ -494,69 +493,68 @@
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-    0,    0,    0,    0,    0,12703,15878, 6880, -307,  -25,
-  -14,    0,    0,   68,    0, -119,    0,  133,    0,    0,
-    0,    0,    0,    0,    0,    0,    0,12233,10234,10234,
-13167,    0, 9890, 6999,   23, 8506,   23,   35,   35,13047,
-   23,    0,   23,13167,15878,12703,12703,12703, -273, -307,
-   -1, -307,  -77,14427, 9309, -307,    0,    0,  142,    0,
-    0,  328, -188, -163,    0,  -33,   86,   77,  180,   50,
-    0, -168, 8840,    0,  192,    0,    0,  -85,    0,    0,
-    0,    0,    0,  197, -307, -162,  201,13167,    0,    0,
-13511,    0, -149,  174,    0,  -23,  178,  -19,    0,11763,
-  237,   38,   56,12233,   12,    0,    0,  -80,12233,   73,
-    0,    0,   35,  -87,    0,    0,15878,15878,  211,  213,
-    0,    0,  275,   35,  -75,    0,   35, -149,   65,    0,
-   35,14663, -307,    0,  308,  245,    0,    0, -307,  330,
-   35,  -39,   35,  245,14545,    0,    0,    0,    0,    0,
-15878,11763,  -35,  286,   49,    0,  354,    0,  364,    0,
-    0,  150,11640,    0,  158, 9771,   66,    0,   35,15878,
-15878,  290,  302,    0,   27,   68,13629,    0, 8964,11763,
-12233,11763,    0,    0,    0,    0,    0,11763,    0,    0,
-    0,    0,    0,    0,    0,12110,11763,12233,12233,12233,
-12580, 9890, 9890,12580,12580,12580,12233,12233,12233,12233,
-12233,12233,12233,12580,12233,12580,12580,12580,12580,12580,
-12580,12580,12580,14781, -307,15878,   71, -307,  391,    0,
-    0,  102,12233,  393, 9890,12233,   68,    0, 9890,  397,
- -307,    0,  323, -307,    0, -307,    0,    0,  321,  326,
-    0,  339,  340,    0,    0,    0,   12,    0,    0,    0,
-  194,   35, 9890, -307,  194,    0,    0,    0,    0,  218,
-  221, 9771,    0,15878,    0,11763,  203, -307,  440,    0,
-  443, -307, -307,    0,  -79,    0,    0,  239, -307,    0,
-13167,    0,    0, -307, -307,  124,  106,    0,    0, -307,
-    0,    0, -273, -307,    0,  362,    0, -307,  363,    0,
-  454, 9771,12233,    0,    0,  197,  201,  243,  248,11763,
-    0,   35,    0, 9309,    0, -163,    0,    0,  -18,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,    0, -222,
- -222,    0,  180,    0,  180,    0,   50,    0,    0,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,    0, -307,
-  474,  425,  488, -307,  497,  499,    0,  391,    0,    0,
-    0,    0,    0,    0,10352, 9890,10352, 6999,    0, 8964,
-    0,    0, -307,15878, 9890,15185,    0,10234,    0,  273,
-    0,   35,    0,    0,  418,  420,  506,    0,  507,   35,
-  -49,  509, -307,    0,  511,    0, 9890,   35,    0,    0,
-    0,  143,  255,    0,  283,  285,  524,15474,  525,  125,
- -307,15878,    0,    0,    0,  -35,    0,    0,    0,  446,
-    0,  515,  533,    0,  450,  453,    0,    0,   68,    0,
-  270,  538, -307,    0, -307,  540, -307,    0,    0,    0,
-    0,    0, -149,    0,    0,    0,    0,    0,    0,    0,
-  -87,10234,    0,    0, -115,    0,    0,  515, -307,    0,
-    0,    0,    0,  542,    0,    0,  -45,   35,    0, 9890,
-  515, -307,    0, 9890,  526,  526,    0,  -16,    0,  526,
- -307,14899,14899,    0,  460, -307,  545,    0,    0,    0,
-  515,    0,    0, -307,    0,  546,  547,    0,  549,  466,
-  470,  194,   35,   23,15017,15017, -307,  -84,  471,    0,
-15878,    0,    0, -307,    0,    0,    0,    0,  287,    0,
-    0, -307,    0,    0,    0,    0,    0,    0,    0, -190,
-  526,    0,  300,    0,    0,    0,    0,    0,    0,  194,
-  -91, 9771,  -13,   35,  127,   35,    0, -307,    0,    0,
-    0,  515,15474, -307,14899,14899,    0,    0,    0,   23,
-    0,  558,11763, 9771,    0,    0,    0,    0,    0,    0,
-    0,    0,    0,    0,  515,    0,  559,    0,  515,    0,
+    0,    0,    0,    0,    0,11568,14625, 5745,   29,   54,
+    0, -187,    0,  140,    0,   19,    0,  145,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,11098, 9099, 9099,
+12032,    0, 8755, 5864,   64, 7371,   64,   89,   89,11912,
+   64,    0,   64,12032,14625,11568,11568,11568, -295,   30,
+ -187,    4,13292, -187, 8174, -187,    0,    0,  178,    0,
+    0,  331, -136, -125,    0,   51,   -3,   16,  138,  -20,
+    0, -130, 7705,    0,  227,    0,    0,   97,    0,    0,
+    0,    0,    0,  212, -187, -134,  222,12032,    0,    0,
+12376,    0, -110,  203,    0,  -35,  217,  -33,    0,   56,
+   70,10628,  282,11098,   66,    0,    0,  118,11098,  103,
+    0,    0,   89,  -50,    0,    0,14625,14625,  209,  211,
+    0,    0,  303,   89,  -69,    0,   89, -110,   90,    0,
+   89,13528, -187,    0,  227,    0,  228,    0,    0, -187,
+  338,   89,  -58,   89,  228,13410,    0,    0,    0,    0,
+    0,14625,10628,  -19,  302,   50,    0,  354,    0,    0,
+    0,  144,10505,    0,  160, 8636,   53,    0,   89,  374,
+14625,14625,  299,  310,    0,   61,  140,12494,    0, 7829,
+10628,11098,10628,    0,    0,    0,    0,    0,10628,    0,
+    0,    0,    0,    0,    0,    0,10975,10628,11098,11098,
+11098,11445, 8755, 8755,11445,11445,11445,11098,11098,11098,
+11098,11098,11098,11098,11445,11098,11445,11445,11445,11445,
+11445,11445,11445,11445,13528, -187,14625,   58,    0,  414,
+    0,    0,  126,11098,  425, 8755,11098,  140,    0, 8755,
+  433, -187,    0,  353, -187,    0,  356,  357, -187,    0,
+    0,    0,  363,  364,    0,    0,    0,   66,    0,    0,
+    0,  223,   89, 8755, -187,  223,    0,    0,    0,    0,
+  237,  238, 8636,    0,14625,    0,10628,  221,  227,    0,
+    0,  438,    0, -187,    0, -104,    0,    0,   46, -187,
+    0,12032,    0,    0, -187, -187,   83,  120,    0,    0,
+ -187,    0,    0, -295, -187,  379,    0, -187,  380,    0,
+  465, 8636,11098,    0,    0,    0,  212,  222,  252,  253,
+10628,    0,   89,    0, 8174,    0, -125,    0,    0,  -36,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+ -190, -190,    0,  138,    0,  138,    0,  -20,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+  227,    0,  424,  227,  227,    0,    0,  414,    0,    0,
+    0,    0,    0,    0, 9217, 8755, 9217, 5864,    0,    0,
+    0, 7829, -187,14625, 8755,13932,    0, 9099,    0,  250,
+    0,   89,    0,    0,  394,  399,  488,    0,  495,   89,
+  -59,    0,  247,    0, 8755,   89,    0,    0,    0,  129,
+   72,    0,  269,  265,  504, -116,14221,  509, -187,14625,
+    0,    0,    0,  -19,    0,    0,    0,  426,    0,  498,
+  512,    0,  441,  442,    0,    0,  140,    0,  110,    0,
+    0,    0,    0,    0,    0,    0,    0, -110,    0,    0,
+    0,    0,    0,    0,    0,  -50, 9099,    0,    0,   28,
+    0,    0,  498, -187,    0,    0,    0,   89,    0,  -62,
+   89,    0, 8755,  498, -187,    0, 8755, -187,13646,13646,
+    0,  443, -187,  500,  500,    0,  -14,    0,  500,  528,
+    0,    0,    0,  498,    0,    0, -187,  445,  448,  223,
+   89,   64,13764,13764, -187, -150,  450,    0,14625,    0,
+    0, -187,    0,    0,    0,    0,  125,    0,    0,    0,
+    0,    0, -195,    0,    0, -187,    0,    0,  500,    0,
+  151,    0,    0,    0,  223,  -91, 8636,  -24,   89,  104,
+   89,    0, -187,    0,    0,    0,  498, -187,13646,13646,
+14221,    0,    0,    0,   64,    0,  535,10628, 8636,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,  498,
+    0,  536,    0,  498,    0,
 };
-final static short yyrindex[] = {                      6418,
-    0,  138,    0,   11,    0, 5364,    0,    0,    0,    0,
+final static short yyrindex[] = {                      5283,
+    0,  174,    0,   75,    0, 4229,    0,    0,    0,    0,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
@@ -565,81 +563,80 @@
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-    0,    0,    0,    0,    0,  138,    0,  -59,11293,    0,
-    0,    0,    0, 5744,    0,    0,    0, 5987,    0,    0,
-    0,    0,    0,    0,    0,    0,    0,  138,  -29,  -42,
-    0,    0,  138,  138,    0,    0,    0,    0,    0,    0,
-    0,    0,    0,    0,    0,  138,  138,  138,10700,11293,
-    0,10823,    0,    0,  138,  565,    0,    0,   24,    0,
-  782,  156,    0, 6041,    0, 5124, 5202, 4735, 4283, 4109,
-    0, 4073, 4037,    0, 2333,    0,    0,    0,    0,    0,
-    0,    0,    0, 5777,11293,    0, 5812,    0,    0,    0,
-    0,    0,  -31,    0,    0,   15,    0,  508,    0,  138,
-    0,    0,    0,  138,    0,    0,    0,    0,  138,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-    0,    0,    0,    0,13969,    0,    0,  324,    0,    0,
-    0,    0,11170,    0, 2486,    0,    0,    0,11293,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-    0,   -3,   60,    0,    0,    0,   48,    0,    0,    0,
-    0,    0,  138,    0,    0,   13,  479,    0,    0,    0,
-    0,    0,    0, 7461,    0,  660,    0,    0,   95,  378,
-  138,  138,    0,    0,    0,    0,    0,  138,    0,    0,
-    0,    0,    0,    0,    0,  138,  138,  138,  138,  138,
-  138,  138,  138,  138,  138,  138,  138,  138,  138,  138,
-  138,  138,  138,  138,  138,  138,  138,  138,  138,  138,
-  138,  138,  138,    0,10700,    0, 2901,11170,    0,    0,
-    0,    0,  138,    0,  138,  138,  -38,    0,  138, 5847,
- 9427,    0, 5950, 6536,    0,  -15,    0,    0,    0,    0,
-    0,15996,15642,    0,    0,    0,    0,    0,    0,    0,
-  335,    0,  138,  -72,  335,    0,    0,    0,    0,    0,
-    0,   13,    0,    0,    0,  138, 1765,11170, 3054,    0,
-    0,11170,  -37,    0, 1918,    0,    0,    0,11293,    0,
-    0,    0,    0,15356,  -73,  -83,    0,    0,    0,11293,
-    0,    0,11293,11293, 1197,    0,    0,  482,    0,    0,
-    0,   13,  138,    0,    0, 7801, 7923,    0,    0,  138,
-    0,    0,    0,  138,    0, 6241,    0,    0,11293,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,    0, 4870,
- 4906,    0, 4660,    0, 4699,    0, 4244,    0,    0,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,    0,11170,
- 3469,    0, 3622,11170,    0,    0,    0,    0,    0,    0,
-    0,    0,    0,    0,  138,  138,  138,  138,    0,  -22,
-    0,    0,11293,    0,  138,    0,    0,  -42,    0,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,14087,    0,
-    0,    0,11170,    0,    0,    0,  138,    0,    0,    0,
-    0,    0,    0,    0,    0, 1350,    0,  568,    0,  485,
-15356,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-    0,  479,    0,    0,    0,    0,    0,    0, 7339,    0,
-    0,    0,11170,    0,11170,    0,11170,    0,    0,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-    0,  -29,    0,    0,  -46,    0,    0,  479,16114,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,    0,  138,
-  479,11293,    0,  138,  -26,  -26,    0,  571,    0,  -83,
-  482,    0,    0,    0,    0,  482,    0,    0,    0,    0,
-  479, 8263, 8385,11293,    0,    0,    0,    0,    0,    0,
-    0,  335,    0,    0,    0,    0,  -72,  489,    0,    0,
-    0,    0,    0,   47,    0,    0,    0,    0,    0,    0,
-    0,15760,    0,    0,    0,    0,    0,    0,    0,  492,
-  -83,    0,    0,    0,    0,    0,    0,    0,    0,  335,
-    0,   13,  479,    0,  479,    0,    0,  482,    0,    0,
-    0,  479,    0,  482,    0,    0,    0,    0,    0,    0,
-    0,    0,  138,   13,    0,    0,    0,    0,    0,    0,
-    0,    0,    0,    0,  479,    0,    0,    0,  479,    0,
+    0,    0,    0,    0,    0,  174,    0,  -41,    0,    0,
+    0,10158,    0, 4609,    0,    0,    0, 4852,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,  174,  -17,  -47,
+    0,    0,  174,  174,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,  174,  174,  174, 9565,    0,
+ 9688,    0,    0,10158,  174,  578,    0,    0,   14,    0,
+  783,  467,    0, 4906,    0, 3989, 4067, 3600, 3148, 2974,
+    0, 2938, 2902,    0, 2487,    0,    0,    0,    0,    0,
+    0,    0,    0, 4642,10158,    0, 4677,    0,    0,    0,
+    0,    0,  -25,    0,    0,   43,    0,  487,    0,    0,
+    0,  174,    0,  174,    0,    0,    0,    0,  174,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,12834,    0,    0,  300,    0,    0,
+    0,    0,10035,    0,    0,    0,    0,    0,    0,10158,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,  -21,   57,    0,    0,    0,   45,    0,    0,
+    0,    0,  174,    0,    0,   26,  459,    0,    0,    0,
+    0,    0,    0,    0, 6326,    0,  661,    0,    0,   95,
+   12,  174,  174,    0,    0,    0,    0,    0,  174,    0,
+    0,    0,    0,    0,    0,    0,  174,  174,  174,  174,
+  174,  174,  174,  174,  174,  174,  174,  174,  174,  174,
+  174,  174,  174,  174,  174,  174,  174,  174,  174,  174,
+  174,  174,  174,  174,    0, 9565,    0,    0,    0,    0,
+    0,    0,    0,  174,    0,  174,  174,  -31,    0,  174,
+ 4712, 8292,    0, 4815, 5401,    0,    0,    0,   -1,    0,
+    0,    0,14743,14389,    0,    0,    0,    0,    0,    0,
+    0,  315,    0,  174,  -56,  315,    0,    0,    0,    0,
+    0,    0,   26,    0,    0,    0,  174, 1766,    0,    0,
+    0,    0,    0,  -48,    0, 1919,    0,    0,    0,10158,
+    0,    0,    0,    0,  -89,14103,  -83,    0,    0,    0,
+10158,    0,    0,10158,10158,    0,    0,  460,    0,    0,
+    0,   26,  174,    0,    0, 1198, 6666, 6788,    0,    0,
+  174,    0,    0,    0,  174,    0, 5106,    0,    0,10158,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+ 3735, 3771,    0, 3525,    0, 3564,    0, 3109,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,  174,  174,  174,  174,    0,    0,
+    0,  -15,10158,    0,  174,    0,    0,  -47,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,12952,    0,
+    0,    0, 2334,    0,  174,    0,    0,    0,    0,    0,
+    0,    0,    0, 1351,    0,  461,  546,    0,14103,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,  459,
+    0,    0,    0,    0,    0,    0, 6204,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,  -17,    0,    0,  -71,
+    0,    0,  459,14861,    0,    0,    0,    0,    0,    0,
+    0,    0,  174,  459,10158,    0,  174,  460,    0,    0,
+    0,    0,  460,  -23,  -23,    0,  548,    0,  -83,    0,
+    0,    0,    0,  459, 7128, 7250,10158,    0,    0,  315,
+    0,    0,    0,    0,  -56,  468,    0,    0,    0,    0,
+    0,  -42,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,  470,    0,    0,14507,    0,    0,  -83,    0,
+    0,    0,    0,    0,  315,    0,   26,  459,    0,  459,
+    0,    0,  460,    0,    0,    0,  459,  460,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,  174,   26,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,  459,
+    0,    0,    0,  459,    0,
 };
 final static short yygindex[] = {                         0,
-    1,    0,  128,   16,    0,  -89,  366,  351, -144,   -4,
-    0, -203,   31,    0,  455,    0,    0,   40,  350,  341,
-  383,  160,  226,   89,  -88,    0,  123,  320,  223,  250,
-  315,    0,    0,  322,    0,    0,  254,  -86, -233,   14,
-    0,   -6,    0,  280,    0,  -64, -236,  367,    0,  396,
-  251,  120,    0,  257,  137,    0,    0, -113, -312,    0,
-    0, -282, -294, -242,  -94,   55,    0,    0, -107,  459,
- -231,    0,    0,    0,    0,  296,    0,    0,    0, -217,
-    0,    0,   28, -248, -495,   30,    0,    0,   63,   -8,
-  256,    0,   85,    0,    0,    0,    0, -492,    0, -526,
-  130,    0,   -9,
+    1,    0,  205,   -2,    0,  -79,  343,  337, -140,   -4,
+    0, -238,   37,    0,  241,    0,    0,   21,  329,  319,
+  308,  158,  161,  143,  -67,    0,  -45,  294,  162,  179,
+  295,    0,    0,  332,    0,    0, -152, -119,  -34, -232,
+   86,    0,   -5,    0,  313,    0,  -60, -230,  344,    0,
+  376,  234,  105,    0,  240,  117,    0,    0, -112, -328,
+    0,    0, -239, -298, -208, -102,   47,    0,    0, -109,
+  444, -223,    0,    0,    0,    0,  274,    0,    0,    0,
+ -227,    0,    0,   22, -226, -488,   17,    0,    0,   55,
+ -198,  235,    0,   68,    0,    0,    0,    0, -471,    0,
+ -171,  112,    0,  -18,
 };
-final static int YYTABLESIZE=16493;
+final static int YYTABLESIZE=15240;
 
 //These two tables are not statically initialized, but rather
 //initialized on first use, so that a failure to initialize them
@@ -661,7 +658,7 @@
         yytable = (short[])obInp.readObject();
         yycheck = (short[])obInp.readObject();
         long hash = EYaccFixer.checkhash(yytable, yycheck);
-        if (hash != 1161612266412756548L) {
+        if (hash != 8994340673236973412L) {
             throw new RuntimeException(rName + " bad checkhash: " +
                                        hash);
         }
@@ -792,22 +789,17 @@
 "postfix : call",
 "postfix : metaExpr",
 "postfix : postfix '[' argList ']'",
-"postfix : postfix Send verb '(' argList ')'",
-"postfix : postfix Send '(' argList ')'",
-"postfix : postfix verb",
-"postfix : postfix '.' ident",
-"postfix : postfix '.' ident '(' argList ')'",
-"postfix : postfix Send verb",
-"metaExpr : META '(' argList ')'",
-"metaExpr : META verb '(' argList ')'",
-"metaExpr : META Send '(' argList ')'",
-"metaExpr : META Send verb '(' argList ')'",
-"metaExpr : META verb",
-"metaExpr : META Send verb",
+"postfix : postfix Send verb parenArgs",
+"postfix : postfix Send parenArgs",
+"postfix : postfix '.' ident parenArgs",
+"metaExpr : META parenArgs",
+"metaExpr : META verb parenArgs",
+"metaExpr : META Send parenArgs",
+"metaExpr : META Send verb parenArgs",
 "call : prim",
-"call : call '(' argList ')'",
-"call : postfix verb '(' argList ')'",
-"call : postfix verb '=' '(' argList ')'",
+"call : call parenArgs",
+"call : postfix verb parenArgs",
+"call : postfix verb '=' parenArgs",
 "prim : LiteralInteger",
 "prim : LiteralFloat64",
 "prim : LiteralChar",
@@ -951,6 +943,8 @@
 "EOLs : EOLs EOL",
 "emptyList :",
 "emptyBr : br",
+"parenArgs : '(' argList ')'",
+"parenArgs : '(' argList ')' THUNK body",
 "argList : emptyBr",
 "argList : args",
 "args : eExpr",
@@ -1100,7 +1094,7 @@
 "reserved : WSTRING",
 };
 
-//#line 1086 "e.y"
+//#line 1098 "e.y"
 
 /**
  *
@@ -1108,7 +1102,7 @@
 static public final StaticMaker EParserMaker =
     StaticMaker.make(EParser.class);
 
-/**
+/** 
  * caches previous simple parses (as is used for quasi-parsing)
  */
 static private IdentityCacheTable OurCache =
@@ -1117,7 +1111,7 @@
 /**
  *
  */
-static private final ConstMap DefaultProps =
+static private final ConstMap DefaultProps = 
   ConstMap.fromProperties(System.getProperties());
 
 
@@ -1125,7 +1119,7 @@
 /** contains all the tokens after yylval */
 private ELexer myLexer;
 
-/**
+/** 
  * Do we escape after parsing only one expression, or do we parse the
  * entire input?
  */
@@ -1227,7 +1221,7 @@
 
 /**
  * If the input is empty, returns the null expression e`null`, rather
- * than null.
+ * than null. 
  */
 public ENode parse() {
     ENode result = optParse();
@@ -1288,7 +1282,7 @@
     int ttype = ((Token)yylval).tokenType();
     if (EParser.EOFTOK == ttype && "syntax error".equals(s)) {
         myLexer.needMore("Unexpected EOF");
-
+        
     } else {
         syntaxError(s);
     }
@@ -1539,7 +1533,7 @@
 /**
  * These are the tokens that may appear at the end of a line, in which
  * case the next line is a (to be indented) continuation of the
- * expression.
+ * expression. 
  * <p>
  * Note that &gt; isn't on the list because of its role in closing a
  * calculated URI expression.
@@ -1617,7 +1611,7 @@
 static public boolean isContinuer(int tokenType) {
     return TheContinuers[tokenType];
 }
-//#line 4842 "EParser.java"
+//#line 4584 "EParser.java"
 //###############################################################
 // method: yylexdebug : check lexer state
 //###############################################################
@@ -1637,7 +1631,7 @@
 //###############################################################
 // method: yyparse : parse input and execute indicated items
 //###############################################################
-int yyparse()
+int yyparse() 
 {
 int yyn;       //next next thing to do
 int yym;       //
@@ -1653,7 +1647,7 @@
   while (true) //until parsing is done, either correctly, or w/error
     {
     doaction=true;
-    if (yydebug) debug("loop");
+    if (yydebug) debug("loop"); 
     //#### NEXT ACTION (from reduction table)
     for (yyn=yydefred[yystate];yyn==0;yyn=yydefred[yystate])
       {
@@ -1983,768 +1977,751 @@
 break;
 case 80:
 //#line 389 "e.y"
-{ yyval = send(val_peek(5), val_peek(3), val_peek(1)); }
+{ yyval = send(val_peek(3), val_peek(1), val_peek(0)); }
 break;
 case 81:
 //#line 390 "e.y"
-{ yyval = send(val_peek(4), "run", val_peek(1)); }
+{ yyval = send(val_peek(2), "run", val_peek(0)); }
 break;
 case 82:
-//#line 392 "e.y"
-{ pocket("no-paren-call");
-                                               yyval = call(val_peek(1), val_peek(0), list()); }
+//#line 400 "e.y"
+{ pocket("dot-props");
+                                          yyval = property(val_peek(3), val_peek(1), val_peek(0)); }
 break;
 case 83:
-//#line 394 "e.y"
-{ pocket("dot-props");
-                                               yyval = property(val_peek(2), val_peek(0), list()); }
+//#line 408 "e.y"
+{ yyval = doMeta("run", val_peek(0)); }
 break;
 case 84:
-//#line 396 "e.y"
-{ pocket("dot-props");
-                                               yyval = property(val_peek(5), val_peek(3), val_peek(1)); }
+//#line 409 "e.y"
+{ yyval = doMeta(val_peek(1), val_peek(0)); }
 break;
 case 85:
-//#line 398 "e.y"
-{ pocket("no-paren-call");
-                                               yyval = send(val_peek(2), val_peek(0), list()); }
+//#line 410 "e.y"
+{ yyval = doMetaSend("run", val_peek(0)); }
 break;
 case 86:
-//#line 406 "e.y"
-{ yyval = doMeta("run", val_peek(1)); }
-break;
-case 87:
-//#line 407 "e.y"
-{ yyval = doMeta(val_peek(3), val_peek(1)); }
+//#line 411 "e.y"
+{ yyval = doMetaSend(val_peek(1), val_peek(0)); }
 break;
 case 88:
-//#line 408 "e.y"
-{ yyval = doMetaSend("run", val_peek(1)); }
+//#line 431 "e.y"
+{ yyval = call(val_peek(1), "run", val_peek(0)); }
 break;
 case 89:
-//#line 409 "e.y"
-{ yyval = doMetaSend(val_peek(3), val_peek(1)); }
+//#line 432 "e.y"
+{ yyval = call(val_peek(2), val_peek(1), val_peek(0)); }
 break;
 case 90:
-//#line 411 "e.y"
-{ pocket("no-paren-call");
-                                          yyval = doMeta(val_peek(0), list()); }
-break;
-case 91:
-//#line 413 "e.y"
-{ pocket("no-paren-call");
-                                          yyval = doMetaSend(val_peek(0), list()); }
-break;
-case 93:
-//#line 427 "e.y"
-{ yyval = call(val_peek(3), "run", val_peek(1)); }
-break;
-case 94:
-//#line 428 "e.y"
-{ yyval = call(val_peek(4), val_peek(3), val_peek(1)); }
-break;
-case 95:
-//#line 429 "e.y"
+//#line 433 "e.y"
 { reserved("verb="); }
 break;
-case 96:
-//#line 437 "e.y"
+case 91:
+//#line 441 "e.y"
 { yyval = literal(val_peek(0)); }
 break;
-case 97:
-//#line 438 "e.y"
+case 92:
+//#line 442 "e.y"
 { yyval = literal(val_peek(0)); }
 break;
-case 98:
-//#line 439 "e.y"
+case 93:
+//#line 443 "e.y"
 { yyval = literal(val_peek(0)); }
 break;
-case 99:
-//#line 440 "e.y"
+case 94:
+//#line 444 "e.y"
 { yyval = literal(val_peek(0)); }
 break;
-case 100:
-//#line 441 "e.y"
+case 95:
+//#line 445 "e.y"
 { yyval = literal(val_peek(0)); }
 break;
-case 102:
-//#line 445 "e.y"
+case 97:
+//#line 449 "e.y"
 { yyval = uriExpr(val_peek(0)); }
 break;
-case 103:
-//#line 446 "e.y"
+case 98:
+//#line 450 "e.y"
 { yyval = uriExpr(val_peek(2),val_peek(1)); }
 break;
-case 104:
-//#line 448 "e.y"
+case 99:
+//#line 452 "e.y"
 { yyval = quasiExpr(val_peek(1),val_peek(0)); }
 break;
-case 106:
-//#line 451 "e.y"
+case 101:
+//#line 455 "e.y"
 { yyval = tuple(val_peek(1)); }
 break;
-case 107:
-//#line 452 "e.y"
+case 102:
+//#line 456 "e.y"
 { yyval = map(val_peek(1)); }
 break;
-case 108:
-//#line 454 "e.y"
+case 103:
+//#line 458 "e.y"
 { yyval = hide(val_peek(0)); }
 break;
-case 109:
-//#line 456 "e.y"
+case 104:
+//#line 460 "e.y"
 { yyval = escape(val_peek(1),val_peek(0)); }
 break;
-case 110:
-//#line 458 "e.y"
+case 105:
+//#line 462 "e.y"
 { yyval = whilex(val_peek(1),val_peek(0)); }
 break;
-case 111:
-//#line 460 "e.y"
+case 106:
+//#line 464 "e.y"
 { yyval = forx(val_peek(3),val_peek(1),val_peek(0)); }
 break;
-case 112:
-//#line 462 "e.y"
+case 107:
+//#line 466 "e.y"
 { yyval = object(val_peek(1), val_peek(0)); }
 break;
-case 113:
-//#line 463 "e.y"
+case 108:
+//#line 467 "e.y"
 { yyval = methObject(val_peek(2),val_peek(1),val_peek(0)); }
 break;
-case 114:
-//#line 464 "e.y"
+case 109:
+//#line 468 "e.y"
 { yyval = thunk(val_peek(0)); }
 break;
-case 115:
-//#line 466 "e.y"
+case 110:
+//#line 470 "e.y"
 { yyval = classExpr(val_peek(1),val_peek(0)); }
 break;
-case 116:
-//#line 468 "e.y"
+case 111:
+//#line 472 "e.y"
 { yyval = switchx(val_peek(1),val_peek(0)); }
 break;
-case 117:
-//#line 470 "e.y"
+case 112:
+//#line 474 "e.y"
 { yyval = tryx(val_peek(2),val_peek(1),val_peek(0)); }
 break;
-case 118:
-//#line 472 "e.y"
+case 113:
+//#line 476 "e.y"
 { yyval = when(val_peek(3),val_peek(2),val_peek(1),val_peek(0)); }
 break;
-case 121:
-//#line 478 "e.y"
+case 116:
+//#line 482 "e.y"
 { yyval = quasiLiteralExpr(val_peek(1)); }
 break;
-case 122:
-//#line 479 "e.y"
+case 117:
+//#line 483 "e.y"
 { yyval = quasiLiteralExpr(val_peek(0)); }
 break;
-case 123:
-//#line 480 "e.y"
+case 118:
+//#line 484 "e.y"
 { yyval = quasiLiteralExpr(); }
 break;
-case 124:
-//#line 481 "e.y"
+case 119:
+//#line 485 "e.y"
 { yyval = quasiPatternExpr(val_peek(1)); }
 break;
-case 125:
-//#line 482 "e.y"
+case 120:
+//#line 486 "e.y"
 { yyval = quasiPatternExpr(val_peek(0)); }
 break;
-case 126:
-//#line 485 "e.y"
+case 121:
+//#line 489 "e.y"
 { reserved("select"); }
 break;
-case 127:
-//#line 486 "e.y"
+case 122:
+//#line 490 "e.y"
 { pocket("typedef");
                                                   yyval = val_peek(0); }
 break;
-case 128:
-//#line 488 "e.y"
+case 123:
+//#line 492 "e.y"
 { pocket("anon-lambda");
                                   yyval = methObject(audits(ignore(), list()),
                                                   val_peek(1),
                                                   val_peek(0)); }
 break;
-case 129:
-//#line 492 "e.y"
+case 124:
+//#line 496 "e.y"
 { pocket("anon-lambda");
                                   yyval = thunk(val_peek(0)); }
 break;
-case 130:
-//#line 501 "e.y"
+case 125:
+//#line 505 "e.y"
 { yyval = noun(val_peek(0)); }
 break;
-case 131:
-//#line 510 "e.y"
+case 126:
+//#line 514 "e.y"
 { yyval = val_peek(1); }
 break;
-case 132:
-//#line 519 "e.y"
+case 127:
+//#line 523 "e.y"
 { yyval = ifx(val_peek(1), val_peek(0)); }
 break;
-case 133:
-//#line 520 "e.y"
+case 128:
+//#line 524 "e.y"
 { yyval = ifx(val_peek(3), val_peek(2), val_peek(0)); }
 break;
-case 134:
-//#line 521 "e.y"
+case 129:
+//#line 525 "e.y"
 { yyval = ifx(val_peek(3), val_peek(2), val_peek(0)); }
 break;
-case 135:
-//#line 526 "e.y"
+case 130:
+//#line 530 "e.y"
 { yyval = macro(val_peek(3), val_peek(2), val_peek(1), val_peek(0)); }
 break;
-case 136:
-//#line 528 "e.y"
+case 131:
+//#line 532 "e.y"
 { yyval = macro(val_peek(3), val_peek(2), val_peek(1), val_peek(0)); }
 break;
-case 137:
-//#line 532 "e.y"
+case 132:
+//#line 536 "e.y"
 { yyval = null; }
 break;
-case 140:
-//#line 538 "e.y"
+case 135:
+//#line 542 "e.y"
 { yyval = null; }
 break;
-case 141:
-//#line 540 "e.y"
+case 136:
+//#line 544 "e.y"
 { yyval = macro(val_peek(4), val_peek(3), val_peek(2), val_peek(1)); }
 break;
-case 142:
-//#line 542 "e.y"
+case 137:
+//#line 546 "e.y"
 { yyval = macro(val_peek(3), val_peek(2), val_peek(1), val_peek(0)); }
 break;
-case 143:
-//#line 547 "e.y"
+case 138:
+//#line 551 "e.y"
 { yyval = noun("simple__quasiParser"); }
 break;
-case 144:
-//#line 548 "e.y"
+case 139:
+//#line 552 "e.y"
 { yyval = noun(val_peek(0) +  "__quasiParser"); }
 break;
-case 145:
-//#line 549 "e.y"
+case 140:
+//#line 553 "e.y"
 { yyval = val_peek(1); }
 break;
-case 146:
-//#line 553 "e.y"
+case 141:
+//#line 557 "e.y"
 { yyval = list(val_peek(0)); }
 break;
-case 147:
-//#line 554 "e.y"
+case 142:
+//#line 558 "e.y"
 { yyval = with(val_peek(1), val_peek(0)); }
 break;
-case 148:
-//#line 558 "e.y"
+case 143:
+//#line 562 "e.y"
 { yyval = list(val_peek(1), val_peek(0)); }
 break;
-case 149:
-//#line 559 "e.y"
+case 144:
+//#line 563 "e.y"
 { yyval = with(with(val_peek(2), val_peek(1)), val_peek(0)); }
 break;
-case 150:
-//#line 563 "e.y"
+case 145:
+//#line 567 "e.y"
 { yyval = noun(val_peek(0)); }
 break;
-case 151:
-//#line 564 "e.y"
+case 146:
+//#line 568 "e.y"
 { yyval = val_peek(2); }
 break;
-case 152:
-//#line 568 "e.y"
+case 147:
+//#line 572 "e.y"
 { myLexer.quasiAgain(); }
 break;
-case 155:
-//#line 585 "e.y"
+case 150:
+//#line 589 "e.y"
 { yyval = list(val_peek(0)); }
 break;
-case 156:
-//#line 586 "e.y"
+case 151:
+//#line 590 "e.y"
 { yyval = with(val_peek(3), val_peek(0)); }
 break;
-case 158:
-//#line 596 "e.y"
+case 153:
+//#line 600 "e.y"
 { yyval = list(val_peek(0)); }
 break;
-case 159:
-//#line 597 "e.y"
+case 154:
+//#line 601 "e.y"
 { yyval = with(val_peek(3), val_peek(0)); }
 break;
-case 160:
-//#line 604 "e.y"
+case 155:
+//#line 608 "e.y"
 { yyval = new Assoc(ignore(), val_peek(0)); }
 break;
-case 162:
-//#line 609 "e.y"
+case 157:
+//#line 613 "e.y"
 { yyval = new Assoc(val_peek(2), val_peek(0)); }
 break;
-case 163:
-//#line 610 "e.y"
+case 158:
+//#line 614 "e.y"
 { reserved("var-extract-pattern"); }
 break;
-case 165:
-//#line 615 "e.y"
+case 160:
+//#line 619 "e.y"
 { yyval = suchThat(val_peek(2), val_peek(0)); }
 break;
-case 166:
-//#line 617 "e.y"
+case 161:
+//#line 621 "e.y"
 { reserved("meta pattern"); }
 break;
-case 168:
-//#line 622 "e.y"
+case 163:
+//#line 626 "e.y"
 { yyval = listPattern(val_peek(1)); }
 break;
-case 169:
-//#line 623 "e.y"
+case 164:
+//#line 627 "e.y"
 { yyval = cdrPattern(val_peek(3), val_peek(0)); }
 break;
-case 170:
-//#line 625 "e.y"
+case 165:
+//#line 629 "e.y"
 { reserved("map pattern"); }
 break;
-case 171:
-//#line 626 "e.y"
+case 166:
+//#line 630 "e.y"
 { reserved("map pattern"); }
 break;
-case 173:
-//#line 631 "e.y"
+case 168:
+//#line 635 "e.y"
 { yyval = patternEquals(val_peek(0)); }
 break;
-case 175:
-//#line 636 "e.y"
+case 170:
+//#line 640 "e.y"
 { yyval = quasiPattern(val_peek(1), val_peek(0)); }
 break;
-case 176:
-//#line 640 "e.y"
+case 171:
+//#line 644 "e.y"
 { yyval = list(val_peek(0)); }
 break;
-case 177:
-//#line 641 "e.y"
+case 172:
+//#line 645 "e.y"
 { yyval = with(val_peek(1), val_peek(0)); }
 break;
-case 178:
-//#line 645 "e.y"
+case 173:
+//#line 649 "e.y"
 { yyval = list(val_peek(1), val_peek(0)); }
 break;
-case 179:
-//#line 646 "e.y"
+case 174:
+//#line 650 "e.y"
 { yyval = with(with(val_peek(2), val_peek(1)), val_peek(0)); }
 break;
-case 182:
-//#line 655 "e.y"
+case 177:
+//#line 659 "e.y"
 { yyval = finalPattern(val_peek(0)); }
 break;
-case 183:
-//#line 656 "e.y"
+case 178:
+//#line 660 "e.y"
 { yyval = ignore(); }
 break;
-case 184:
-//#line 657 "e.y"
+case 179:
+//#line 661 "e.y"
 { yyval = val_peek(2); }
 break;
-case 185:
-//#line 670 "e.y"
+case 180:
+//#line 674 "e.y"
 { yyval = finalPattern(val_peek(2), val_peek(0)); }
 break;
-case 186:
-//#line 671 "e.y"
+case 181:
+//#line 675 "e.y"
 { yyval = finalPattern(val_peek(0)); }
 break;
-case 187:
-//#line 672 "e.y"
+case 182:
+//#line 676 "e.y"
 { yyval = slotDefiner(val_peek(0)); }
 break;
-case 188:
-//#line 673 "e.y"
+case 183:
+//#line 677 "e.y"
 { yyval = ignore(); }
 break;
-case 190:
-//#line 676 "e.y"
+case 185:
+//#line 680 "e.y"
 { yyval = quasiLiteralPatt(val_peek(1)); }
 break;
-case 191:
-//#line 677 "e.y"
+case 186:
+//#line 681 "e.y"
 { yyval = quasiPatternPatt(val_peek(1)); }
 break;
-case 192:
-//#line 679 "e.y"
+case 187:
+//#line 683 "e.y"
 { pocket("bind");
                                           yyval = bindDefiner(val_peek(2), val_peek(0)); }
 break;
-case 193:
-//#line 681 "e.y"
+case 188:
+//#line 685 "e.y"
 { pocket("bind");
                                           yyval = bindDefiner(val_peek(0)); }
 break;
-case 194:
-//#line 686 "e.y"
+case 189:
+//#line 690 "e.y"
 { yyval = varPattern(val_peek(2), val_peek(0)); }
 break;
-case 195:
-//#line 687 "e.y"
+case 190:
+//#line 691 "e.y"
 { yyval = varPattern(val_peek(0)); }
 break;
-case 196:
-//#line 696 "e.y"
+case 191:
+//#line 700 "e.y"
 { yyval = finalPattern(val_peek(0)); }
 break;
-case 197:
-//#line 697 "e.y"
+case 192:
+//#line 701 "e.y"
 { yyval = ignore(); }
 break;
-case 198:
-//#line 698 "e.y"
+case 193:
+//#line 702 "e.y"
 { yyval = varPattern(val_peek(0)); }
 break;
-case 199:
-//#line 699 "e.y"
+case 194:
+//#line 703 "e.y"
 { yyval = quasiLiteralPatt(val_peek(1)); }
 break;
-case 200:
-//#line 700 "e.y"
+case 195:
+//#line 704 "e.y"
 { yyval = quasiPatternPatt(val_peek(1)); }
 break;
-case 202:
-//#line 702 "e.y"
+case 197:
+//#line 706 "e.y"
 { pocket("bind");
                                           yyval = bindDefiner(val_peek(0)); }
 break;
-case 203:
-//#line 723 "e.y"
+case 198:
+//#line 727 "e.y"
 { yyval = list(); }
 break;
-case 204:
-//#line 724 "e.y"
+case 199:
+//#line 728 "e.y"
 { yyval = append(list(val_peek(3)),val_peek(1)); }
 break;
-case 207:
-//#line 736 "e.y"
+case 202:
+//#line 740 "e.y"
 { yyval = audits(val_peek(0), list()); }
 break;
-case 208:
-//#line 737 "e.y"
+case 203:
+//#line 741 "e.y"
 { pocket("auditors");
                                                   yyval = audits(val_peek(2), val_peek(0)); }
 break;
-case 209:
-//#line 742 "e.y"
+case 204:
+//#line 746 "e.y"
 { yyval = list(val_peek(0)); }
 break;
-case 210:
-//#line 743 "e.y"
+case 205:
+//#line 747 "e.y"
 { yyval = with(val_peek(3), val_peek(0)); }
 break;
-case 211:
-//#line 753 "e.y"
+case 206:
+//#line 757 "e.y"
 { yyval = method(val_peek(1), val_peek(0)); }
 break;
-case 212:
-//#line 755 "e.y"
+case 207:
+//#line 759 "e.y"
 { reserved("fields"); }
 break;
-case 213:
-//#line 756 "e.y"
+case 208:
+//#line 760 "e.y"
 { reserved("on event"); }
 break;
-case 214:
-//#line 757 "e.y"
+case 209:
+//#line 761 "e.y"
 { reserved("sealed meta"); }
 break;
-case 215:
-//#line 758 "e.y"
+case 210:
+//#line 762 "e.y"
 { reserved("sealed meta"); }
 break;
-case 216:
-//#line 766 "e.y"
+case 211:
+//#line 770 "e.y"
 { yyval = methHead("run", val_peek(2), val_peek(0)); }
 break;
-case 217:
-//#line 767 "e.y"
+case 212:
+//#line 771 "e.y"
 { yyval = methHead(val_peek(4), val_peek(2), val_peek(0)); }
 break;
-case 218:
-//#line 769 "e.y"
+case 213:
+//#line 773 "e.y"
 { pocket("no-paren-method");
                                                yyval = methHead(val_peek(1), list(), val_peek(0)); }
 break;
-case 219:
-//#line 778 "e.y"
+case 214:
+//#line 782 "e.y"
 { yyval = methHead("run", val_peek(2), val_peek(0)); }
 break;
-case 220:
-//#line 780 "e.y"
+case 215:
+//#line 784 "e.y"
 { pocket("one-method-object");
                                                yyval = methHead(val_peek(4), val_peek(2), val_peek(0)); }
 break;
-case 221:
-//#line 782 "e.y"
+case 216:
+//#line 786 "e.y"
 { pocket("no-paren-method");
                                                yyval = methHead(val_peek(1), list(), val_peek(0)); }
 break;
-case 222:
-//#line 791 "e.y"
+case 217:
+//#line 795 "e.y"
 { yyval = list(val_peek(4), val_peek(2), val_peek(0)); }
 break;
-case 223:
-//#line 801 "e.y"
+case 218:
+//#line 805 "e.y"
 { yyval = matcher(val_peek(1), val_peek(0)); }
 break;
-case 224:
-//#line 810 "e.y"
+case 219:
+//#line 814 "e.y"
 { yyval = delegatex(val_peek(0)); }
 break;
-case 225:
-//#line 817 "e.y"
+case 220:
+//#line 821 "e.y"
 { yyval = VOID; }
 break;
-case 226:
-//#line 818 "e.y"
+case 221:
+//#line 822 "e.y"
 { yyval = val_peek(0); }
 break;
-case 227:
-//#line 822 "e.y"
+case 222:
+//#line 826 "e.y"
 { yyval = val_peek(1); }
 break;
-case 228:
-//#line 827 "e.y"
+case 223:
+//#line 831 "e.y"
 { yyval = list(val_peek(6), val_peek(4), val_peek(2), val_peek(0)); }
 break;
-case 229:
-//#line 829 "e.y"
+case 224:
+//#line 833 "e.y"
 { pocket("when-clauses");
                                                   yyval = list(val_peek(4), val_peek(2), val_peek(0)); }
 break;
-case 230:
-//#line 834 "e.y"
+case 225:
+//#line 838 "e.y"
 { yyval = list(val_peek(0)); }
 break;
-case 231:
-//#line 835 "e.y"
+case 226:
+//#line 839 "e.y"
 { yyval = with(val_peek(2), val_peek(0)); }
 break;
-case 232:
-//#line 839 "e.y"
+case 227:
+//#line 843 "e.y"
 { list(val_peek(2), val_peek(0)); }
 break;
-case 237:
-//#line 857 "e.y"
+case 232:
+//#line 861 "e.y"
 { yyval = list(); }
 break;
-case 238:
-//#line 861 "e.y"
+case 233:
+//#line 865 "e.y"
 { yyval = list(); }
 break;
-case 241:
-//#line 871 "e.y"
+case 234:
+//#line 870 "e.y"
+{ yyval = val_peek(1); }
+break;
+case 235:
+//#line 874 "e.y"
+{ yyval = with(val_peek(3), thunk(val_peek(0))); }
+break;
+case 238:
+//#line 883 "e.y"
 { yyval = list(val_peek(0)); }
 break;
-case 242:
-//#line 872 "e.y"
+case 239:
+//#line 884 "e.y"
 { yyval = with(val_peek(2), val_peek(0)); }
 break;
-case 243:
-//#line 877 "e.y"
+case 240:
+//#line 889 "e.y"
 { yyval = list(val_peek(0)); }
 break;
-case 244:
-//#line 878 "e.y"
+case 241:
+//#line 890 "e.y"
 { yyval = with(val_peek(2), val_peek(0)); }
 break;
-case 245:
-//#line 882 "e.y"
+case 242:
+//#line 894 "e.y"
 { yyval = new Assoc(val_peek(2), val_peek(0)); }
 break;
-case 246:
-//#line 883 "e.y"
+case 243:
+//#line 895 "e.y"
 { reserved("export binding"); }
 break;
-case 248:
-//#line 896 "e.y"
+case 245:
+//#line 908 "e.y"
 { yyval = hilbert(val_peek(0)); }
 break;
-case 249:
-//#line 897 "e.y"
+case 246:
+//#line 909 "e.y"
 { reserved("keyword \"" +
                                                    ((Token)val_peek(0)).token() +
                                                    "\""); }
 break;
-case 250:
-//#line 913 "e.y"
+case 247:
+//#line 925 "e.y"
 { yyval = "add"; }
 break;
-case 251:
-//#line 914 "e.y"
+case 248:
+//#line 926 "e.y"
 { yyval = "and"; }
 break;
-case 252:
-//#line 915 "e.y"
+case 249:
+//#line 927 "e.y"
 { yyval = "approxDivide"; }
 break;
-case 253:
-//#line 916 "e.y"
+case 250:
+//#line 928 "e.y"
 { yyval = "floorDivide"; }
 break;
-case 254:
-//#line 917 "e.y"
+case 251:
+//#line 929 "e.y"
 { yyval = "shiftLeft"; }
 break;
-case 255:
-//#line 918 "e.y"
+case 252:
+//#line 930 "e.y"
 { yyval = "remainder"; }
 break;
-case 256:
-//#line 919 "e.y"
+case 253:
+//#line 931 "e.y"
 { yyval = "mod"; }
 break;
-case 257:
-//#line 920 "e.y"
+case 254:
+//#line 932 "e.y"
 { yyval = "multiply"; }
 break;
-case 258:
-//#line 921 "e.y"
+case 255:
+//#line 933 "e.y"
 { yyval = "or"; }
 break;
-case 259:
-//#line 922 "e.y"
+case 256:
+//#line 934 "e.y"
 { yyval = "pow"; }
 break;
-case 260:
-//#line 923 "e.y"
+case 257:
+//#line 935 "e.y"
 { yyval = "subtract"; }
 break;
-case 261:
-//#line 924 "e.y"
+case 258:
+//#line 936 "e.y"
 { yyval = "xor"; }
 break;
-case 262:
-//#line 933 "e.y"
+case 259:
+//#line 945 "e.y"
 { yyval = NULL; }
 break;
-case 263:
-//#line 934 "e.y"
+case 260:
+//#line 946 "e.y"
 { yyval = val_peek(2); }
 break;
-case 264:
-//#line 938 "e.y"
+case 261:
+//#line 950 "e.y"
 { yyval = val_peek(1); }
 break;
-case 265:
-//#line 943 "e.y"
+case 262:
+//#line 955 "e.y"
 { yyval = eScript(val_peek(2), optMatcher(val_peek(1))); }
 break;
-case 266:
-//#line 945 "e.y"
+case 263:
+//#line 957 "e.y"
 { pocket("plumbing");
                                   yyval = eScript(null, val_peek(0)); }
 break;
-case 267:
-//#line 947 "e.y"
+case 264:
+//#line 959 "e.y"
 { pocket("plumbing");
                                   yyval = eScript(null, val_peek(0)); }
 break;
-case 269:
-//#line 957 "e.y"
+case 266:
+//#line 969 "e.y"
 { yyval = with(val_peek(2), val_peek(1)); }
 break;
-case 271:
-//#line 962 "e.y"
+case 268:
+//#line 974 "e.y"
 { yyval = with(val_peek(2), val_peek(1)); }
 break;
-case 273:
-//#line 967 "e.y"
+case 270:
+//#line 979 "e.y"
 { yyval = with(val_peek(2), val_peek(1)); }
 break;
-case 276:
-//#line 984 "e.y"
+case 273:
+//#line 996 "e.y"
 { yyval = with(val_peek(1), val_peek(0)); }
 break;
-case 277:
-//#line 988 "e.y"
+case 274:
+//#line 1000 "e.y"
 { yyval = matcher(val_peek(1), val_peek(0)); }
 break;
-case 278:
-//#line 995 "e.y"
+case 275:
+//#line 1007 "e.y"
 { yyval = null; }
 break;
-case 279:
-//#line 996 "e.y"
+case 276:
+//#line 1008 "e.y"
 { yyval = val_peek(0); }
 break;
-case 280:
-//#line 1007 "e.y"
+case 277:
+//#line 1019 "e.y"
 { yyval = oType(val_peek(4), val_peek(1)); }
 break;
-case 281:
-//#line 1008 "e.y"
+case 278:
+//#line 1020 "e.y"
 { yyval = oType(val_peek(2), list(val_peek(1))); }
 break;
-case 285:
-//#line 1015 "e.y"
+case 282:
+//#line 1027 "e.y"
 { yyval = with(val_peek(3),val_peek(1)); }
 break;
-case 286:
-//#line 1019 "e.y"
+case 283:
+//#line 1031 "e.y"
 { yyval = list(val_peek(0)); }
 break;
-case 287:
-//#line 1020 "e.y"
+case 284:
+//#line 1032 "e.y"
 { yyval = with(val_peek(3),val_peek(0)); }
 break;
-case 288:
-//#line 1022 "e.y"
+case 285:
+//#line 1034 "e.y"
 { reserved("on event"); }
 break;
-case 289:
-//#line 1023 "e.y"
+case 286:
+//#line 1035 "e.y"
 { reserved("on event"); }
 break;
-case 290:
-//#line 1030 "e.y"
+case 287:
+//#line 1042 "e.y"
 { yyval = mType(val_peek(1),list(),val_peek(0)); }
 break;
-case 291:
-//#line 1031 "e.y"
+case 288:
+//#line 1043 "e.y"
 { yyval = mType(val_peek(4),val_peek(2),val_peek(0)); }
 break;
-case 292:
-//#line 1032 "e.y"
+case 289:
+//#line 1044 "e.y"
 { yyval = mType("run",val_peek(2),val_peek(0)); }
 break;
-case 293:
-//#line 1036 "e.y"
+case 290:
+//#line 1048 "e.y"
 { yyval = val_peek(0); }
 break;
-case 294:
-//#line 1037 "e.y"
+case 291:
+//#line 1049 "e.y"
 { yyval = val_peek(1); }
 break;
-case 295:
-//#line 1041 "e.y"
+case 292:
+//#line 1053 "e.y"
 { yyval = list(val_peek(0)); }
 break;
-case 296:
-//#line 1042 "e.y"
+case 293:
+//#line 1054 "e.y"
 { yyval = with(val_peek(3),val_peek(0)); }
 break;
-case 297:
-//#line 1049 "e.y"
+case 294:
+//#line 1061 "e.y"
 { yyval = pType(val_peek(1),val_peek(0)); }
 break;
-case 298:
-//#line 1050 "e.y"
+case 295:
+//#line 1062 "e.y"
 { yyval = pType(null,val_peek(0)); }
 break;
-case 299:
-//#line 1054 "e.y"
+case 296:
+//#line 1066 "e.y"
 { yyval = null; }
 break;
-case 300:
-//#line 1055 "e.y"
+case 297:
+//#line 1067 "e.y"
 { yyval = val_peek(0); }
 break;
-//#line 5966 "EParser.java"
+//#line 5691 "EParser.java"
 //########## END OF USER-SUPPLIED ACTIONS ##########
     }//switch
     //#### Now let's reduce... ####



1.7       +58 -9     e/src/jsrc/org/erights/e/elang/syntax/NeedMoreException.java

Index: NeedMoreException.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/NeedMoreException.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- NeedMoreException.java	2001/09/02 04:45:43	1.6
+++ NeedMoreException.java	2001/09/08 22:59:21	1.7
@@ -18,22 +18,71 @@
 
 Contributor(s): ______________________________________.
 */
+
 /**
- * Thrown if the input end sooner than expected
+ * Thrown if the input end sooner than expected, to suggest how much the
+ * next line of input should be indented.
  *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class NeedMoreException extends RuntimeException {
+
+    private boolean myQuoted;
+    private int myIndent;
+    private char myCloser;
+    private int closeIndent;
+
+    /**
+     * After msg, the remaining parameters are the same as for {@link
+     * LineFeeder}, with the same
+     *
+     * @param msg is the normal Exception message
+     * @param quoted Will this next line be taken as literal text?  If so,
+     *               then it should not be trimmed or indented.  'quoted' is
+     *               true between double quotes, or between quasi-quotes when
+     *               not inside a $ or @ hole.
+     * @param indent The suggested indentation level for the next line,
+     *               unless the next line begins with closer.
+     * @param closer The character that would close the most recent unclosed
+     *               openner.
+     * @param closeIndent The suggested indentation level for the next line
+     *                    if it does begin (after trimming) with closer.
+     */
+    public NeedMoreException(String msg,
+                             boolean quoted,
+                             int indent,
+                             char closer,
+                             int closeIndent)
+    {
+        super(msg);
+        myIndent = indent;
+    }
 
-    private int myNest = -1; //indicates unknown
+    /**
+     *
+     */
+    public boolean isQuoted() {
+        return myQuoted;
+    }
+
+    /**
+     *
+     */
+    public int indent() {
+        return myIndent;
+    }
 
-    //public NeedMoreException() {}
-    //public NeedMoreException(String s) { super(s); }
-    public NeedMoreException(String s, int nest) {
-        super(s);
-        myNest = nest;
+    /**
+     *
+     */
+    public char getCloser() {
+        return myCloser;
     }
-    public int nest() {
-        return myNest;
+
+    /**
+     *
+     */
+    public int getCloseIndent() {
+        return closeIndent;
     }
 }



1.82      +31 -19    e/src/jsrc/org/erights/e/elang/syntax/e.y

Index: e.y
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/e.y,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- e.y	2001/09/04 10:52:18	1.81
+++ e.y	2001/09/08 22:59:21	1.82
@@ -385,33 +385,37 @@
 postfix:
         call
  |      metaExpr
- |      postfix           '[' argList ']'    { $$ = call($1, "get", $3); }
- |      postfix Send verb '(' argList ')'    { $$ = send($1, $3, $5); }
- |      postfix Send      '(' argList ')'    { $$ = send($1, "run", $4); }
-
- |      postfix verb                         { pocket("no-paren-call");
-                                               $$ = call($1, $2, list()); }
- |      postfix '.' ident                    { pocket("dot-props");
-                                               $$ = property($1, $3, list()); }
- |      postfix '.' ident '(' argList ')'    { pocket("dot-props");
-                                               $$ = property($1, $3, $5); }
- |      postfix Send verb                    { pocket("no-paren-call");
-                                               $$ = send($1, $3, list()); }
+ |      postfix       '[' argList ']'   { $$ = call($1, "get", $3); }
+ |      postfix Send verb parenArgs     { $$ = send($1, $3, $4); }
+ |      postfix Send      parenArgs     { $$ = send($1, "run", $3); }
+
+/*
+ |      postfix Send verb               { pocket("no-paren-call");
+                                          $$ = send($1, $3, list()); }
+ |      postfix verb                    { pocket("no-paren-call");
+                                          $$ = call($1, $2, list()); }
+ |      postfix '.' ident               { pocket("dot-props");
+                                          $$ = property($1, $3, list()); }
+*/
+ |      postfix '.' ident parenArgs     { pocket("dot-props");
+                                          $$ = property($1, $3, $4); }
  ;
 
 /**
  *
  */
 metaExpr:
-        META           '(' argList ')'  { $$ = doMeta("run", $3); }
- |      META      verb '(' argList ')'  { $$ = doMeta($2, $4); }
- |      META Send      '(' argList ')'  { $$ = doMetaSend("run", $4); }
- |      META Send verb '(' argList ')'  { $$ = doMetaSend($3, $5); }
+        META           parenArgs        { $$ = doMeta("run", $2); }
+ |      META      verb parenArgs        { $$ = doMeta($2, $3); }
+ |      META Send      parenArgs        { $$ = doMetaSend("run", $3); }
+ |      META Send verb parenArgs        { $$ = doMetaSend($3, $4); }
 
+/*
  |      META      verb                  { pocket("no-paren-call");
                                           $$ = doMeta($2, list()); }
  |      META Send verb                  { pocket("no-paren-call");
                                           $$ = doMetaSend($3, list()); }
+*/
  ;
 
 
@@ -424,9 +428,9 @@
  */
 call:
         prim
- |      call             '(' argList ')'        { $$ = call($1, "run", $3); }
- |      postfix verb     '(' argList ')'        { $$ = call($1, $2, $4); }
- |      postfix verb '=' '(' argList ')'        { reserved("verb="); }
+ |      call             parenArgs      { $$ = call($1, "run", $2); }
+ |      postfix verb     parenArgs      { $$ = call($1, $2, $3); }
+ |      postfix verb '=' parenArgs      { reserved("verb="); }
  ;
 
 
@@ -861,6 +865,14 @@
         br                              { $$ = list(); }
  ;
 
+
+parenArgs:
+        '(' argList ')'                 { $$ = $2; }
+/*
+ |      '(' argList ')' body            { $$ = with($2, thunk($4)); }
+*/
+ |      '(' argList ')' THUNK body      { $$ = with($2, thunk($5)); }
+;
 
 argList:
         emptyBr



1.11      +23 -20    e/src/jsrc/org/erights/e/elib/deflect/Deflector.java

Index: Deflector.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/deflect/Deflector.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Deflector.java	2001/09/08 21:59:19	1.10
+++ Deflector.java	2001/09/08 22:59:21	1.11
@@ -23,6 +23,7 @@
 
 import org.erights.e.elib.base.Callable;
 import org.erights.e.elib.prim.E;
+import org.erights.e.elib.prim.StaticMaker;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.serial.PassByConstruction;
 import org.erights.e.elib.serial.Persistent;
@@ -68,12 +69,18 @@
  *
  * @author Mark S. Miller
  */
-public abstract class Deflector
+public class Deflector
 implements InvocationHandler, PassByConstruction, Selfless, Persistent {
 
     static private final long serialVersionUID = 8164442851196730818L;
 
     /**
+     *
+     */
+    static private final StaticMaker DeflectorMaker
+        = StaticMaker.make(Deflector.class);
+
+    /**
      * See the class comment about E-Interfaces
      */
     static private final Class[] EInterfaces = {
@@ -84,6 +91,11 @@
     };
 
     /**
+     *
+     */
+    static private final Object[] NO_ARGS = {};
+
+    /**
      * @serial The wrapped/target/deflected object.
      */
     /*package*/ Callable myDeflected;
@@ -112,13 +124,7 @@
         }
         Class[] faces = (Class[])faceList.getArray(Class.class);
         Callable targ = Ref.toCallable(target);
-        InvocationHandler handler;
-
-        //if (EventListener.class.isAssignableFrom(face)) {
-        //    handler = new EventualDeflector(targ, face);
-        //} else {
-            handler = new ImmediateDeflector(targ, face);
-        //}
+        InvocationHandler handler = new Deflector(targ);
         return Proxy.newProxyInstance(Callable.class.getClassLoader(),
                                       faces,
                                       handler);
@@ -132,14 +138,17 @@
     }
 
     /**
-     * The original deflected target object.
+     * Uses 'DeflectorMaker new(myDeflected)'
      */
-    public Callable getDeflected() { return myDeflected; }
+    public Object[] getCanonicalState() {
+        Object[] result = { DeflectorMaker, "new", myDeflected };
+        return result;
+    }
 
     /**
-     *
+     * The original deflected target object.
      */
-    static private final Object[] NO_ARGS = {};
+    public Callable getDeflected() { return myDeflected; }
 
     /**
      * This is the magic method invoked by the Proxy mechanism. <p>
@@ -181,13 +190,7 @@
 
         String verb = method.getName();
         Class retType = method.getReturnType();
-        return innerInvoke(verb, args, retType);
+        Object result = myDeflected.callAll(verb, args);
+        return E.as(result, retType);
     }
-
-    /**
-     * Must return something already coerced to retType.
-     */
-    /*package*/ abstract Object innerInvoke(String verb,
-                                            Object[] args,
-                                            Class retType);
 }



1.26      +50 -122   e/src/jsrc/org/erights/e/elib/prim/Runner.java

Index: Runner.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/prim/Runner.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- Runner.java	2001/09/06 09:55:48	1.25
+++ Runner.java	2001/09/08 22:59:21	1.26
@@ -19,12 +19,12 @@
 Contributor(s): ______________________________________.
 */
 
-import org.erights.e.develop.trace.Trace;
 import org.erights.e.elib.base.Thunk;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.ref.Resolver;
 import org.erights.e.elib.ref.ResultResolver;
 
+import java.awt.EventQueue;
 import java.lang.ref.ReferenceQueue;
 
 /**
@@ -34,39 +34,43 @@
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  * @author Many improvements due to suggestions by E-Dean Tribble
  */
-public final class Runner implements Runnable {
+public abstract class Runner {
 
     /**
-     * The number of Runnables to dequeue and run in one go.
-     * Must be >= 1.
-     */
-    static private int DEQUEUE_GRANULARITY = 25;
-
-    /**
-     * Note that SynchQueue is a thread-safe data structure with its own lock.
+     *
      */
-    private SynchQueue myQ;
+    static public Runner uiRunner() {
+        return AWTRunner.THE_ONE;
+    }
 
     /**
-     * If we ever go orthogonal again, myThread must not be
-     * checkpointed.  Ie, it must be a DISALLOWED_FIELD or 'transient'
-     * or something.
+     *
      */
-    private transient RunnerThread myThread;
+    static public Runner newHeadless(String name) {
+        return new RunnerImpl(name);
+    }
 
     /**
-     * The ticket number of the Runnable currently being run() (or, if
-     * we're idle, the one that has just been run()).  Used for causality
-     * tracing.
+     * If called from within a thread servicing a Runner, returns that
+     * Runner.  Otherwise, throws an exception.
      */
-    private long myServingTicket = -1;
+    static public Runner currentRunner() {
+        Thread t = Thread.currentThread();
+        if (t instanceof RunnerThread) {
+            return (Runner)((RunnerThread)t).myRunnable;
+        }
+        if (EventQueue.isDispatchThread()) {
+            return AWTRunner.THE_ONE;
+        }
+        throw new RuntimeException("Must be in a vat");
+    }
 
     /**
      * The ticket number to be "dispensed" to the next enqueued Runnable.
      * Ie, the ticket number that will be being served when this next
      * Runnable will be run().  May be used for causality tracing.
      */
-    private long myNextTicket = 0;
+    /*package*/ long myNextTicket = 0;
 
     /**
      * Has an orderly shutdown been requested?
@@ -78,27 +82,14 @@
      */
     private final ReferenceQueue myWeakPtrQueue;
 
-    /**
-     * Makes a Runner, and starts the thread that services its queue.
-     * The name of the thread will be "Vat Thread".
-     */
-    public Runner() {
-        this("Vat Thread");
-    }
-
     /**
-     * Makes a Runner, and starts the thread that services its queue.
-     *
-     * @param name is the name to give to the thread created.
+     * Makes a Runner.
      */
-    public Runner(String name) {
-        myQ = new SynchQueue(Runnable.class);
-        myThread = new RunnerThread(this, name);
+    /*package*/ Runner(String name) {
         myWeakPtrQueue = new ReferenceQueue();
         Thread wpt = new WeakPtrThread(myWeakPtrQueue,
                                        this,
                                        "WeakPtr " + name);
-        myThread.start();
         wpt.start();
     }
 
@@ -107,15 +98,16 @@
      * we're idle, the one that has just been run()).  Used for causality
      * tracing.
      */
-    public long servingTicket() { return myServingTicket; }
-
+    public abstract long servingTicket();
 
     /**
      * The ticket number to be "dispensed" to the next enqueued Runnable.
      * Ie, the ticket number that will be being served when this next
      * Runnable will be run().  May be used for causality tracing.
      */
-    public long nextTicket() { return myNextTicket; }
+    public long nextTicket() {
+        return myNextTicket;
+    }
 
     /**
      *
@@ -125,50 +117,15 @@
     }
 
     /**
-     * If called from within a thread servicing a Runner, returns that
-     * Runner.  Otherwise, throws an exception.
-     */
-    static public Runner currentRunner() {
-        Thread t = Thread.currentThread();
-        if (t instanceof RunnerThread) {
-            return (Runner)((RunnerThread)t).myRunnable;
-        } else {
-            throw new RuntimeException("Must be in a vat");
-        }
-    }
-
-    /**
      * Tests whether the current thread is the vat-thread of this vat.
      */
-    public boolean isCurrentThreadInVat() {
-        return Thread.currentThread() == myThread;
-    }
+    public abstract boolean isCurrentThreadInVat();
 
     /**
-     * Performs a Thread.stop(t) on the thread executing the current
-     * event.  <p>
-     *
-     * Note that Thread.stop() does not stop the thread (obvious huh?), but
-     * rather causes that thread to experience a "spontaneously" thrown
-     * exception.
-     *
-     * @deprecated Since Thread.stop() is also deprecated, but will be
-     * available as long as Thread.stop() remains available.
-     * @see java.lang.Thread#stop
-     */
-    public void disturbEvent(Throwable t) {
-        myThread.stop(t);
-    }
-
-    /**
      * Enqueue's something for this Runnable's thread to do.  May be called
      * from any thead.
      */
-    public void enqueue(Runnable todo) {
-        //enqueueing is guarded by the queue's lock, not the vatLock.
-        myQ.enqueue(todo);
-        myNextTicket++;
-    }
+    public abstract void enqueue(Runnable todo);
 
     /**
      * Enqueues a 'rec <- verb(args...)' and returns a promise for the
@@ -199,28 +156,38 @@
     /**
      * Schedules a thunk to execute in a Vat (in the RunnerThread as a
      * separate turn while holding the VatLock), while also effectively
-     * executing as a synchronous call within the requestors's thread. <p>
-     *
+     * executing as a synchronous call within the requestors's thread.
+     * <p>
      * In most ways this can be thought of as a symmetric rendezvous between
      * the two Threads.  The reason we *specify* that the thunk is executed
      * specifically in the requested Vat's RunnerThread is so that
      * thread-scoped state, such as Runner.currentRunner(), will be according
      * to the Runner receiving the now() request, not whatever thread made
-     * the request. <p>
-     *
+     * the request.
+     * <p>
      * At the moment Runner.currentRunner() is our only example of
      * thread-scoped state.  This state is used by E.send() to determine on
-     * which Runner's queue to enqueue the delivery).
+     * which Runner's queue to enqueue the delivery), and is captured by
+     * others to remember what Runner created them.
+     * <p>
+     * If this is invoked from within the runner thread that it would
+     * schedule todo on, then, to avoid a deadlock (thanks Dean!), we simply
+     * invoke todo synchronously instead.
      */
     public Object now(Thunk todo) {
-        NowRunnable nr = new NowRunnable(todo);
-        enqueue(nr);
-        return nr.runNow();
+        if (isCurrentThreadInVat()) {
+            return todo.run();
+        } else {
+            NowRunnable nr = new NowRunnable(todo);
+            enqueue(nr);
+            return nr.runNow();
+        }
     }
 
     /**
      * Does a now() around <pre>
-     * "E.callAll(rec, verb, args)". </pre>
+     *     E.callAll(rec, verb, args)
+     * </pre>
      * The outcome of callNow() is the outcome of the E.callAll().
      *
      * @see org.erights.e.elib.prim.Runner#now
@@ -250,44 +217,5 @@
      */
     /*package*/ boolean isShuttingDown() {
         return myIsShuttingDown;
-    }
-
-    /**
-     * Called only by Thread.start(). <p>
-     *
-     * (XXX It's a modularity bug for this to be public.) Pulls Runnables off
-     * of the queue until there aren't any more, then waits until there's
-     * more to do.
-     */
-    public void run() {
-        while (true) {
-            try {
-                Thread.yield();
-                //within each chunk, wait if necessary for the first one.
-                Runnable todo = (Runnable)myQ.dequeue();
-                int i = DEQUEUE_GRANULARITY;
-                while (null != todo) {
-                    myServingTicket++;
-                    todo.run();
-                    if (i <= 0) {
-                        break;
-                    }
-                    i--;
-                    todo = (Runnable)myQ.optDequeue();
-                }
-            } catch (ShutDownVatException sdve) {
-                //this kludge is the least painful way I could think
-                //of to do an orderly Scott-like shutdown (as in
-                //Scott's queue class) of a vat thread without
-                //imposing *any* extra overhead on the normal case.
-                return;
-            } catch (Throwable t) {
-                if (Trace.causality.error) {
-                    Trace.causality.errorReportException(t,
-                        "Exception made it all the way out of the run " +
-                        "loop. Restarting it.");
-                }
-            }
-        }
     }
 }



1.1                  e/src/jsrc/org/erights/e/elib/prim/AWTRunner.java

Index: AWTRunner.java
===================================================================
package org.erights.e.elib.prim;

/*
The contents of this file are subject to the Electric Communities E Open
Source Code License Version 1.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of the License
at http://www.communities.com/EL/.

Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
the specific language governing rights and limitations under the License.

The Original Code is the Distributed E Language Implementation, released
July 20, 1998.

The Initial Developer of the Original Code is Electric Communities.
Copyright (C) 1998 Electric Communities. All Rights Reserved.

Contributor(s): ______________________________________.
*/

import org.erights.e.develop.trace.Trace;
import org.erights.e.elib.base.Thunk;
import org.erights.e.elib.ref.Ref;
import org.erights.e.elib.ref.Resolver;
import org.erights.e.elib.ref.ResultResolver;

import java.lang.ref.ReferenceQueue;
import java.awt.EventQueue;

/**
 * Uses the AWT Event Thread as a virtual RunnerThread, so that Swing can be
 * "in" this vat.
 *
 * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
 */
/*package*/ final class AWTRunner extends Runner {

    static /*package*/ final Runner THE_ONE =
      new AWTRunner("AWT Runner");

    /**
     * Makes a Runner, and starts the thread that services its queue.
     *
     * @param name is the name to give to the thread created.
     */
    private AWTRunner(String name) {
        super(name);
    }

    /**
     *
     */
    public boolean isCurrentThreadInVat() {
        return EventQueue.isDispatchThread();
    }

    /**
     *
     */
    public long servingTicket() {
        return -1; //XXX for now
    }

    /**
     *
     */
    public void enqueue(Runnable todo) {
        EventQueue.invokeLater(todo);
        myNextTicket++;
    }
}



1.1                  e/src/jsrc/org/erights/e/elib/prim/RunnerImpl.java

Index: RunnerImpl.java
===================================================================
package org.erights.e.elib.prim;

/*
The contents of this file are subject to the Electric Communities E Open
Source Code License Version 1.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of the License
at http://www.communities.com/EL/.

Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
the specific language governing rights and limitations under the License.

The Original Code is the Distributed E Language Implementation, released
July 20, 1998.

The Initial Developer of the Original Code is Electric Communities.
Copyright (C) 1998 Electric Communities. All Rights Reserved.

Contributor(s): ______________________________________.
*/

import org.erights.e.develop.trace.Trace;
import org.erights.e.elib.base.Thunk;
import org.erights.e.elib.ref.Ref;
import org.erights.e.elib.ref.Resolver;
import org.erights.e.elib.ref.ResultResolver;

import java.lang.ref.ReferenceQueue;

/**
 * Runs when it can, but never on empty.  A thread services a queue
 * of Runnables.
 *
 * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
 * @author Many improvements due to suggestions by E-Dean Tribble
 */
/*package*/ final class RunnerImpl extends Runner implements Runnable {

    /**
     * The number of Runnables to dequeue and run in one go.
     * Must be >= 1.
     */
    static private int DEQUEUE_GRANULARITY = 25;

    /**
     * Note that SynchQueue is a thread-safe data structure with its own lock.
     */
    private SynchQueue myQ;

    /**
     * If we ever go orthogonal again, myThread must not be
     * checkpointed.  Ie, it must be a DISALLOWED_FIELD or 'transient'
     * or something.
     */
    private transient RunnerThread myThread;

    /**
     * The ticket number of the Runnable currently being run() (or, if
     * we're idle, the one that has just been run()).  Used for causality
     * tracing.
     */
    /*package*/ long myServingTicket = -1;

    /**
     * Makes a Runner, and starts the thread that services its queue.
     *
     * @param name is the name to give to the thread created.
     */
    /*package*/ RunnerImpl(String name) {
        super(name);
        myQ = new SynchQueue(Runnable.class);
        myThread = new RunnerThread(this, name);
        myThread.start();
    }

    /**
     *
     */
    public long servingTicket() {
        return myServingTicket;
    }

    /**
     *
     */
    public boolean isCurrentThreadInVat() {
        return Thread.currentThread() == myThread;
    }

    /**
     * Performs a Thread.stop(t) on the thread executing the current
     * event.  <p>
     *
     * Note that Thread.stop() does not stop the thread (obvious huh?), but
     * rather causes that thread to experience a "spontaneously" thrown
     * exception.
     *
     * @deprecated Since Thread.stop() is also deprecated, but will be
     * available as long as Thread.stop() remains available.
     * @see java.lang.Thread#stop
     */
    public void disturbEvent(Throwable t) {
        myThread.stop(t);
    }

    /**
     *
     */
    public void enqueue(Runnable todo) {
        //enqueueing is guarded by the queue's lock, not the vatLock.
        myQ.enqueue(todo);
        myNextTicket++;
    }

    /**
     * Called only by Thread.start(). <p>
     *
     * (XXX It's a modularity bug for this to be public.) Pulls Runnables off
     * of the queue until there aren't any more, then waits until there's
     * more to do.
     */
    public void run() {
        while (true) {
            try {
                Thread.yield();
                //within each chunk, wait if necessary for the first one.
                Runnable todo = (Runnable)myQ.dequeue();
                int i = DEQUEUE_GRANULARITY;
                while (null != todo) {
                    myServingTicket++;
                    todo.run();
                    if (i <= 0) {
                        break;
                    }
                    i--;
                    todo = (Runnable)myQ.optDequeue();
                }
            } catch (ShutDownVatException sdve) {
                //this kludge is the least painful way I could think
                //of to do an orderly Scott-like shutdown (as in
                //Scott's queue class) of a vat thread without
                //imposing *any* extra overhead on the normal case.
                return;
            } catch (Throwable t) {
                if (Trace.causality.error) {
                    Trace.causality.errorReportException(t,
                        "Exception made it all the way out of the run " +
                        "loop. Restarting it.");
                }
            }
        }
    }
}



1.10      +4 -2      e/src/jsrc/org/erights/e/elib/tests/TestMultiQMain.java

Index: TestMultiQMain.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/tests/TestMultiQMain.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- TestMultiQMain.java	2000/11/13 10:43:45	1.9
+++ TestMultiQMain.java	2001/09/08 22:59:22	1.10
@@ -54,8 +54,10 @@
         // Also, we'll specify the target object for each ref.
         // Creating the new Runner instances also has the effect of creating
         // and starting a thread for each Runner instance.
-        DeviceRef ref1 = new DeviceRef(new Runner(), target1);
-        DeviceRef ref2 = new DeviceRef(new Runner(), target2);
+        DeviceRef ref1 = new DeviceRef(Runner.newHeadless("t1"),
+                                       target1);
+        DeviceRef ref2 = new DeviceRef(Runner.newHeadless("t2"),
+                                       target2);
 
         // Give the target2 DeviceRef to target1.
         PrintStreamWriter.out().println("Sending ref2 to target1...");



1.38      +4 -4      e/src/jsrc/org/erights/e/ui/elmer/EInterpAdapter.java

Index: EInterpAdapter.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/ui/elmer/EInterpAdapter.java,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- EInterpAdapter.java	2001/09/07 05:49:25	1.37
+++ EInterpAdapter.java	2001/09/08 22:59:22	1.38
@@ -79,9 +79,9 @@
                     myOuts,
                     myOuts,      //errs
 
-                    new Runner("Elmer Vat Thread"),
+                    Runner.uiRunner(),
                     sacrificial, //never used, but suppresses
-                    //filename processing
+                                 //filename processing
                     null,        //optTopScope
                     true);       //partialFlag
         } catch (AlreadyDefinedException ade) {
@@ -141,8 +141,8 @@
 
         } catch (NeedMoreException nme) {
             String msg = left + "> ";
-            if (nme.nest() >= 1) {
-                msg += StringHelper.multiply(" ", nme.nest());
+            if (nme.indent() >= 1) {
+                msg += StringHelper.multiply(" ", nme.indent());
             }
             echo(msg, pos+1);
             return;