32 if ((
c >=
'a' &&
c <=
'z') || (
c >=
'A' &&
c <=
'Z') ||
c ==
'_') {
34 }
else if (
c >=
'0' &&
c <=
'9') {
36 }
else if (
c ==
' ' ||
c ==
'\t') {
41 in_.
stream().exceptions(std::ios_base::badbit);
47 in_.
stream().clear(std::ios_base::goodbit);
48 in_.
stream().exceptions(std::ios_base::goodbit);
53 #ifdef DEBUG_TOKENIZER
205 for (; *cmd; ++cmd) {
231 std::string *
dst =
nullptr;
std::istream & stream()
Returns the owned stream.
bool is_space(int c) const
int peek_char()
return the next character without incrementing the current position in the istream
std::array< character_type, END_STANDARD_ASCII > char_types_
void skip_comment()
handles skipping over comments (inline and on a separate line) as well as the special processing need...
const token & next_token()
Reads characters off of in_ to return the next token type and its value.
bool skip_command(char const *cmd)
Returns true if the next characters are the one from cmd followed by a space.
bool is_alnum(int c) const
void next_char()
increments the line number if the current character is a newline set current_ to the next character t...
void next_char_skip_cr()
set current_ to the next character skip the \r in the \r\n Windows-style line endings the test_cvs_20...
character_type
the different types of characters while parsing TOK_NONE is also the default for anything beyond stan...
unsigned in
If equal to search_counter, the node is off the list.
constexpr unsigned char INLINED_PREPROCESS_DIRECTIVE_CHAR
constexpr int END_STANDARD_ASCII
rect dst
Location on the final composed sheet.
contains the current text being parsed as well as the token_type of what's being parsed.
token_type
used for a token's type field
@ QSTRING
quoted string, contained within double quotes or by less than/greater than symbols
@ MISC
any characters that don't have special meaning
@ UNTERMINATED_QSTRING
reached end of file without finding the closing character for a QSTRING
@ END
set when EOF is returned by the input stream
std::string value
the token's value, can be either a single character or multiple characters
Some defines: VERSION, PACKAGE, MIN_SAVEGAME_VERSION.