Replaced the regex parser with one generated by Parsodus

This commit is contained in:
Thomas Avé 2017-01-22 15:48:06 +01:00
parent 1b54354d09
commit f0aa9a4f64
11 changed files with 790 additions and 284 deletions

View File

@ -0,0 +1,422 @@
#pragma once
#ifndef PARSODUS_PARSER_RegexParser_H
#define PARSODUS_PARSER_RegexParser_H
#include <cassert>
#include <cstdint>
#include <deque>
#include <stack>
#include <stdexcept>
#include <vector>
/**
* Represents the type of the symbol (both terminals and nonterminals)
*/
enum class RegexParser_Symbol : std::uint64_t {
T_EOF,
T_BACKSLASH,
T_BACKSPACE,
T_BELL,
T_CARRIAGE_RETURN,
T_CHAR,
T_CHAR_CLASS,
T_DOT,
T_ERROR,
T_ESCAPED_DOT,
T_ESCAPED_LBRACKET,
T_ESCAPED_LPAREN,
T_ESCAPED_PIPE,
T_ESCAPED_PLUS,
T_ESCAPED_QUESTIONMARK,
T_ESCAPED_RBRACKET,
T_ESCAPED_RPAREN,
T_ESCAPED_STAR,
T_FORMFEED,
T_LPAREN,
T_NEWLINE,
T_PIPE,
T_PLUS,
T_QUESTIONMARK,
T_RPAREN,
T_SPACE,
T_STAR,
T_TAB,
T_VTAB,
V_error,
V_re,
};
class SyntaxError : public std::runtime_error {
public:
SyntaxError(const char* c) : std::runtime_error(c) {}
};
template <typename Value>
class RegexParser {
public:
RegexParser() {}
virtual ~RegexParser() {}
/**
* Parse it
*/
Value parse();
protected:
/**
* A token, consisting of a Symbol type (should be a terminal) and a Value
*/
struct Token {
Token(const RegexParser_Symbol& sym, const Value& val) : symbol(sym), value(val) {}
RegexParser_Symbol symbol;
Value value;
};
/******************************************
* Functions to be supplied by the user *
******************************************/
/**
* Handle an error
* current is the current Token, one that has no action associated in the current state
* expected is a listing of all terminals that do have an action
*
* By default throws an error
*/
virtual Value error(Token current, const std::vector<RegexParser_Symbol>& expected);
/**
* Get the next token from the lexer
*/
virtual Token lex() = 0;
/**
* Apply a reduction (a grammar rule in reverse)
*/
virtual Value reduce_char(std::deque<Token> subparts) = 0;
virtual Value reduce_concat(std::deque<Token> subparts) = 0;
virtual Value reduce_optional(std::deque<Token> subparts) = 0;
virtual Value reduce_or(std::deque<Token> subparts) = 0;
virtual Value reduce_paren(std::deque<Token> subparts) = 0;
virtual Value reduce_plus(std::deque<Token> subparts) = 0;
virtual Value reduce_star(std::deque<Token> subparts) = 0;
private:
};
template <>
class RegexParser<bool> {
public:
RegexParser() {}
virtual ~RegexParser() {}
/**
* Parse it
*/
bool parse();
protected:
/******************************************
* Functions to be supplied by the user *
******************************************/
/**
* Get the next token from the lexer
*/
virtual RegexParser_Symbol lex() = 0;
};
#define TABLE RegexParser___Table___RegexParser
#define REDUCE_COUNT RegexParser___Num_Reduces___RegexParser
// Not a static member because the table should not be replicated for different instantiations of the parser
extern const std::uint64_t TABLE[32][31];
extern const unsigned char REDUCE_COUNT[27];
enum Action {
ERROR = 0,
SHIFT = 1,
REDUCE = 2,
ACCEPT = 3
};
/*********************************************
* Translate a Symbol to a readable string *
*********************************************/
inline std::string to_string(RegexParser_Symbol s) {
switch (s) {
case RegexParser_Symbol::T_EOF:
return "T_EOF";
case RegexParser_Symbol::T_BACKSLASH:
return "T_BACKSLASH";
case RegexParser_Symbol::T_BACKSPACE:
return "T_BACKSPACE";
case RegexParser_Symbol::T_BELL:
return "T_BELL";
case RegexParser_Symbol::T_CARRIAGE_RETURN:
return "T_CARRIAGE_RETURN";
case RegexParser_Symbol::T_CHAR:
return "T_CHAR";
case RegexParser_Symbol::T_CHAR_CLASS:
return "T_CHAR_CLASS";
case RegexParser_Symbol::T_DOT:
return "T_DOT";
case RegexParser_Symbol::T_ERROR:
return "T_ERROR";
case RegexParser_Symbol::T_ESCAPED_DOT:
return "T_ESCAPED_DOT";
case RegexParser_Symbol::T_ESCAPED_LBRACKET:
return "T_ESCAPED_LBRACKET";
case RegexParser_Symbol::T_ESCAPED_LPAREN:
return "T_ESCAPED_LPAREN";
case RegexParser_Symbol::T_ESCAPED_PIPE:
return "T_ESCAPED_PIPE";
case RegexParser_Symbol::T_ESCAPED_PLUS:
return "T_ESCAPED_PLUS";
case RegexParser_Symbol::T_ESCAPED_QUESTIONMARK:
return "T_ESCAPED_QUESTIONMARK";
case RegexParser_Symbol::T_ESCAPED_RBRACKET:
return "T_ESCAPED_RBRACKET";
case RegexParser_Symbol::T_ESCAPED_RPAREN:
return "T_ESCAPED_RPAREN";
case RegexParser_Symbol::T_ESCAPED_STAR:
return "T_ESCAPED_STAR";
case RegexParser_Symbol::T_FORMFEED:
return "T_FORMFEED";
case RegexParser_Symbol::T_LPAREN:
return "T_LPAREN";
case RegexParser_Symbol::T_NEWLINE:
return "T_NEWLINE";
case RegexParser_Symbol::T_PIPE:
return "T_PIPE";
case RegexParser_Symbol::T_PLUS:
return "T_PLUS";
case RegexParser_Symbol::T_QUESTIONMARK:
return "T_QUESTIONMARK";
case RegexParser_Symbol::T_RPAREN:
return "T_RPAREN";
case RegexParser_Symbol::T_SPACE:
return "T_SPACE";
case RegexParser_Symbol::T_STAR:
return "T_STAR";
case RegexParser_Symbol::T_TAB:
return "T_TAB";
case RegexParser_Symbol::T_VTAB:
return "T_VTAB";
case RegexParser_Symbol::V_error:
return "V_error";
case RegexParser_Symbol::V_re:
return "V_re";
}
}
/**************************
* Default error method *
**************************/
template <typename Value>
Value RegexParser<Value>::error(Token current, const std::vector<RegexParser_Symbol>& expected) {
std::string msg = "Syntax Error: got " + to_string(current.symbol) + "\n Expected any of:";
for (auto& s : expected) {
msg += "\n " + to_string(s);
}
throw SyntaxError(msg.c_str());
}
/***************************
* Parser implementation *
***************************/
template <typename Value>
Value RegexParser<Value>::parse() {
std::stack<Token> valueStack;
std::stack<std::uint64_t> stateStack;
stateStack.push(0);
Token tok = lex();
while (true) {
std::uint64_t act = TABLE[stateStack.top()][static_cast<std::uint64_t>(tok.symbol)];
switch (act & 0x3) {
case ERROR:
{
constexpr std::uint64_t verr = static_cast<std::uint64_t>(RegexParser_Symbol::V_error);
std::vector<RegexParser_Symbol> expected;
std::uint64_t top = stateStack.top();
for (std::uint64_t i = 0; i <= static_cast<std::uint64_t>(RegexParser_Symbol::T_VTAB); i++) {
if ((TABLE[top][i] & 0x3) != ERROR)
expected.emplace_back(static_cast<RegexParser_Symbol>(i));
}
Value errorVal = error(tok, expected);
while (!valueStack.empty() && (TABLE[stateStack.top()][verr] & 0x3) == ERROR) {
valueStack.pop();
stateStack.pop();
}
if ((TABLE[stateStack.top()][verr] & 0x3) == ERROR) {
throw SyntaxError("Syntax error: could not recover");
}
stateStack.push(TABLE[stateStack.top()][verr] >> 2);
valueStack.emplace(Token{ RegexParser_Symbol::V_error, std::move(errorVal)});
while (tok.symbol != RegexParser_Symbol::T_EOF && (TABLE[stateStack.top()][static_cast<std::uint64_t>(tok.symbol)] & 0x3) == ERROR) {
tok = lex();
}
if ((TABLE[stateStack.top()][static_cast<std::uint64_t>(tok.symbol)] & 0x3) == ERROR) {
throw SyntaxError("Syntax error: could not recover");
}
}
break;
case SHIFT:
valueStack.emplace(std::move(tok));
stateStack.push(act >> 2);
tok = lex();
break;
case REDUCE:
{
std::uint64_t tmp = act >> 2;
RegexParser_Symbol symbol = static_cast<RegexParser_Symbol>(tmp >> 31);
std::uint32_t rule = tmp & ((1ull << 31) - 1);
std::deque<Token> dq;
for (unsigned char i = 0; i < REDUCE_COUNT[rule]; i++) {
dq.emplace_front(std::move(valueStack.top()));
valueStack.pop();
stateStack.pop();
}
switch (rule) {
case 0:
valueStack.emplace(symbol, reduce_or(std::move(dq)));
break;
case 1:
valueStack.emplace(symbol, reduce_paren(std::move(dq)));
break;
case 2:
valueStack.emplace(symbol, reduce_star(std::move(dq)));
break;
case 3:
valueStack.emplace(symbol, reduce_plus(std::move(dq)));
break;
case 4:
valueStack.emplace(symbol, reduce_optional(std::move(dq)));
break;
case 5:
valueStack.emplace(symbol, reduce_concat(std::move(dq)));
break;
case 6:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 7:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 8:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 9:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 10:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 11:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 12:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 13:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 14:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 15:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 16:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 17:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 18:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 19:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 20:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 21:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 22:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 23:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 24:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 25:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
case 26:
valueStack.emplace(symbol, reduce_char(std::move(dq)));
break;
default:
assert(false); //There should be no such rule
break;
}
stateStack.push(TABLE[stateStack.top()][static_cast<std::uint64_t>(valueStack.top().symbol)] >> 2);
}
break;
case ACCEPT:
assert(stateStack.size() == 2);
assert(valueStack.size() == 1);
return valueStack.top().value;
default:
//IMPOSSIBLE
break;
}
}
}
#undef REDUCE_COUNT
#undef TABLE
#endif /* PARSODUS_PARSER_RegexParser_H */

