reproduce the Parser.java