ROSE
0.11.21.0
|
Parse an address interval.
An interval is specified in one of the following forms, where N and M are non-negative integers:
The integers can be specified in decimal, octal, hexadecimal, or binary using the usual C/C++ syntax.
#include <Utility.h>
Public Types | |
typedef Sawyer::SharedPointer< AddressIntervalParser > | Ptr |
Shared-ownership pointer to an AddressIntervalParser. More... | |
![]() | |
typedef SharedPointer< ValueParser > | Ptr |
Reference counting pointer for this class. More... | |
Static Public Member Functions | |
static Ptr | instance () |
static Ptr | instance (const Sawyer::CommandLine::ValueSaver::Ptr &valueSaver) |
static std::string | docString () |
static AddressInterval | parse (const char *input, const char **rest) |
Parse an interval from a C string. More... | |
static AddressInterval | parse (const std::string &input) |
Parse an interval from a C++ string. More... | |
Protected Member Functions | |
AddressIntervalParser (const Sawyer::CommandLine::ValueSaver::Ptr &valueSaver) | |
![]() | |
ValueParser () | |
Constructor for derived classes. More... | |
ValueParser (const ValueSaver::Ptr &valueSaver) | |
Constructor for derived classes. More... | |
Additional Inherited Members | |
![]() | |
ParsedValue | matchString (const std::string &) |
Parse the entire string and return a value. More... | |
ParsedValue | match (Cursor &) |
Parse a value from the beginning of the specified string. More... | |
Ptr | valueSaver (const ValueSaver::Ptr &f) |
Property: functor responsible for saving a parsed value in user storage. More... | |
const ValueSaver::Ptr | valueSaver () const |
Property: functor responsible for saving a parsed value in user storage. More... | |
![]() | |
SharedObject () | |
Default constructor. More... | |
SharedObject (const SharedObject &) | |
Copy constructor. More... | |
virtual | ~SharedObject () |
Virtual destructor. More... | |
SharedObject & | operator= (const SharedObject &) |
Assignment. More... | |
![]() | |
SharedPointer< ValueParser > | sharedFromThis () |
Create a shared pointer from this . More... | |
SharedPointer< const ValueParser > | sharedFromThis () const |
Create a shared pointer from this . More... | |
typedef Sawyer::SharedPointer<AddressIntervalParser> Rose::BinaryAnalysis::Partitioner2::AddressIntervalParser::Ptr |
Shared-ownership pointer to an AddressIntervalParser.
See Shared ownership.
|
static |
Parse an interval from a C string.
Tries to parse an interval from the input
string, and if successful adjusts rest
to point to the first character beyond what was parsed. If a syntax error occurs, then an std::runtime_error
is thrown.
|
static |
Parse an interval from a C++ string.
Tries to parse an interval from the input
string. The string may contain leading and trailing white space, but any extra characters will cause a syntax error. Syntax errors are reported by throwing std::runtime_error
. Since the underlying parsing is done on C strings, this function is ill-defined when the input
contains NUL bytes.