16 #if defined(_MSC_VER) && !defined(vsnprintf)
17 # define vsnprintf _vsnprintf
22 const uint32_t Scanner::BSIZE = 8192;
38 , lexer_state (LEX_NORMAL)
54 , in_parse (s.in_parse)
55 , lexer_state (s.lexer_state)
71 void Scanner::fill (uint32_t
need)
82 const size_t move =
static_cast<size_t> (
top -
tok);
83 memmove (bot,
tok, move);
97 if (static_cast<uint32_t> (
top -
lim) < need)
99 const size_t copy =
static_cast<size_t> (
lim -
bot);
100 char * buf =
new char[copy +
need];
103 fatal(
"Out of memory");
105 memcpy (buf, bot, copy);
117 const size_t have = fread (
lim, 1, need, in.
file);
134 std::cerr <<
"re2c: error: "
135 <<
"line " << line <<
", column " << (
tchar + ofs + 1) <<
": "
152 vsnprintf(szBuf,
sizeof(szBuf), fmt, args);
155 szBuf[
sizeof(szBuf)-1] =
'0';
167 vsnprintf(szBuf,
sizeof(szBuf), fmt, args);
170 szBuf[
sizeof(szBuf)-1] =
'0';
191 ptrdiff_t diff = bot - state.
bot;
void restore_state(const ScannerState &)
static void need(OutputFile &o, uint32_t ind, bool &readCh, size_t n, bool bSetMarker)
void fatalf_at(uint32_t line, const char *,...) const RE2C_GXX_ATTRIBUTE((format(printf
void void fatalf(const char *,...) const RE2C_GXX_ATTRIBUTE((format(printf
void void void fatal(const char *) const
void set_in_parse(bool new_in_parse)
Scanner(Input &, OutputFile &)
ScannerState & operator=(const ScannerState &)
static int32_t diff(const re2c::Range *r1, const re2c::Range *r2, const re2c::Range *op1, const re2c::Range *op2, const char *op)
void fatal_at(uint32_t line, ptrdiff_t ofs, const char *msg) const
counter_t< label_t > label_counter