std::string NewickTreeReader::readString(std::istream &in) const { std::string str; while(!endOfInput(in) && characterIsNormal(peekNextCharacter(in))) str += readNextCharacter(in); return str; }
double NewickTreeReader::readBranchLength(std::istream &in) const { if(!endOfInput(in) && characterStartsBranchLength(peekNextCharacter(in))) { ignoreNextCharacter(in); return readNumber(in); } return 0.0; }
static void reset() { state = WAIT_LONG; endOfInput(); }