View File

@ -3,7 +3,6 @@
#define RE_H
#include "Lexesis/automata.h"
#include "RegexLexer.h"
#include <memory>
#include <stdexcept>
@ -139,24 +138,6 @@ namespace lxs {
std::shared_ptr<RE> e, f;
};
/**
* Parse the given regular expression and return the associated Regex
*
* @param input The regular expression to parse
* @returns An abstraction representation of `input`
*
* @throws SyntaxError if the regex is invalid, the `what()` method contains some information on the problem.
*/
std::shared_ptr<RE> parseRE(const std::string& input);
/**
* An exception to represent a syntax error in a regular expression
*/
class SyntaxError : public std::runtime_error
{
public:
SyntaxError(RegexLexer& lex, const std::string w) : std::runtime_error((std::to_string(lex.getByteOffset()) + ": " + w)) {}
};
} //namespace lxs

View File

@ -0,0 +1,53 @@
#pragma once
#ifndef LEXESIS_RE_PARSER_H
#define LEXESIS_RE_PARSER_H
#include "Lexesis/RegexLexer.h"
#include "Lexesis/RegexParser.h"
#include "Lexesis/re.h"
#include <deque>
#include <memory>
#include <stdexcept>
namespace lxs {
class ReParser : public RegexParser<std::shared_ptr<RE>> {
public:
ReParser(RegexLexer lex);
private:
RegexParser::Token lex() override;
std::shared_ptr<RE> reduce_char(std::deque<RegexParser::Token> subparts) override;
std::shared_ptr<RE> reduce_concat(std::deque<RegexParser::Token> subparts) override;
std::shared_ptr<RE> reduce_optional(std::deque<RegexParser::Token> subparts) override;
std::shared_ptr<RE> reduce_or(std::deque<RegexParser::Token> subparts) override;
std::shared_ptr<RE> reduce_paren(std::deque<RegexParser::Token> subparts) override;
std::shared_ptr<RE> reduce_plus(std::deque<RegexParser::Token> subparts) override;
std::shared_ptr<RE> reduce_star(std::deque<RegexParser::Token> subparts) override;
RegexLexer m_lex;
};
/**
* Parse the given regular expression and return the associated Regex
*
* @param input The regular expression to parse
* @returns An abstraction representation of `input`
*
* @throws SyntaxError if the regex is invalid, the `what()` method contains some information on the problem.
*/
std::shared_ptr<RE> parseRE(const std::string& input);
/**
* An exception to represent a syntax error in a regular expression
*/
class SyntaxError : public std::runtime_error
{
public:
SyntaxError(RegexLexer& lex, const std::string w) : std::runtime_error((std::to_string(lex.getByteOffset()) + ": " + w)) {}
};
}
#endif

