Expressions
- Reordered operator table so that longer operators match first, thus disambiguating between ! and !=. - Eliminated Expression::expand_expression. - Modified Nibbler to know what a DOM reference looks like. - Removed alpha equivalent operators (lt, le, gt, ge, not, eq, ne) because these are common in descriptions (French: le, ne). - Modified Arguments and Nibbler unit tests.
This commit is contained in:
@@ -908,6 +908,32 @@ bool Nibbler::getOneOf (
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Nibbler::getDOM (std::string& found)
|
||||
{
|
||||
std::string::size_type i = mCursor;
|
||||
std::string::size_type start = mCursor;
|
||||
|
||||
while ( isdigit (mInput[i]) ||
|
||||
mInput[i] == '.' ||
|
||||
mInput[i] == '-' ||
|
||||
mInput[i] == '_' ||
|
||||
(! ispunct (mInput[i]) &&
|
||||
! isspace (mInput[i])))
|
||||
{
|
||||
++i;
|
||||
}
|
||||
|
||||
if (i > mCursor)
|
||||
{
|
||||
found = mInput.substr (start, i - start);
|
||||
mCursor = i;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Nibbler::skipN (const int quantity /* = 1 */)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user