-/* Generated by re2c 1.1.1 on Sat Jul 13 10:46:39 2019 */
+/* Generated by re2c 1.1.1 on Sat Jul 13 11:00:45 2019 */
#line 1 "../src/parse/lex.re"
#include <ctype.h>
#include "src/util/c99_stdint.h"
next:
tok = cur;
loop:
- loc = cur_loc();
+ location = cur_loc();
ptr = cur;
#line 57 "src/parse/lex.cc"
const char *p;
scan:
tok = cur;
- loc = cur_loc();
+ location = cur_loc();
#line 1178 "src/parse/lex.cc"
{
-/* Generated by re2c 1.1.1 on Sat Jul 13 10:46:39 2019 */
+/* Generated by re2c 1.1.1 on Sat Jul 13 11:00:45 2019 */
#ifndef _RE2C_PARSE_LEX_
#define _RE2C_PARSE_LEX_
struct Dot
{
- const State * from;
Cases * cases;
- Dot(const Span *sp, uint32_t nsp, const State *s, uint32_t eof);
+ Dot(const Span *sp, uint32_t nsp, uint32_t eof);
~Dot ();
void emit (Output & o, const DFA &dfa, const State *from) const;
, table (new CpgotoTable (span, nSpans))
{}
-Dot::Dot (const Span * sp, uint32_t nsp, const State * s, uint32_t eof)
- : from (s)
- , cases (new Cases (sp, nsp, false, eof))
+Dot::Dot (const Span * sp, uint32_t nsp, uint32_t eof)
+ : cases (new Cases (sp, nsp, false, eof))
{}
Go::Go ()
const bool part_skip = opts->eager_skip && !skip;
if (opts->target == TARGET_DOT) {
type = DOT;
- info.dot = new Dot (span, nSpans, from, eof);
+ info.dot = new Dot (span, nSpans, eof);
}
else if (opts->gFlag && !part_skip && (dSpans >= opts->cGotoThreshold) && !low_spans_have_tags) {
type = CPGOTO;
Output::Output(Msg &msg)
: cblocks()
, hblocks()
- , blocks(&cblocks)
+ , pblocks(&cblocks)
, label_counter()
, fill_index(0)
, state_goto(false)
void Output::header_mode(bool on)
{
- blocks = on ? &hblocks : &cblocks;
+ pblocks = on ? &hblocks : &cblocks;
}
OutputBlock& Output::block()
{
- return *blocks->back();
+ return *pblocks->back();
}
std::ostream & Output::stream ()
OutputFragment *frag = new OutputFragment(
mtags ? OutputFragment::MTAGS : OutputFragment::STAGS, 0);
frag->tags = cf;
- blocks->back()->fragments.push_back(frag);
+ pblocks->back()->fragments.push_back(frag);
}
return *this;
}
{
OutputFragment *frag = new OutputFragment(OutputFragment::LINE_INFO_INPUT, 0);
frag->loc = new loc_t(loc);
- blocks->back()->fragments.push_back(frag);
+ pblocks->back()->fragments.push_back(frag);
return *this;
}
{
OutputBlock *b = new OutputBlock(loc);
b->opts = opts.snapshot();
- blocks->push_back(b);
+ pblocks->push_back(b);
// start label hapens to be the only option
// that must be reset for each new block
{
blocks_t cblocks; /* .c file */
blocks_t hblocks; /* .h file */
- blocks_t *blocks; /* selector */
+ blocks_t *pblocks; /* selector */
public:
counter_t<label_t> label_counter;
if (origin == dfa_t::NIL) {
fprintf(stderr, " void [shape=point]\n");
- uint32_t i = 0;
- for (c = b; c != e; ++c, ++i) {
- fprintf(stderr, " void -> 0:%u:w [style=dotted label=\"", i);
+ uint32_t j = 0;
+ for (c = b; c != e; ++c, ++j) {
+ fprintf(stderr, " void -> 0:%u:w [style=dotted label=\"", j);
dump_tags<ctx_t>(tvtbl, thist, c->ttran, c->tvers);
fprintf(stderr, "\"]\n");
}
fprintf(stderr, "\"]\n");
}
- uint32_t i = 0;
- for (c = b; c != e; ++c, ++i) {
+ uint32_t j = 0;
+ for (c = b; c != e; ++c, ++j) {
fprintf(stderr,
" %u:%u:e -> %s%u:%u:w [label=\"%u",
- origin, c->origin, prefix, state, i, symbol);
+ origin, c->origin, prefix, state, j, symbol);
dump_tags<ctx_t>(tvtbl, thist, c->ttran, c->tvers);
fprintf(stderr, "\"]\n");
}
DASSERT(c != e);
fprintf(stderr, " r%u [shape=none label=\"(", state);
- for (size_t t = r.ltag; t < r.htag; ++t) {
- if (t > r.ltag) fprintf(stderr, " ");
- fprintf(stderr, "%s%d", tagname(dfa.tags[t]), abs(dfa.finvers[t]));
+ for (size_t j = r.ltag; j < r.htag; ++j) {
+ if (j > r.ltag) fprintf(stderr, " ");
+ fprintf(stderr, "%s%d", tagname(dfa.tags[j]), abs(dfa.finvers[j]));
}
fprintf(stderr, ")\"]\n");
next:
tok = cur;
loop:
- loc = cur_loc();
+ location = cur_loc();
ptr = cur;
/*!re2c
"%{" | "/*!re2c" {
const char *p;
scan:
tok = cur;
- loc = cur_loc();
+ location = cur_loc();
/*!re2c
"{" { lex_code_in_braces(); return TOKEN_CODE; }
":=" { lex_code_indented(); return TOKEN_CODE; }
private:
std::vector<Input*> files;
const conopt_t *globopts;
- loc_t loc;
+ loc_t location;
public:
Scanner(const conopt_t *o, Msg &m);
, msg(m)
, files()
, globopts(o)
- , loc(ATSTART)
+ , location(ATSTART)
{}
inline loc_t Scanner::cur_loc() const
inline const loc_t &Scanner::tok_loc() const
{
- return loc;
+ return location;
}
inline void Scanner::set_line(uint32_t l)