package metalexer;

import java.io.IOException;
import java.io.Reader;

import beaver.Scanner;

public class LayoutScannerTestTool extends ScannerTestTool {
    private LayoutScannerTestTool() {
        super(LayoutParser.Terminals.EOF, LayoutParser.Terminals.NAMES);
    }

    protected Scanner makeScanner(Reader in) {
        return new LayoutScanner(in);
    }

    public static void main(String[] args) {
        if (args.length != 1) {
            System.err.println("Usage: java metalexer.LayoutScannerTestTool {basename}");
            System.exit(1);
        }
        try {
            new LayoutScannerTestTool().processFile(args[0]);
            System.exit(0);
        } catch(IOException e) {
            e.printStackTrace();
            System.exit(2);
        }
    }
}
