Nibbler: Dead code removal

This commit is contained in:
Paul Beckingham 2015-07-17 14:51:27 -04:00
parent 9177c5b697
commit a89c996334
2 changed files with 0 additions and 69 deletions

View file

@ -507,74 +507,6 @@ bool Nibbler::getNumber (double &result)
return isnumber;
}
////////////////////////////////////////////////////////////////////////////////
// number:
// int frac? exp?
//
// int:
// digit+
//
// frac:
// . digit+
//
// exp:
// e digit+
//
// e:
// e|E (+|-)?
//
bool Nibbler::getUnsignedNumber (double& result)
{
auto i = _cursor;
// digit+
if (i < _length && Lexer::isDigit (_input[i]))
{
++i;
while (i < _length && Lexer::isDigit (_input[i]))
++i;
// ( . digit+ )?
if (i < _length && _input[i] == '.')
{
++i;
while (i < _length && Lexer::isDigit (_input[i]))
++i;
}
// ( [eE] [+-]? digit+ )?
if (i < _length && (_input[i] == 'e' || _input[i] == 'E'))
{
++i;
if (i < _length && (_input[i] == '+' || _input[i] == '-'))
++i;
if (i < _length && Lexer::isDigit (_input[i]))
{
++i;
while (i < _length && Lexer::isDigit (_input[i]))
++i;
result = strtof (_input.substr (_cursor, i - _cursor).c_str (), NULL);
_cursor = i;
return true;
}
return false;
}
result = strtof (_input.substr (_cursor, i - _cursor).c_str (), NULL);
_cursor = i;
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool Nibbler::getLiteral (const std::string& literal)
{

View file

@ -71,7 +71,6 @@ public:
bool getUnsignedInt (int&);
bool getNumber (std::string&);
bool getNumber (double&);
bool getUnsignedNumber (double&);
bool getLiteral (const std::string&);
#ifdef NIBBLER_FEATURE_REGEX
bool getRx (const std::string&, std::string&);