private static void test(String filename) {
        try{
        	InputStream inp = new FileInputStream(filename);
        	ErrorList e = new ErrorList(filename);
        	Lexer tmp = new Lexer(inp,e);
        	java_cup.runtime.Symbol x=tmp.next_token();
            while(x.sym != Sym.EOF){
            	System.out.printf("token: %-3d %-10s %-8s",x.sym,SymName.getName(x.sym),((TokenInfo)x.value).info+"");
            	System.out.println("\t@"+x.left+","+x.right);
            	x=tmp.next_token();
            }
            e.print_error();
        }
        catch (IOException e) {
            System.err.println("IO exception");
        }
    }