View File

@ -12,6 +12,8 @@ add_library(lxs
driver.cpp
RegexLexer.cpp
re.cpp
RegexParser.cpp
reParser.cpp
)
add_library(lxsinput

View File

@ -1,4 +1,4 @@
#include "RegexLexer.h"
#include "Lexesis/RegexLexer.h"
#include <sstream>
#include <iostream>

114
src/RegexParser.cpp Normal file
View File

@ -0,0 +1,114 @@
#include "Lexesis/RegexParser.h"
#define TABLE RegexParser___Table___RegexParser
#define REDUCE_COUNT RegexParser___Num_Reduces___RegexParser
const std::uint64_t TABLE[32][31] = {
{ (ERROR | (0) << 2),(SHIFT | (1) << 2),(SHIFT | (2) << 2),(SHIFT | (3) << 2),(SHIFT | (4) << 2),(SHIFT | (5) << 2),(SHIFT | (6) << 2),(SHIFT | (7) << 2),(ERROR | (0) << 2),(SHIFT | (8) << 2),(SHIFT | (9) << 2),(SHIFT | (10) << 2),(SHIFT | (11) << 2),(SHIFT | (12) << 2),(SHIFT | (13) << 2),(SHIFT | (14) << 2),(SHIFT | (15) << 2),(SHIFT | (16) << 2),(SHIFT | (17) << 2),(SHIFT | (18) << 2),(SHIFT | (19) << 2),(ERROR | (0) << 2),(ERROR | (0) << 2),(ERROR | (0) << 2),(ERROR | (0) << 2),(SHIFT | (20) << 2),(ERROR | (0) << 2),(SHIFT | (21) << 2),(SHIFT | (22) << 2),
((0) << 2),((23) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 6) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 7) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 8) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 9) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 10) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 11) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 12) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 13) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 14) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 15) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 16) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 17) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 18) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 19) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 20) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 21) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 22) << 2),
((0) << 2),((0) << 2), },
{ (ERROR | (0) << 2),(SHIFT | (1) << 2),(SHIFT | (2) << 2),(SHIFT | (3) << 2),(SHIFT | (4) << 2),(SHIFT | (5) << 2),(SHIFT | (6) << 2),(SHIFT | (7) << 2),(ERROR | (0) << 2),(SHIFT | (8) << 2),(SHIFT | (9) << 2),(SHIFT | (10) << 2),(SHIFT | (11) << 2),(SHIFT | (12) << 2),(SHIFT | (13) << 2),(SHIFT | (14) << 2),(SHIFT | (15) << 2),(SHIFT | (16) << 2),(SHIFT | (17) << 2),(SHIFT | (18) << 2),(SHIFT | (19) << 2),(ERROR | (0) << 2),(ERROR | (0) << 2),(ERROR | (0) << 2),(ERROR | (0) << 2),(SHIFT | (20) << 2),(ERROR | (0) << 2),(SHIFT | (21) << 2),(SHIFT | (22) << 2),
((0) << 2),((24) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 23) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 24) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 25) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 26) << 2),
((0) << 2),((0) << 2), },
{ (ACCEPT | (0) << 2),(SHIFT | (1) << 2),(SHIFT | (2) << 2),(SHIFT | (3) << 2),(SHIFT | (4) << 2),(SHIFT | (5) << 2),(SHIFT | (6) << 2),(SHIFT | (7) << 2),(ERROR | (0) << 2),(SHIFT | (8) << 2),(SHIFT | (9) << 2),(SHIFT | (10) << 2),(SHIFT | (11) << 2),(SHIFT | (12) << 2),(SHIFT | (13) << 2),(SHIFT | (14) << 2),(SHIFT | (15) << 2),(SHIFT | (16) << 2),(SHIFT | (17) << 2),(SHIFT | (18) << 2),(SHIFT | (19) << 2),(SHIFT | (25) << 2),(SHIFT | (26) << 2),(SHIFT | (27) << 2),(ERROR | (0) << 2),(SHIFT | (20) << 2),(SHIFT | (28) << 2),(SHIFT | (21) << 2),(SHIFT | (22) << 2),
((0) << 2),((29) << 2), },
{ (ERROR | (0) << 2),(SHIFT | (1) << 2),(SHIFT | (2) << 2),(SHIFT | (3) << 2),(SHIFT | (4) << 2),(SHIFT | (5) << 2),(SHIFT | (6) << 2),(SHIFT | (7) << 2),(ERROR | (0) << 2),(SHIFT | (8) << 2),(SHIFT | (9) << 2),(SHIFT | (10) << 2),(SHIFT | (11) << 2),(SHIFT | (12) << 2),(SHIFT | (13) << 2),(SHIFT | (14) << 2),(SHIFT | (15) << 2),(SHIFT | (16) << 2),(SHIFT | (17) << 2),(SHIFT | (18) << 2),(SHIFT | (19) << 2),(SHIFT | (25) << 2),(SHIFT | (26) << 2),(SHIFT | (27) << 2),(SHIFT | (30) << 2),(SHIFT | (20) << 2),(SHIFT | (28) << 2),(SHIFT | (21) << 2),(SHIFT | (22) << 2),
((0) << 2),((29) << 2), },
{ (ERROR | (0) << 2),(SHIFT | (1) << 2),(SHIFT | (2) << 2),(SHIFT | (3) << 2),(SHIFT | (4) << 2),(SHIFT | (5) << 2),(SHIFT | (6) << 2),(SHIFT | (7) << 2),(ERROR | (0) << 2),(SHIFT | (8) << 2),(SHIFT | (9) << 2),(SHIFT | (10) << 2),(SHIFT | (11) << 2),(SHIFT | (12) << 2),(SHIFT | (13) << 2),(SHIFT | (14) << 2),(SHIFT | (15) << 2),(SHIFT | (16) << 2),(SHIFT | (17) << 2),(SHIFT | (18) << 2),(SHIFT | (19) << 2),(ERROR | (0) << 2),(ERROR | (0) << 2),(ERROR | (0) << 2),(ERROR | (0) << 2),(SHIFT | (20) << 2),(ERROR | (0) << 2),(SHIFT | (21) << 2),(SHIFT | (22) << 2),
((0) << 2),((31) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 3) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 4) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 2) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(SHIFT | (26) << 2),(SHIFT | (27) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(SHIFT | (28) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 5) << 2),
((0) << 2),((29) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(ERROR | (0) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 1) << 2),
((0) << 2),((0) << 2), },
{ (REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 0) << 2),(SHIFT | (1) << 2),(SHIFT | (2) << 2),(SHIFT | (3) << 2),(SHIFT | (4) << 2),(SHIFT | (5) << 2),(SHIFT | (6) << 2),(SHIFT | (7) << 2),(ERROR | (0) << 2),(SHIFT | (8) << 2),(SHIFT | (9) << 2),(SHIFT | (10) << 2),(SHIFT | (11) << 2),(SHIFT | (12) << 2),(SHIFT | (13) << 2),(SHIFT | (14) << 2),(SHIFT | (15) << 2),(SHIFT | (16) << 2),(SHIFT | (17) << 2),(SHIFT | (18) << 2),(SHIFT | (19) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 0) << 2),(SHIFT | (26) << 2),(SHIFT | (27) << 2),(REDUCE | (static_cast<std::uint64_t>(RegexParser_Symbol::V_re) << 31 | 0) << 2),(SHIFT | (20) << 2),(SHIFT | (28) << 2),(SHIFT | (21) << 2),(SHIFT | (22) << 2),
((0) << 2),((29) << 2), },
};
const unsigned char REDUCE_COUNT[27] = { 3,3,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, };
bool RegexParser<bool>::parse() {
std::stack<std::uint64_t> stateStack;
using Sym = RegexParser_Symbol;
stateStack.push(0);
Sym tok = lex();
while (true) {
std::uint64_t act = TABLE[stateStack.top()][static_cast<std::uint64_t>(tok)];
switch (act & 0x3) {
case ERROR:
return false;
case SHIFT:
stateStack.push(act >> 2);
tok = lex();
break;
case REDUCE:
{
std::uint64_t tmp = act >> 2;
Sym symbol = static_cast<Sym>(tmp >> 31);
std::uint32_t rule = tmp & ((1ull << 31) - 1);
for (unsigned char i = 0; i < REDUCE_COUNT[rule]; i++) {
stateStack.pop();
}
stateStack.push(TABLE[stateStack.top()][static_cast<std::uint64_t>(symbol)] >> 2);
}
break;
case ACCEPT:
assert(stateStack.size() == 2);
return true;
default:
//IMPOSSIBLE
break;
}
}
}

