Scid
4.7.0
|
Split input into PGN tokens and dispatch them to a "visiting" parser. More...
#include <algorithm>
#include <cassert>
Go to the source code of this file.
Classes | |
class | pgn_impl::InputMemory |
Namespaces | |
pgn_impl | |
pgn | |
Functions | |
constexpr unsigned long long | pgn_impl::init_symbol_map (unsigned elem) |
Creates a 128 bits bitmap of PGN symbol characters. More... | |
bool | pgn_impl::is_PGNsymbol (unsigned char ch) |
Checks if the given character is a PGN symbol. More... | |
bool | pgn_impl::is_PGNdigit (unsigned char ch) |
Checks if the given character is one of the 10 decimal digits: 0123456789. More... | |
bool | pgn_impl::is_PGNwhitespace (unsigned char ch) |
Checks if the given character is a white space ("white space characters
include space, newline, and tab characters"). More... | |
template<typename TView > | |
char | pgn_impl::is_PGNtermination (TView tok) |
Checks if a token is the game termination marker. More... | |
template<typename TInput , typename TVisitor > | |
bool | pgn_impl::parse_token (char ch, TInput &input, TVisitor &parser, int §ion) |
Read a token and dispatch it to a PGN parser. More... | |
template<typename TVisitor > | |
std::pair< std::size_t, bool > | pgn::parse_game (pgn_impl::InputMemory input, TVisitor &&parser) |
Read a PGN game from memory, grouping characters in tokens and dispatching them to a PGN parser. More... | |
template<bool unescape = false, typename TString > | |
std::size_t | pgn::normalize (TString &str, std::size_t pos) |
Normalize white spaces and converts Latin-1 chars to UTF-8 sequences. More... | |
template<typename TString > | |
void | pgn::escape_string (TString &str, std::size_t pos) |
Escape quote and backslash chars according to the PGN standard: "A quote inside a string is represented by the backslash immediately followed by a quote. More... | |
template<typename TView > | |
std::size_t | pgn::trim (TView &str) |
Trim leading and trailing white spaces. More... | |
Split input into PGN tokens and dispatch them to a "visiting" parser.
Definition in file pgn_lexer.h.