Orcus
|
Protected Types | |
using | numeric_parser_type = std::function< const char *(const char *, const char *, double &)> |
Protected Member Functions | |
parser_base (const char *p, size_t n) | |
void | set_numeric_parser (const numeric_parser_type &func) |
bool | has_char () const |
bool | has_next () const |
void | next (size_t inc=1) |
void | prev (size_t dec=1) |
char | cur_char () const |
char | peek_char (std::size_t offset=1) const |
std::string_view | peek_chars (std::size_t length) const |
void | skip_bom () |
void | skip (std::string_view chars_to_skip) |
void | skip_space_and_control () |
bool | parse_expected (std::string_view expected) |
double | parse_double () |
size_t | remaining_size () const |
size_t | available_size () const |
std::ptrdiff_t | offset () const |
Protected Attributes | |
const char *const | mp_begin |
const char * | mp_char |
const char * | mp_end |
|
inlineprotected |
Determine the number of characters available from the current character to the end of the buffer. The current character is included.
|
protected |
Return the current offset from the beginning of the character stream.
|
protected |
Try to parse the next characters as double, or return NaN in case of failure.
|
protected |
Parse and check next characters to see if it matches specified character sequence.
expected | sequence of characters to match against. |
|
protected |
Peek a character at specified offset from the current position without advancing the current position.
offset | offset from the current position to peek at. |
|
protected |
Peek a segment of contiguous characters of a specified length starting from the current position.
length | length of the segment to peek. |
|
protected |
Determine the number of characters remaining after the current character. For instance, if the current character is on the last character in the stream, this method will return 0, whereas if it's on the first character, it will return the total length - 1.
|
protected |
Skip an optional byte order mark at the current position of the stream.
Currently we only check for UTF-8 BOM.
|
protected |
Skip all characters that are 0-32 in ASCII range