Add parseReference method to Parser.java