// Path: src/stone/ast/ASTree.java
// public abstract class ASTree implements Iterable<ASTree> {
//     public abstract ASTree child(int i);
//     public abstract int numChildren();
//     public abstract Iterator<ASTree> children();
//     public abstract String location();
//     public Iterator<ASTree> iterator() { return children(); }
// }
// 
// Path: src/stone/ast/NullStmnt.java
// public class NullStmnt extends ASTList {
//     public NullStmnt(List<ASTree> c) { super(c); }
// }


import stone.*;
import stone.ast.ASTree;
import stone.ast.NullStmnt;
import java.io.FileReader;
import java.io.FileNotFoundException;
package chap6;

public class BasicFileInterpreter {
    public static void main(String[] args)
        throws ParseException, FileNotFoundException
    {
        run(new BasicParser(), new BasicEnv(), args[0]);
    }

    public static void run(BasicParser bp, Environment env, String fileName)
        throws ParseException, FileNotFoundException
    {
        FileReader reader = new FileReader(fileName);
        Lexer lexer = new Lexer(reader);
        while (lexer.peek(0) != Token.EOF) {
// Path: src/stone/ast/ASTree.java
// public abstract class ASTree implements Iterable<ASTree> {
//     public abstract ASTree child(int i);
//     public abstract int numChildren();
//     public abstract Iterator<ASTree> children();
//     public abstract String location();
//     public Iterator<ASTree> iterator() { return children(); }
// }
// 
// Path: src/stone/ast/NullStmnt.java
// public class NullStmnt extends ASTList {
//     public NullStmnt(List<ASTree> c) { super(c); }
// }


// Path: src/chap6/BasicFileInterpreter.java
import stone.*;
import stone.ast.ASTree;
import stone.ast.NullStmnt;
import java.io.FileReader;
import java.io.FileNotFoundException;

package chap6;

public class BasicFileInterpreter {
    public static void main(String[] args)
        throws ParseException, FileNotFoundException
    {
        run(new BasicParser(), new BasicEnv(), args[0]);
    }

    public static void run(BasicParser bp, Environment env, String fileName)
        throws ParseException, FileNotFoundException
    {
        FileReader reader = new FileReader(fileName);
        Lexer lexer = new Lexer(reader);
        while (lexer.peek(0) != Token.EOF) {
            ASTree t = bp.parse(lexer);