|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Lexical analyzer for scanning and tokenizing input in the JSON5 format. More...
#include <GREM/core/formats/json.hpp>
Public Types | |
| using | allocator_type = Allocator<VariantBase<Allocator>> |
| Allocator type used by the lexer. | |
| using | Token = TokenBase<Allocator> |
| Token type of the lexer. | |
Public Member Functions | |
| Lexer (unicode::UTF8Iterator< It > it, unicode::UTF8Sentinel end, const SourceLocation &source, const allocator_type &allocator=allocator_type()) | |
| Construct a lexer with a Unicode iterator pair as input. | |
| Lexer (const Lexer &other, const allocator_type &allocator) | |
| Copy constructor. | |
| Lexer (Lexer &&other, const allocator_type &allocator) noexcept | |
| Move constructor. | |
| ~Lexer ()=default | |
| Destructor. | |
| Lexer (const Lexer &other) | |
| Copy constructor. | |
| Lexer (Lexer &&other) noexcept | |
| Move constructor. | |
| Lexer & | operator= (const Lexer &other) |
| Copy assignment. | |
| Lexer & | operator= (Lexer &&other) noexcept |
| Move assignment. | |
| allocator_type | get_allocator () const noexcept |
| Get the allocator used by the lexer. | |
| Token | scan () |
| Scan and consume the next token from the input. | |
Lexical analyzer for scanning and tokenizing input in the JSON5 format.
| It | iterator type of the underlying input source. Must be an input iterator. |
| using grem::json::Lexer< It, Allocator >::allocator_type = Allocator<VariantBase<Allocator>> |
Allocator type used by the lexer.
| using grem::json::Lexer< It, Allocator >::Token = TokenBase<Allocator> |
Token type of the lexer.
|
inline |
Construct a lexer with a Unicode iterator pair as input.
| it | iterator to the beginning of the JSON input to scan. |
| end | sentinel that marks the end of the JSON input to scan. |
| source | initial source location corresponding to the current position of the iterator. |
| allocator | allocator to use. |
|
inline |
Copy constructor.
|
inlinenoexcept |
Move constructor.
|
default |
Destructor.
|
inline |
Copy constructor.
|
inlinenoexcept |
Move constructor.
|
inline |
Copy assignment.
|
inlinenoexcept |
Move assignment.
|
inlinenodiscardnoexcept |
Get the allocator used by the lexer.
|
inline |
Scan and consume the next token from the input.
This advances the internal state of the lexer.
| json::Error | on invalid input. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
| any | exception thrown by the underlying input iterator. |