/** 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);
}
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);