Scid
4.7.0
|
Classes | |
class | InputMemory |
Functions | |
constexpr unsigned long long | init_symbol_map (unsigned elem) |
Creates a 128 bits bitmap of PGN symbol characters. More... | |
bool | is_PGNsymbol (unsigned char ch) |
Checks if the given character is a PGN symbol. More... | |
bool | is_PGNdigit (unsigned char ch) |
Checks if the given character is one of the 10 decimal digits: 0123456789. More... | |
bool | 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 | is_PGNtermination (TView tok) |
Checks if a token is the game termination marker. More... | |
template<typename TInput , typename TVisitor > | |
bool | parse_token (char ch, TInput &input, TVisitor &parser, int §ion) |
Read a token and dispatch it to a PGN parser. More... | |
constexpr unsigned long long pgn_impl::init_symbol_map | ( | unsigned | elem | ) |
Creates a 128 bits bitmap of PGN symbol characters.
"A symbol token starts with a letter or digit character and is immediately followed by a sequence of zero or more symbol continuation characters. These continuation characters are letter characters ("A-Za-z"), digit characters ("0-9"), the underscore ("_"), the plus sign ("+"), the octothorpe sign ("#"), the equal sign ("="), the colon (":"), and the hyphen ("-")."
elem | 0 for the lower 64 bits, 1 for the higher 64 bits. |
Definition at line 52 of file pgn_lexer.h.
|
inline |
Checks if the given character is one of the 10 decimal digits: 0123456789.
ch | character to classify. |
Definition at line 101 of file pgn_lexer.h.
|
inline |
Checks if the given character is a PGN symbol.
ch | character to classify. |
Definition at line 88 of file pgn_lexer.h.
char pgn_impl::is_PGNtermination | ( | TView | tok | ) |
Checks if a token is the game termination marker.
"The game termination marker is a symbol that is one of the following four values: "1-0" (White wins), "0-1" (Black wins), "1/2-1/2" (drawn game), and "*" (game in progress, result unknown, or game abandoned)."
tok | the token to classify. |
Definition at line 127 of file pgn_lexer.h.
|
inline |
Checks if the given character is a white space ("white space characters include space, newline, and tab characters").
ch | character to classify. |
Definition at line 109 of file pgn_lexer.h.
bool pgn_impl::parse_token | ( | char | ch, |
TInput & | input, | ||
TVisitor & | parser, | ||
int & | section | ||
) |
Read a token and dispatch it to a PGN parser.
The first char of the token is used to determine its termination.
ch | the first char of the token. |
input | the input to get data from. |
parser | will receive the tokens via visitPGN_* functions. |
section | -1 pregame, 0 for tag pair section, 1 for movetext section. |
Definition at line 158 of file pgn_lexer.h.