#include <go.h>
Definition at line 75 of file go.h.
re2c::Linear::Linear |
( |
const Span * |
s, |
|
|
uint32_t |
n, |
|
|
const State * |
next |
|
) |
| |
Definition at line 63 of file go_construct.cc.
68 const State *bg = s[0].to;
69 while (n >= 3 && s[2].to == bg && (s[1].ub - s[0].ub) == 1)
71 if (s[1].to == next && n == 3)
73 branches.push_back (std::make_pair (
new Cond (
"!=", s[0].ub), bg));
78 branches.push_back (std::make_pair (
new Cond (
"==", s[0].ub), s[1].to));
85 if (next == NULL || s[0].to != next)
87 branches.push_back (std::make_pair (static_cast<const Cond *> (NULL), s[0].to));
91 else if (n == 2 && bg == next)
93 branches.push_back (std::make_pair (
new Cond (
">=", s[0].ub), s[1].to));
98 branches.push_back (std::make_pair (
new Cond (
"<=", s[0].ub - 1), bg));
std::vector< std::pair< const Cond *, const State * > > branches
re2c::Linear::~Linear |
( |
| ) |
|
Definition at line 22 of file go_destruct.cc.
24 for (uint32_t i = 0; i <
branches.size (); ++i)
std::vector< std::pair< const Cond *, const State * > > branches
void re2c::Linear::emit |
( |
OutputFile & |
o, |
|
|
uint32_t |
ind, |
|
|
bool & |
readCh |
|
) |
| |
Definition at line 119 of file go_emit.cc.
121 for (uint32_t i = 0; i <
branches.size (); ++i)
std::vector< std::pair< const Cond *, const State * > > branches
static void output_goto(OutputFile &o, uint32_t ind, bool &readCh, label_t to)
static void output_if(OutputFile &o, uint32_t ind, bool &readCh, const std::string &compare, uint32_t value)
void re2c::Linear::used_labels |
( |
std::set< label_t > & |
used | ) |
|
Definition at line 28 of file go_used_labels.cc.
30 for (uint32_t i = 0; i <
branches.size (); ++i)
32 used.insert (
branches[i].second->label);
std::vector< std::pair< const Cond *, const State * > > branches
std::vector<std::pair<const Cond *, const State *> > re2c::Linear::branches |
Definition at line 77 of file go.h.
The documentation for this struct was generated from the following files: