Add parse method in Parser.java