View File

@ -1,7 +1,7 @@
#include "Lexesis/driver.h"
#include "Lexesis/inputparser.h"
#include "Lexesis/automata.h"
#include "Lexesis/re.h"
#include "Lexesis/reParser.h"
#include <iostream>
#include <fstream>

View File

@ -1,15 +1,14 @@
#include "Lexesis/re.h"
#include "RegexLexer.h"
#include "Lexesis/RegexLexer.h"
#include <algorithm>
#include <iostream>
#include <sstream>
#include <stack>
using namespace std;
namespace lxs {
string EmptyRE::toRe()
std::string EmptyRE::toRe()
{
return "";
}
@ -22,7 +21,7 @@ namespace lxs {
return attach + 1;
}
string EpsilonRE::toRe()
std::string EpsilonRE::toRe()
{
return "ε";
}
@ -36,9 +35,9 @@ namespace lxs {
return attach + 1;
}
string SingleRE::toRe()
std::string SingleRE::toRe()
{
return string(1, c);
return std::string(1, c);
}
State SingleRE::toENFA(ENFA& enfa, State attach)
@ -50,9 +49,9 @@ namespace lxs {
return attach + 1;
}
string MultiRE::toRe()
std::string MultiRE::toRe()
{
return "[" + string(chars.begin(), chars.end()) + "]";
return "[" + std::string(chars.begin(), chars.end()) + "]";
}
State MultiRE::toENFA(ENFA& enfa, State attach)
@ -66,7 +65,7 @@ namespace lxs {
return attach + 1;
}
string ConcatRE::toRe()
std::string ConcatRE::toRe()
{
return e->toRe() + f->toRe();
}
@ -78,7 +77,7 @@ namespace lxs {
return f->toENFA(enfa, a + 1);
}
string StarRE::toRe()
std::string StarRE::toRe()
{
return "(" + e->toRe() + ")*";
}
@ -96,7 +95,7 @@ namespace lxs {
return a + 1;
}
string PlusRE::toRe()
std::string PlusRE::toRe()
{
return "(" + e->toRe() + "|" + f->toRe() + ")";
}
@ -115,255 +114,4 @@ namespace lxs {
return b + 1;
}
namespace {
/**
* Take the two top elements from `stk` and combine them with a ConcatRE
*/
void compress(stack<std::shared_ptr<RE>>& stk)
{
std::shared_ptr<RE> a = stk.top();
stk.pop();
std::shared_ptr<RE> b = stk.top();
stk.pop();
stk.push(std::make_shared<ConcatRE>(b, a)); //Attention: reversed order because of stack
}
/**
* Apply compress until only one RE remains on the stack
*/
void compactStack(stack<std::shared_ptr<RE> >& stk)
{
if (stk.empty()) return;
std::shared_ptr<RE> tp = stk.top();
stk.pop();
while (stk.size() >= 2)
{
compress(stk);
}
stk.push(tp);
}
/**
* Parse a character class
*/
std::shared_ptr<RE> parseCharacterClass(const string& input) {
std::set<char> used_chars;
bool invert = false;
std::size_t start = 1;
std::size_t end = input.size() - 1;
if (input[1] == '^') {
invert = true;
start = 2;
}
if (input[start] == ']') {
used_chars.insert(']');
++start;
}
if (input[start] == '-') {
used_chars.insert('-');
++start;
}
if (input[end - 1] == '-') {
used_chars.insert('-');
--end;
}
int last_char = -1;
for (std::size_t idx = start; idx < end; idx++)
{
if (input[idx] == '-')
{
idx++;
for (int i = last_char; i <= input[idx]; i++) {
used_chars.insert((char) i);
}
last_char = -1;
}
else
{
if (idx == end - 1 || (idx < end - 1 && input[idx + 1] != '-'))
used_chars.insert(input[idx]);
else
last_char = input[idx];
}
}
std::vector<char> chars;
for (int i = 0; i < 256; i++) {
if (invert ^ (used_chars.count((char) i) > 0))
chars.push_back((char) i);
}
return std::make_shared<MultiRE>(chars);
}
/**
* Return the RE for the `.` pattern: everything except a newline
*/
std::shared_ptr<RE> dotChar() {
std::vector<char> any;
for (int i = 0; i < 256; i++)
if ((char) i != '\n') //Dot matches anything except newlines
any.push_back((char) i);
return std::make_shared<MultiRE>(any);
}
/**
* Parse the actual regex
*/
std::shared_ptr<RE> parseRE(RegexLexer& lex, bool& exit_by_closed_paren, bool inside_parens=false)
{
stack<std::shared_ptr<RE> > stk;
try {
while (true) {
exit_by_closed_paren = false;
RegexLexer::Token tok = lex.nextToken();
std::shared_ptr<RE> n;
switch (tok.type) {
case RegexLexer::TAB:
stk.push(std::make_shared<SingleRE>('\t'));
break;
case RegexLexer::NEWLINE:
stk.push(std::make_shared<SingleRE>('\n'));
break;
case RegexLexer::CARRIAGE_RETURN:
stk.push(std::make_shared<SingleRE>('\r'));
break;
case RegexLexer::BACKSPACE:
stk.push(std::make_shared<SingleRE>('\b'));
break;
case RegexLexer::SPACE:
stk.push(std::make_shared<SingleRE>(' '));
break;
case RegexLexer::BELL:
stk.push(std::make_shared<SingleRE>('\a'));
break;
case RegexLexer::FORMFEED:
stk.push(std::make_shared<SingleRE>('\f'));
break;
case RegexLexer::VTAB:
stk.push(std::make_shared<SingleRE>('\v'));
break;
case RegexLexer::BACKSLASH:
case RegexLexer::ESCAPED_STAR:
case RegexLexer::ESCAPED_PLUS:
case RegexLexer::ESCAPED_PIPE:
case RegexLexer::ESCAPED_LPAREN:
case RegexLexer::ESCAPED_RPAREN:
case RegexLexer::ESCAPED_LBRACKET:
case RegexLexer::ESCAPED_RBRACKET:
case RegexLexer::ESCAPED_QUESTIONMARK:
case RegexLexer::ESCAPED_DOT:
stk.push(std::make_shared<SingleRE>(tok.content[1]));
break;
case RegexLexer::DOT:
stk.push(dotChar());
break;
case RegexLexer::STAR:
if (stk.empty())
throw SyntaxError(lex, "Cannot apply kleene star to empty regex");
n = std::make_shared<StarRE>(stk.top());
stk.pop();
stk.push(n);
break;
case RegexLexer::PLUS:
if (stk.empty())
throw SyntaxError(lex, "Cannot apply kleene plus to empty regex");
n = stk.top();
stk.pop();
n = std::make_shared<ConcatRE>(n, std::make_shared<StarRE>(n));
stk.push(n);
break;
case RegexLexer::QUESTIONMARK:
if (stk.empty())
throw SyntaxError(lex, "Cannot apply '?' to empty regex");
n = std::make_shared<PlusRE>(stk.top(), std::make_shared<EpsilonRE>());
stk.pop();
stk.push(n);
break;
case RegexLexer::PIPE:
if (stk.empty())
throw SyntaxError(lex, "Invalid regex: nothing to the left of '|'");
if (stk.size() > 1)
compactStack(stk), compress(stk);
n = std::make_shared<PlusRE>(stk.top(), parseRE(lex, exit_by_closed_paren, inside_parens));
stk.pop();
stk.push(n);
if (exit_by_closed_paren) {
if (stk.size() == 1)
return stk.top();
else if (stk.size() == 2)
return compress(stk), stk.top();
else
throw SyntaxError(lex, "Invalid regex");
}
break;
case RegexLexer::LPAREN:
n = parseRE(lex, exit_by_closed_paren, true);
if (!exit_by_closed_paren) {
throw SyntaxError(lex, "Unclosed parenthesis");
}
stk.push(n);
break;
case RegexLexer::RPAREN:
if (!inside_parens)
throw SyntaxError(lex, "Unopened parenthesis");
exit_by_closed_paren = true;
if (stk.size() == 1)
return stk.top();
else if (stk.size() == 2)
return compress(stk), stk.top();
throw SyntaxError(lex, "Could not parse regex, nothing inside parentheses");
case RegexLexer::CHAR:
stk.push(std::make_shared<SingleRE>(tok.content[0]));
break;
case RegexLexer::CHAR_CLASS:
stk.push(parseCharacterClass(tok.content));
break;
case RegexLexer::ERROR:
throw SyntaxError(lex, "Error on character: " + tok.content);
case RegexLexer::ignore: case RegexLexer::nonmatching:
//Just ignore these
break;
}
compactStack(stk);
}
} catch (RegexLexer::NoMoreTokens& err) {
if (stk.size() == 1)
return stk.top();
else if (stk.size() == 2)
return compress(stk), stk.top();
throw SyntaxError(lex, "Could not parse regex");
}
}
}
std::shared_ptr<RE> parseRE(const string& input)
{
std::istringstream inputstream(input);
RegexLexer lex(inputstream);
bool exit_by_closed_paren = false;
std::shared_ptr<RE> res = parseRE(lex, exit_by_closed_paren);
return res;
}
}

