From 6076f07a78d5e01a53304b0ae9df97273a0688fe Mon Sep 17 00:00:00 2001 From: megacz Date: Fri, 30 Jan 2004 07:00:54 +0000 Subject: [PATCH] 2003/06/09 00:07:40 darcs-hash:20040130070054-2ba56-ae17578ebe8ef8e861c29d3a7affa6a7aefd65fb.gz --- src/org/xwt/js/ByteCodeBlock.java | 42 ++++++++++++++----------------------- src/org/xwt/js/JS.java | 37 ++++++++++++++++++++++++++------ src/org/xwt/js/Lexer.java | 2 +- src/org/xwt/js/Parser.java | 2 +- src/org/xwt/js/Tokens.java | 2 -- 5 files changed, 49 insertions(+), 36 deletions(-) diff --git a/src/org/xwt/js/ByteCodeBlock.java b/src/org/xwt/js/ByteCodeBlock.java index a0e675c..5813274 100644 --- a/src/org/xwt/js/ByteCodeBlock.java +++ b/src/org/xwt/js/ByteCodeBlock.java @@ -39,7 +39,6 @@ class ByteCodeBlock implements ByteCodes, Tokens { return this; } - public Object eval(final JS.Scope s) throws ControlTransferException, JS.Exn { return eval(s, new Vec()); } public Object eval(final JS.Scope s, Vec t) throws ControlTransferException { for(int i=0; icode */ public void consume(int code) throws IOException { if (getToken() != code) - throw new ParserException("expected " + codeToString[code] + ", got " + (op == -1 ? "EOL" : codeToString[op])); + throw new ParserException("expected " + codeToString[code] + ", got " + (op == -1 ? "EOF" : codeToString[op])); } /** append the largest expression beginning with prefix containing no operators of precedence below minPrecedence */ diff --git a/src/org/xwt/js/Tokens.java b/src/org/xwt/js/Tokens.java index 11508fb..e9391c1 100644 --- a/src/org/xwt/js/Tokens.java +++ b/src/org/xwt/js/Tokens.java @@ -6,8 +6,6 @@ interface Tokens { // Token Constants ////////////////////////////////////////////////////////// - public static final int EOL = -1; // end of line - // arithmetic operations; also valid as bytecodes public static final int BITOR = 0; // | public static final int ASSIGN_BITOR = 1; // |= -- 1.7.10.4