Nibbler: Removed unused ::getRx method

This commit is contained in:
Paul Beckingham
2015-10-29 23:23:41 -04:00
parent de66200028
commit 1e8eac0e3d
3 changed files with 0 additions and 57 deletions

View File

@@ -32,9 +32,6 @@
#include <Lexer.h>
#include <Nibbler.h>
#include <util.h>
#ifdef NIBBLER_FEATURE_REGEX
#include <RX.h>
#endif
#include <Lexer.h>
#include <util.h>
#include <memory>
@@ -492,34 +489,6 @@ bool Nibbler::getLiteral (const std::string& literal)
return false;
}
////////////////////////////////////////////////////////////////////////////////
#ifdef NIBBLER_FEATURE_REGEX
bool Nibbler::getRx (const std::string& regex, std::string& result)
{
if (_cursor < _length)
{
// Regex may be anchored to the beginning and include capturing parentheses,
// otherwise they are added.
std::string modified_regex;
if (regex.substr (0, 2) != "^(")
modified_regex = "^(" + regex + ")";
else
modified_regex = regex;
RX r (modified_regex, true);
std::vector <std::string> results;
if (r.match (results, _input->substr (_cursor)))
{
result = results[0];
_cursor += result.length ();
return true;
}
}
return false;
}
#endif
////////////////////////////////////////////////////////////////////////////////
bool Nibbler::getUUID (std::string& result)
{