示例#1
0
std::string Toker::eatQuote()
{
  _state = quote_state;
  std::string tok(1,currChar);
  while(!isEndQuote())
  {
    getChar();
    tok.append(1,currChar);
  }
  getChar();
  tok.append(1,currChar);
  _state = default_state;
  return tok;
}
std::string Toker::eatQuote()
{
	_state = quote_state;
	std::string tok(1, currChar);
	while (!isEndQuote())
	{
		if (!pIn->good())
			throw std::exception("missing end of quote");
		getChar();
		tok.append(1, currChar);
	}
	getChar();
	tok.append(1, currChar);
	_state = default_state;
	return tok;
}