2004/01/13 10:27:47
[org.ibex.core.git] / src / org / xwt / js / Parser.java
index 0601bbd..bffeeb4 100644 (file)
@@ -73,7 +73,7 @@ class Parser extends Lexer implements ByteCodes {
 
     /** for debugging */
     public static void main(String[] s) throws Exception {
-        JSFunction block = JSFunction.fromReader("stdin", 0, new InputStreamReader(System.in));
+        JS block = JS.fromReader("stdin", 0, new InputStreamReader(System.in));
         if (block == null) return;
         System.out.println(block);
     }
@@ -370,9 +370,9 @@ class Parser extends Lexer implements ByteCodes {
             Grammar g = parseGrammar(null);
             if (peekToken() == LC) {
                 g.action = new JSFunction(sourceName, parserLine, null);
-                parseBlock(g.action);
-                g.action.add(parserLine, LITERAL, null);         // in case we "fall out the bottom", return NULL              
-                g.action.add(parserLine, RETURN);
+                parseBlock((JSFunction)g.action);
+                ((JSFunction)g.action).add(parserLine, LITERAL, null);         // in case we "fall out the bottom", return NULL              
+                ((JSFunction)g.action).add(parserLine, RETURN);
             }
             b.add(parserLine, MAKE_GRAMMAR, g);
             b.add(parserLine, PUT);