16#define throw __debugbreak(); throw
50 std::string
str()
const
72 bool in_char_group =
false;
73 unsigned int count = 0;
75 for (
size_t i = 0;
i <
exp.size();
i++)
90 in_char_group =
false;
103 if (
exp[
i + 1] !=
'?')
117 std::string combinedString;
119 if (tokendefs.size() == 0)
125 for (
auto def : tokendefs)
133 throw "invalid count!\n";
138 combinedString =
"(?:" + tokendefs[0].RegExString +
")";
139 for (
size_t i = 1;
i < tokendefs.size();
i++)
141 combinedString +=
"|(?:" + tokendefs[
i].RegExString +
")";
144 return std::regex(combinedString, std::regex_constants::icase);
169 const std::string::const_iterator
first =
str.cbegin() + startpos;
170 const std::string::const_iterator
last =
str.cend();
175 return TOKEN_REF{
static_cast<unsigned int>(startpos), 0, -1 };
183 throw "Failed to match\n";
191 throw "Failed to match at current position!\n";
199 unsigned int len =
static_cast<unsigned int>(
matches.length(
i));
206 throw "Something went wrong!\n";
231 while (startpos <
len)
235 startpos += tref.len;
TokenList(const Tokenizer &tokenizer, const std::string &text)
std::vector< TOKEN_REF > m_tokens
const Tokenizer & m_tokenizer
typename Tokenizer::TOKEN_REF TOKEN_REF
Token operator[](size_t n) const
const std::string & m_text
const std::string & m_text
Token(const std::string &text, size_t pos, size_t len, int type)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static unsigned(__cdecl *hash_bstr)(bstr_t s)
static unsigned int count_captures(const std::string &exp)
TOKEN_REF match(std::smatch &matches, const std::string &str, size_t startpos) const
const std::vector< TOKEN_DEF > & m_tokendefs
TOKEN_REF match(std::smatch &matches, const std::string &str) const
static std::regex CompileMultiRegex(const std::vector< TOKEN_DEF > &tokendefs)
Tokenizer(std::vector< TOKEN_DEF > &tokendefs)