24 static void need (OutputFile & o, uint32_t ind,
bool & readCh,
size_t n,
bool bSetMarker);
25 static void emit_match (OutputFile & o, uint32_t ind,
bool & readCh,
const State *
const s);
26 static void emit_initial (OutputFile & o, uint32_t ind,
bool & readCh,
const State *
const s,
const Initial & init,
const std::set<label_t> & used_labels);
27 static void emit_save (OutputFile & o, uint32_t ind,
bool & readCh,
const State *
const s, uint32_t save,
bool save_yyaccept);
28 static void emit_accept_binary (OutputFile & o, uint32_t ind,
bool & readCh,
const State *
const s,
const accept_t & accept,
size_t l,
size_t r);
29 static void emit_accept (OutputFile & o, uint32_t ind,
bool & readCh,
const State *
const s,
const accept_t & accept);
30 static void emit_rule (OutputFile & o, uint32_t ind,
const State *
const s,
const RuleOp *
const rule,
const std::string & condName,
const Skeleton * skeleton);
32 static void genSetCondition (OutputFile & o, uint32_t ind,
const std::string & newcond);
33 static void genSetState (OutputFile & o, uint32_t ind, uint32_t fillIndex);
40 ,
const State *
const s
41 ,
const std::string & condName
43 ,
const std::set<label_t> & used_labels
80 const bool read_ahead = s
101 need(o, ind, readCh, s->
fill,
false);
112 if (used_labels.count(s->
label))
124 if (used_labels.count(initial.
label))
163 need(o, ind, readCh, s->
fill,
false);
176 const size_t m = (l + r) >> 1;
179 o.
wind(--ind).
ws(
"} else {\n");
185 genGoTo(o, ind, s, accepts[l], readCh);
191 const size_t accepts_size = accepts.
size ();
192 if (accepts_size > 0)
205 if (accepts_size > 1)
211 for (uint32_t i = 0; i < accepts_size; ++i)
225 for (uint32_t i = 0; i < accepts_size; ++i)
228 o.
ws(
" [label=\"yyaccept=").
wu32(i).
ws(
"\"]\n");
234 for (uint32_t i = 0; i < accepts_size - 1; ++i)
237 genGoTo(o, 0, s, accepts[i], readCh);
239 o.
wind(ind).
ws(
"default:\t");
240 genGoTo(o, 0, s, accepts[accepts_size - 1], readCh);
247 genGoTo(o, ind, s, accepts[0], readCh);
292 else if (!rule->
newcond.empty ())
299 void need (
OutputFile & o, uint32_t ind,
bool & readCh,
size_t n,
bool bSetMarker)
void emit_action(const Action &action, OutputFile &o, uint32_t ind, bool &readCh, const State *const s, const std::string &condName, const Skeleton *skeleton, const std::set< label_t > &used_labels, bool save_yyaccept)
std::string replaceParam(std::string str, const std::string ¶m, const _Ty &value)
static void need(OutputFile &o, uint32_t ind, bool &readCh, size_t n, bool bSetMarker)
const std::string newcond
union re2c::Action::@5 info
OutputFile & ws(const char *s)
OutputFile & wu32(uint32_t n)
OutputFile & wind(uint32_t ind)
OutputFile & wlabel(label_t l)
static void emit_initial(OutputFile &o, uint32_t ind, bool &readCh, const State *const s, const Initial &init, const std::set< label_t > &used_labels)
static void emit_accept_binary(OutputFile &o, uint32_t ind, bool &readCh, const State *const s, const accept_t &accept, size_t l, size_t r)
std::string condEnumPrefix
static void genYYFill(OutputFile &o, size_t need)
OutputFile & wdelay_line_info()
OutputFile & wu64(uint64_t n)
uniq_vector_t< const State * > accept_t
static void emit_match(OutputFile &o, uint32_t ind, bool &readCh, const State *const s)
static void genSetState(OutputFile &o, uint32_t ind, uint32_t fillIndex)
virtual uint32_t fixedLength()
static void emit_accept(OutputFile &o, uint32_t ind, bool &readCh, const State *const s, const accept_t &accept)
std::string state_set_arg
void genGoTo(OutputFile &o, uint32_t ind, const State *from, const State *to, bool &readCh)
std::string condGotoParam
static void genSetCondition(OutputFile &o, uint32_t ind, const std::string &newcond)
void emit_action(OutputFile &o, uint32_t ind, rule_rank_t rank) const
enum re2c::Action::type_t type
static void emit_save(OutputFile &o, uint32_t ind, bool &readCh, const State *const s, uint32_t save, bool save_yyaccept)
OutputFile & wline_info(uint32_t l, const char *fn)
OutputFile & wstring(const std::string &s)
static void emit_rule(OutputFile &o, uint32_t ind, const State *const s, const RuleOp *const rule, const std::string &condName, const Skeleton *skeleton)