public Parser(String filename) {
        BufferedReader reader = null;
        
        try {
            Gson gson = 
                new GsonBuilder().
                    registerTypeHierarchyAdapter(
                        Token.class, 
                        new Token.TokenAdapter()
                    ).
                    create();
            
            reader = new BufferedReader(new FileReader(filename));
            Token[] tokens = gson.fromJson(reader, Token[].class);
            iterator = new TokenIterator(tokens);
        } catch(java.io.IOException ex) {
//            ex.printStackTrace();
        } finally {
            try {
                reader.close();
            } catch(java.io.IOException ex) {
//                ex.printStackTrace();
            }
        }
    }