23 static MatchOp *
merge (MatchOp * m1, MatchOp * m2);
37 return new AltOp (e1, e2);
46 a =
dynamic_cast<AltOp*
> (e1);
49 m1 =
dynamic_cast<MatchOp*
> (a->exp1);
57 m1 =
dynamic_cast<MatchOp*
> (e1);
63 a =
dynamic_cast<AltOp*
> (e2);
66 m2 =
dynamic_cast<MatchOp*
> (a->exp1);
74 m2 =
dynamic_cast<MatchOp*
> (e2);
108 return new CatOp (e1, e2);
111 RegExp *Scanner::schr(uint32_t c)
const
114 fatalf(
"Bad code point: '0x%X'", c);
123 RegExp *Scanner::ichr(uint32_t c)
const
134 RegExp *Scanner::cls(Range *r)
const
147 fatal (
"empty character class");
156 default:
return new MatchOp(r);
164 if (m1 == NULL || m2 == NULL)
166 fatal(
"can only difference char sets");
178 fatalf(
"Bad code point: '0x%X'", c);
214 for (uint32_t i = 0; i < n; ++i)
226 for (uint32_t i = n; i < m; ++i)
230 return doCat (r1, r2);
238 return doCat (r1, r2);
static Range * sub(const Range *r1, const Range *r2)
static Range * ran(uint32_t l, uint32_t u)
uint32_t get_line() const
RegExp * doAlt(RegExp *e1, RegExp *e2)
RegExp * repeat_from(RegExp *e, uint32_t n)
RegExp * mkDefault() const
Range * fullRange() const
static uint32_t merge(Span *x0, State *fg, State *bg)
RegExp * repeat_from_to(RegExp *e, uint32_t n, uint32_t m)
void void fatalf(const char *,...) const RE2C_GXX_ATTRIBUTE((format(printf
void void void fatal(const char *) const
bool encode(uint32_t &c) const
uint32_t to_upper_unsafe(uint32_t c)
static free_list< RegExp * > vFreeList
void empty_class(uint32_t line)
static Range * sym(uint32_t c)
uint32_t nCodeUnits() const
RegExp * UTF8Symbol(utf8::rune r)
empty_class_policy_t empty_class_policy
RegExp * UTF8Range(const Range *r)
RegExp * mkDiff(RegExp *e1, RegExp *e2) const
RegExp * UTF16Range(const Range *r)
bool is_alpha(uint32_t c)
uint32_t to_lower_unsafe(uint32_t c)
RegExp * repeat(RegExp *e, uint32_t n)
RegExp * UTF16Symbol(utf16::rune r)
RegExp * doCat(RegExp *e1, RegExp *e2)
RegExp * mkAlt(RegExp *e1, RegExp *e2)
static Range * add(const Range *r1, const Range *r2)