37 rules.push_back(
Rule(
id, name, boost::regex(
"\\A(" + regex +
")")));
43 if (
pos >= (
int)
src.size())
55 if (boost::regex_search(
56 src.c_str() +
pos, result, rule.regex, boost::regex_constants::match_default))
119 for (
int i = 0; i < (int)
src.length(); i++)
123 column = i - lineStart + 1;
134 column =
pos - lineStart;
LexerInfo getPositionInfo(int pos)
std::vector< Rule > rules
void addRule(int id, const std::string &name, const std::string ®ex)
void positionToLineAndColumn(int pos, int &line, int &column)
SimpleLexer(std::string src, int tokenFin=-1, int tokenError=-2)
std::string tokenIdToName(int id)
std::string currentTokenValue
This file offers overloads of toIce() and fromIce() functions for STL container types.