DeSR Dependency Parser |
#include <TokenPath.h>
Public Types | |
enum | Direction { leftChild, rightChild, parent, leftSibling, rightSibling, previous, next } |
Public Member Functions | |
TokenPath (int root) | |
void | add (Direction d) |
Extend the path with a new leg d . | |
char const * | Code () const |
std::ostream & | serialize (std::ostream &os) const |
Static Public Member Functions | |
static int | get (std::string &tok) |
Public Attributes | |
std::vector< Direction > | path |
path to the token | |
int | root |
the start token position | |
std::string | code |
code string | |
Static Public Attributes | |
static char const * | Names [] |
static char const *const | dirCode = "/\\^<>-+" |
Definition at line 37 of file TokenPath.h.
void Parser::TokenPath::add | ( | Direction | d | ) | [inline] |
char const * Parser::TokenPath::Code | ( | ) | const |
std::ostream& Parser::TokenPath::serialize | ( | std::ostream & | os | ) | const |
char const * Parser::TokenPath::Names [static] |
Initial value:
{ "leftChild", "rightChild", "parent", "leftSibling", "rightSibling", "prev", "next" }
Definition at line 49 of file TokenPath.h.