|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
89 Token(
size_t tokenRow,
size_t tokenColumn, std::string* identifierContent =
nullptr);
130 bool match(
const std::string& str,
bool word =
false);
148 explicit Lexer(std::istream& input);
157 const std::vector<Token>&
tokens()
const;
The namespace for all OGDF objects.
Just a simple token struct representing a DOT file fragment.
Token(size_t tokenRow, size_t tokenColumn, std::string *identifierContent=nullptr)
static std::string toString(const Type &type)
Returns string representation of given token type.
size_t row
Indicates a token row (line).
bool tokenize()
Scans input and turns it into token list.
bool identifier(Token &token)
Checks whether head is an identifier.
bool isDotAlnum(signed char c)
Checks if character is allowed in an identifier by DOT standard.
std::string * value
Identifier content (nullptr for non-id tokens).
const std::vector< Token > & tokens() const
Returns list of tokens (first use Lexer::tokenize())
std::vector< Token > m_tokens
Type type
The type of an field.
Lexer(std::istream &input)
Initializes lexer with given input (but does nothing to it).
bool match(const Token::Type &type, bool word=false)
Checks if head matches given token. Advances head on success.
size_t column
Indicated a token column.