// Path: src/stone/Token.java
// public abstract class Token {
//     public static final Token EOF = new Token(-1){}; // end of file
//     public static final String EOL = "\\n";          // end of line 
//     private int lineNumber;
// 
//     protected Token(int line) {
//         lineNumber = line;
//     }
//     public int getLineNumber() { return lineNumber; }
//     public boolean isIdentifier() { return false; }
//     public boolean isNumber() { return false; }
//     public boolean isString() { return false; }
//     public int getNumber() { throw new StoneException("not number token"); }
//     public String getText() { return ""; }
// }
// 
// Path: src/stone/StoneException.java
// public class StoneException extends RuntimeException {
//     public StoneException(String m) { super(m); }
//     public StoneException(String m, ASTree t) {
//         super(m + " " + t.location());
//     }
// }


import javassist.gluonj.*;
import stone.Token;
import stone.StoneException;
import stone.ast.*;
import java.util.List;
package chap6;

@Reviser public class BasicEvaluator {
    public static final int TRUE = 1;
    public static final int FALSE = 0;
    @Reviser public static abstract class ASTreeEx extends ASTree {
        public abstract Object eval(Environment env);
    }
    @Reviser public static class ASTListEx extends ASTList {
        public ASTListEx(List<ASTree> c) { super(c); }
        public Object eval(Environment env) {
            throw new StoneException("cannot eval: " + toString(), this);
        }
    }
    @Reviser public static class ASTLeafEx extends ASTLeaf {
// Path: src/stone/Token.java
// public abstract class Token {
//     public static final Token EOF = new Token(-1){}; // end of file
//     public static final String EOL = "\\n";          // end of line 
//     private int lineNumber;
// 
//     protected Token(int line) {
//         lineNumber = line;
//     }
//     public int getLineNumber() { return lineNumber; }
//     public boolean isIdentifier() { return false; }
//     public boolean isNumber() { return false; }
//     public boolean isString() { return false; }
//     public int getNumber() { throw new StoneException("not number token"); }
//     public String getText() { return ""; }
// }
// 
// Path: src/stone/StoneException.java
// public class StoneException extends RuntimeException {
//     public StoneException(String m) { super(m); }
//     public StoneException(String m, ASTree t) {
//         super(m + " " + t.location());
//     }
// }


// Path: src/chap6/BasicEvaluator.java
import javassist.gluonj.*;
import stone.Token;
import stone.StoneException;
import stone.ast.*;
import java.util.List;

package chap6;

@Reviser public class BasicEvaluator {
    public static final int TRUE = 1;
    public static final int FALSE = 0;
    @Reviser public static abstract class ASTreeEx extends ASTree {
        public abstract Object eval(Environment env);
    }
    @Reviser public static class ASTListEx extends ASTList {
        public ASTListEx(List<ASTree> c) { super(c); }
        public Object eval(Environment env) {
            throw new StoneException("cannot eval: " + toString(), this);
        }
    }
    @Reviser public static class ASTLeafEx extends ASTLeaf {
        public ASTLeafEx(Token t) { super(t); }