added some readXXX() methods to parser to read text-value. added some methods to check state of parser.