|
#include <ArmarXGui/libraries/StructuralJson/SimpleLexer.h>
Classes | |
struct | Rule |
Public Member Functions | |
void | addRule (int id, const std::string &name, const std::string ®ex) |
LexerInfo | getPositionInfo (int pos) |
int | nextToken () |
void | positionToLineAndColumn (int pos, int &line, int &column) |
void | reset () |
SimpleLexer (std::string src, int tokenFin=-1, int tokenError=-2) | |
std::string | tokenIdToName (int id) |
Public Attributes | |
int | currentTokenId |
std::string | currentTokenValue |
int | lastPos |
int | pos |
std::vector< Rule > | rules |
std::string | src |
int | tokenError |
int | tokenFin |
Definition at line 29 of file SimpleLexer.h.
SimpleLexer | ( | std::string | src, |
int | tokenFin = -1 , |
||
int | tokenError = -2 |
||
) |
Definition at line 25 of file SimpleLexer.cpp.
void addRule | ( | int | id, |
const std::string & | name, | ||
const std::string & | regex | ||
) |
Definition at line 34 of file SimpleLexer.cpp.
LexerInfo getPositionInfo | ( | int | pos | ) |
int nextToken | ( | ) |
Definition at line 39 of file SimpleLexer.cpp.
void positionToLineAndColumn | ( | int | pos, |
int & | line, | ||
int & | column | ||
) |
void reset | ( | ) |
Definition at line 69 of file SimpleLexer.cpp.
std::string tokenIdToName | ( | int | id | ) |
Definition at line 77 of file SimpleLexer.cpp.
int currentTokenId |
Definition at line 59 of file SimpleLexer.h.
std::string currentTokenValue |
Definition at line 60 of file SimpleLexer.h.
int lastPos |
Definition at line 56 of file SimpleLexer.h.
int pos |
Definition at line 55 of file SimpleLexer.h.
std::vector<Rule> rules |
Definition at line 63 of file SimpleLexer.h.
std::string src |
Definition at line 57 of file SimpleLexer.h.
int tokenError |
Definition at line 62 of file SimpleLexer.h.
int tokenFin |
Definition at line 62 of file SimpleLexer.h.