111 if (buffer_pos < buffer_end)
117 if (buffer_pos < buffer_end)
132 const uint8_t *count_start =
current;
141 const uint8_t *count_finish =
current;
Methods that work on Unicode codepoints.
parser_unicoil_json()
Constructor.
Definition: parser_unicoil_json.h:50
token current_token
The token that is currently being build. A reference to this is returned when the token is complete...
Definition: parser.h:127
C++ slices (string-descriptors)
Definition: slice.h:27
Simple, but fast, XML parser.
Definition: parser.h:39
const uint8_t * end_of_document
Pointer to the end of the document, used to avoid read past end of buffer.
Definition: parser.h:126
slice lexeme
The token itself, stored as a slice (pointer / length pair)
Definition: parser.h:85
Simple XML parser that does't do either attributes or entities.
uint8_t buffer[max_token_length]
The token manages its memory through this buffer.
Definition: parser.h:84
virtual ~parser_unicoil_json()
Destructor.
Definition: parser_unicoil_json.h:63
virtual const class parser::token & get_next_token(void)
Continue parsing the input looking for the next token. Note that the definition of token here is no t...
Definition: parser_unicoil_json.h:78
static void unittest(void)
Unit test this class.
Definition: parser_unicoil_json.cpp:16
static constexpr size_t largest_impact
The largest allowable immpact score (255 is an good value).
Definition: index_postings_impact.h:42
token eof_token
Sentinal returned when reading past end of document.
Definition: parser.h:123
token_type type
The type of this token (See token_type)
Definition: parser.h:86
const uint8_t * current
The current location within the document.
Definition: parser.h:125
Parser for documents from the UniCOIL data in JSON format.
Definition: parser_unicoil_json.h:40
A token as returned by the parser.
Definition: parser.h:58
Definition: compress_integer_elias_delta_simd.c:23
static int isdigit(uint8_t c)
Is this character a digit?
Definition: ascii.h:134
alphabetic token
Definition: parser.h:67
index_postings_impact::impact_type count
The number of times the token is seen (normally 1, but if parsing a forward index it might be known t...
Definition: parser.h:87
fast locale-ignoring version of the C runtime library ctype methods for plain 7-bit ASCII...