186
src/reParser.cpp Normal file
View File

@ -0,0 +1,186 @@
#include <algorithm>
#include <cassert>
#include <codecvt>
#include <deque>
#include <locale>
#include <sstream>
#include "Lexesis/reParser.h"
#include <iostream>
namespace lxs {
ReParser::ReParser(RegexLexer lex) : RegexParser<std::shared_ptr<RE>>(), m_lex(lex)
{}
namespace {
std::shared_ptr<RE> dotChar() {
std::vector<char> any;
for (int i = 0; i < 256; i++)
if ((char) i != '\n') //Dot matches anything except newlines
any.push_back((char) i);
return std::make_shared<MultiRE>(any);
}
/**
* Parse a character class
*/
std::shared_ptr<RE> parseCharacterClass(const std::string& input) {
std::set<char> used_chars;
bool invert = false;
std::size_t start = 1;
std::size_t end = input.size() - 1;
if (input[1] == '^') {
invert = true;
start = 2;
}
if (input[start] == ']') {
used_chars.insert(']');
++start;
}
if (input[start] == '-') {
used_chars.insert('-');
++start;
}
if (input[end - 1] == '-') {
used_chars.insert('-');
--end;
}
int last_char = -1;
for (std::size_t idx = start; idx < end; idx++)
{
if (input[idx] == '-')
{
idx++;
for (int i = last_char; i <= input[idx]; i++) {
used_chars.insert((char) i);
}
last_char = -1;
}
else
{
if (idx == end - 1 || (idx < end - 1 && input[idx + 1] != '-'))
used_chars.insert(input[idx]);
else
last_char = input[idx];
}
}
std::vector<char> chars;
for (int i = 0; i < 256; i++) {
if (invert ^ (used_chars.count((char) i) > 0))
chars.push_back((char) i);
}
return std::make_shared<MultiRE>(chars);
}
}
RegexParser<std::shared_ptr<RE>>::Token ReParser::lex() {
try {
RegexLexer::Token orig = m_lex.nextToken();
switch(orig.type) {
case RegexLexer::TAB:
return Token(RegexParser_Symbol::T_TAB, std::make_shared<SingleRE>('\t'));
case RegexLexer::NEWLINE:
return Token(RegexParser_Symbol::T_NEWLINE, std::make_shared<SingleRE>('\n'));
case RegexLexer::CARRIAGE_RETURN:
return Token(RegexParser_Symbol::T_CARRIAGE_RETURN, std::make_shared<SingleRE>('\r'));
case RegexLexer::BACKSPACE:
return Token(RegexParser_Symbol::T_BACKSPACE, std::make_shared<SingleRE>('\b'));
case RegexLexer::SPACE:
return Token(RegexParser_Symbol::T_SPACE, std::make_shared<SingleRE>(' '));
case RegexLexer::BELL:
return Token(RegexParser_Symbol::T_BELL, std::make_shared<SingleRE>('\a'));
case RegexLexer::FORMFEED:
return Token(RegexParser_Symbol::T_FORMFEED, std::make_shared<SingleRE>('\f'));
case RegexLexer::VTAB:
return Token(RegexParser_Symbol::T_VTAB, std::make_shared<SingleRE>('\v'));
case RegexLexer::BACKSLASH:
return Token(RegexParser_Symbol::T_BACKSLASH, std::make_shared<SingleRE>(orig.content[1]));
case RegexLexer::ESCAPED_STAR:
return Token(RegexParser_Symbol::T_ESCAPED_STAR, std::make_shared<SingleRE>(orig.content[1]));
case RegexLexer::ESCAPED_PLUS:
return Token(RegexParser_Symbol::T_ESCAPED_PLUS, std::make_shared<SingleRE>(orig.content[1]));
case RegexLexer::ESCAPED_PIPE:
return Token(RegexParser_Symbol::T_ESCAPED_PIPE, std::make_shared<SingleRE>(orig.content[1]));
case RegexLexer::ESCAPED_LPAREN:
return Token(RegexParser_Symbol::T_ESCAPED_LPAREN, std::make_shared<SingleRE>(orig.content[1]));
case RegexLexer::ESCAPED_RPAREN:
return Token(RegexParser_Symbol::T_ESCAPED_RPAREN, std::make_shared<SingleRE>(orig.content[1]));
case RegexLexer::ESCAPED_LBRACKET:
return Token(RegexParser_Symbol::T_ESCAPED_LBRACKET, std::make_shared<SingleRE>(orig.content[1]));
case RegexLexer::ESCAPED_RBRACKET:
return Token(RegexParser_Symbol::T_ESCAPED_RBRACKET, std::make_shared<SingleRE>(orig.content[1]));
case RegexLexer::ESCAPED_QUESTIONMARK:
return Token(RegexParser_Symbol::T_ESCAPED_QUESTIONMARK, std::make_shared<SingleRE>(orig.content[1]));
case RegexLexer::ESCAPED_DOT:
return Token(RegexParser_Symbol::T_ESCAPED_DOT, std::make_shared<SingleRE>(orig.content[1]));
case RegexLexer::DOT:
return Token(RegexParser_Symbol::T_DOT, dotChar());
case RegexLexer::STAR:
return Token(RegexParser_Symbol::T_STAR, std::shared_ptr<RE>(new EmptyRE()));
case RegexLexer::PLUS:
return Token(RegexParser_Symbol::T_PLUS, std::shared_ptr<RE>(new EmptyRE()));
case RegexLexer::QUESTIONMARK:
return Token(RegexParser_Symbol::T_QUESTIONMARK, std::shared_ptr<RE>(new EmptyRE()));
case RegexLexer::PIPE:
return Token(RegexParser_Symbol::T_PIPE, std::shared_ptr<RE>(new EmptyRE()));
case RegexLexer::LPAREN:
return Token(RegexParser_Symbol::T_LPAREN, std::shared_ptr<RE>(new EmptyRE()));
case RegexLexer::RPAREN:
return Token(RegexParser_Symbol::T_RPAREN, std::shared_ptr<RE>(new EmptyRE()));
case RegexLexer::CHAR:
return Token(RegexParser_Symbol::T_CHAR, std::make_shared<SingleRE>(orig.content[0]));
case RegexLexer::CHAR_CLASS:
return Token(RegexParser_Symbol::T_DOT, parseCharacterClass(orig.content));
case RegexLexer::ERROR: case RegexLexer::ignore: case RegexLexer::nonmatching:
throw SyntaxError(m_lex,"Received an error from the lexer while parsing token: " + orig.content);
default:
return Token(RegexParser_Symbol::T_EOF, std::shared_ptr<RE>(new EmptyRE()));
}
} catch (RegexLexer::NoMoreTokens) {
return Token(RegexParser_Symbol::T_EOF, std::shared_ptr<RE>(new EmptyRE()));
}
}
std::shared_ptr<RE> ReParser::reduce_char(std::deque<RegexParser::Token> subparts) {
return std::move(subparts[0].value);
}
std::shared_ptr<RE> ReParser::reduce_concat(std::deque<RegexParser::Token> subparts) {
return std::make_shared<ConcatRE>(subparts[0].value, subparts[1].value);
}
std::shared_ptr<RE> ReParser::reduce_optional(std::deque<RegexParser::Token> subparts) {
return std::make_shared<PlusRE>(subparts[0].value, std::make_shared<EpsilonRE>());
}
std::shared_ptr<RE> ReParser::reduce_or(std::deque<RegexParser::Token> subparts) {
return std::make_shared<PlusRE>(subparts[0].value, subparts[2].value);
}
std::shared_ptr<RE> ReParser::reduce_paren(std::deque<RegexParser::Token> subparts) {
return std::move(subparts[1].value);
}
std::shared_ptr<RE> ReParser::reduce_plus(std::deque<RegexParser::Token> subparts) {
return std::make_shared<ConcatRE>(subparts[0].value, std::make_shared<StarRE>(subparts[0].value));
}
std::shared_ptr<RE> ReParser::reduce_star(std::deque<RegexParser::Token> subparts) {
return std::make_shared<StarRE>(subparts[0].value);
}
std::shared_ptr<RE> parseRE(const std::string& input) {
std::stringstream ss(input);
RegexLexer lexer(ss);
ReParser parser(lexer);
auto res = parser.parse();
return res;
}
}

View File

@ -1,6 +1,6 @@
#include "Lexesis/automata.h"
#include "Lexesis/driver.h"
#include "Lexesis/re.h"
#include "Lexesis/reParser.h"
#include <cassert>
#include <fstream>