Jean-Marc discovered a possible data loss caused by Parser::getChar().
This is now fixed, and Parser::getChar() is removed, since it is no longer
needed and easy to use it in the wrong way.
}
-char Parser::getChar()
-{
- if (!good())
- error("The input stream is not well...");
- return get_token().character();
-}
-
-
bool Parser::hasOpt()
{
// An optional argument can occur in any of the following forms:
std::string verbatim_item();
///
std::string verbatimOption();
- /*!
- * Returns the character of the current token and increments
- * the token position.
- */
- char getChar();
///
void error(std::string const & msg);
/// The previous token.
// followed by number?
if (p.next_token().cat() == catOther) {
- char c = p.getChar();
- paramtext += c;
+ string s = p.get_token().asInput();
+ paramtext += s;
// number = current arity + 1?
- if (c == arity + '0' + 1)
+ if (s.size() == 1 && s[0] == arity + '0' + 1)
++arity;
else
simple = false;