|
Yume
|
Contains the state while the tokenizer is running, such as the position within the file currently being read. More...

Public Member Functions | |
| void | tokenize () |
| Tokenizer (std::istream &in, const char *source_file) | |
| auto | tokens () |
Static Public Attributes | |
| static constexpr const auto | is_word |
| Words consist of alphanumeric characters, or underscores, but must begin with a letter. More... | |
| static constexpr const auto | is_str |
Strings are delimited by double quotes " and may contain escapes. More... | |
| static constexpr const auto | is_char_lit |
Character literals begin with a question mark ? and may contain escapes. More... | |
| static constexpr const auto | is_comment |
Comments begin with an octothorpe # and last until the end of the line. More... | |
| static constexpr const auto | is_num_or_hex_num |
This matches both regular numbers (0-9), and hex number. Hex numbers begin with 0x, and consist of any of 0-9, a-f or A-F. If the first character is a 0, is is ambiguous and must be checked further. More... | |
| static constexpr const auto | is_any_of |
Generate a criterion matching a single character from any within the string checks. More... | |
| static constexpr const auto | is_partial |
| Generate a criterion matching one or both of the character. More... | |
| static constexpr const auto | is_char |
| Generate a criterion matching the singular character. More... | |
Contains the state while the tokenizer is running, such as the position within the file currently being read.
|
inline |
|
inline |
Definition at line 177 of file token.cpp.
References yume::Token::Char, yume::Token::EndOfFile, is_any_of, is_char, is_char_lit, is_comment, is_num_or_hex_num, is_partial, is_str, is_word, yume::Token::Literal, yume::Token::Number, yume::Token::Separator, yume::Token::Skip, yume::Token::Symbol, and yume::Token::Word.
|
staticconstexpr |
Generate a criterion matching a single character from any within the string checks.
Definition at line 155 of file token.cpp.
Referenced by tokenize().
|
staticconstexpr |
Generate a criterion matching the singular character.
Definition at line 173 of file token.cpp.
Referenced by tokenize().
|
staticconstexpr |
Character literals begin with a question mark ? and may contain escapes.
Definition at line 109 of file token.cpp.
Referenced by tokenize().
|
staticconstexpr |
Comments begin with an octothorpe # and last until the end of the line.
Definition at line 128 of file token.cpp.
Referenced by tokenize().
|
staticconstexpr |
This matches both regular numbers (0-9), and hex number. Hex numbers begin with 0x, and consist of any of 0-9, a-f or A-F. If the first character is a 0, is is ambiguous and must be checked further.
Definition at line 136 of file token.cpp.
Referenced by tokenize().
|
staticconstexpr |
Generate a criterion matching one or both of the character.
Definition at line 162 of file token.cpp.
Referenced by tokenize().
|
staticconstexpr |
Strings are delimited by double quotes " and may contain escapes.
Definition at line 87 of file token.cpp.
Referenced by tokenize().
|
staticconstexpr |
Words consist of alphanumeric characters, or underscores, but must begin with a letter.
Definition at line 80 of file token.cpp.
Referenced by tokenize().