Just a simple token struct representing a DOT file fragment. More...
#include <ogdf/fileformats/DotLexer.h>
Public Member Functions | |
Token (size_t tokenRow, size_t tokenColumn, std::string *identifierContent=nullptr) | |
Static Public Member Functions | |
static std::string | toString (const Type &type) |
Returns string representation of given token type. More... | |
Public Attributes | |
size_t | column |
Indicated a token column. More... | |
size_t | row |
Indicates a token row (line). More... | |
Type | type |
The type of an field. More... | |
std::string * | value |
Identifier content (nullptr for non-id tokens). More... | |
Just a simple token struct representing a DOT file fragment.
Each token is represented by type: its either special string (a keyword or punctuation character) or identifier (which is normal string).
Additionaly, each token have its row and column fields indicating where it appeared. This information could be useful for displaying useful debug messages.
Definition at line 55 of file DotLexer.h.
|
strong |
Enumerator | |
---|---|
assignment | |
colon | |
semicolon | |
comma | |
edgeOpDirected | |
edgeOpUndirected | |
leftBracket | |
rightBracket | |
leftBrace | |
rightBrace | |
graph | |
digraph | |
subgraph | |
node | |
edge | |
strict | |
identifier |
Definition at line 56 of file DotLexer.h.
ogdf::dot::Token::Token | ( | size_t | tokenRow, |
size_t | tokenColumn, | ||
std::string * | identifierContent = nullptr |
||
) |
|
static |
Returns string representation of given token type.
size_t ogdf::dot::Token::column |
Indicated a token column.
Definition at line 85 of file DotLexer.h.
size_t ogdf::dot::Token::row |
Indicates a token row (line).
Definition at line 83 of file DotLexer.h.
Type ogdf::dot::Token::type |
The type of an field.
Definition at line 81 of file DotLexer.h.
std::string* ogdf::dot::Token::value |
Identifier content (nullptr for non-id tokens).
Definition at line 87 of file DotLexer.h.