SimpleLexer Class Reference

#include <ArmarXGui/libraries/StructuralJson/SimpleLexer.h>

Classes

struct  Rule
 

Public Member Functions

void addRule (int id, const std::string &name, const std::string &regex)
 
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
 

Constructor & Destructor Documentation

◆ SimpleLexer()

SimpleLexer ( std::string src,
int tokenFin = -1,
int tokenError = -2 )

Member Function Documentation

◆ addRule()

void addRule ( int id,
const std::string & name,
const std::string & regex )

◆ getPositionInfo()

LexerInfo getPositionInfo ( int pos)

◆ nextToken()

int nextToken ( )

◆ positionToLineAndColumn()

void positionToLineAndColumn ( int pos,
int & line,
int & column )

◆ reset()

void reset ( )

◆ tokenIdToName()

std::string tokenIdToName ( int id)

Member Data Documentation

◆ currentTokenId

int currentTokenId

◆ currentTokenValue

std::string currentTokenValue

◆ lastPos

int lastPos

◆ pos

int pos

◆ rules

std::vector<Rule> rules

◆ src

std::string src

◆ tokenError

int tokenError

◆ tokenFin

int tokenFin

The documentation for this class was generated from the following files: