return ~0;
}
-char *NullOp::type = "NullOp";
+const char *NullOp::type = "NullOp";
void NullOp::calcSize(Char*)
{
return new MatchOp(doUnion(m1->match, m2->match));
}
-char *MatchOp::type = "MatchOp";
+const char *MatchOp::type = "MatchOp";
void MatchOp::display(std::ostream &o) const
{
return doAlt(merge(m1, m2), doAlt(e1, e2));
}
-char *AltOp::type = "AltOp";
+const char *AltOp::type = "AltOp";
void AltOp::calcSize(Char *rep)
{
exp2->split(s);
}
-char *CatOp::type = "CatOp";
+const char *CatOp::type = "CatOp";
void CatOp::calcSize(Char *rep)
{
exp2->split(s);
}
-char *CloseOp::type = "CloseOp";
+const char *CloseOp::type = "CloseOp";
void CloseOp::calcSize(Char *rep)
{
exp->split(s);
}
-char *CloseVOp::type = "CloseVOp";
+const char *CloseVOp::type = "CloseVOp";
void CloseVOp::calcSize(Char *rep)
{
|| !(p2 = strchr(hex, tolower(s.str[1]))))
{
fatal("Illegal hexadecimal character code");
+ return ~0;
+ }
+ else
+ {
+ s.len -= 2;
+ s.str += 2;
+
+ uint v = (uint)((p1 - hex) << 4)
+ + (uint)((p2 - hex));
+
+ return v;
}
- s.len -= 2;
- s.str += 2;
-
- uint v = (uint)((p1 - hex) << 4)
- + (uint)((p2 - hex));
-
- return v;
}
case 'X':
return inv;
}
-char *RuleOp::type = "RuleOp";
+const char *RuleOp::type = "RuleOp";
RuleOp::RuleOp(RegExp *e, RegExp *c, Token *t, uint a)
- : exp(e), ctx(c), ins(NULL), accept(a), code(t)
+ : exp(e)
+ , ctx(c)
+ , ins(NULL)
+ , accept(a)
+ , code(t)
+ , line(0)
{
;
}
ctx->split(s);
}
-extern void printSpan(std::ostream&, uint, uint);
-
void optimize(Ins *i)
{
while (!isMarked(i))
#include "parser.h"
#include "basics.h"
+#define YYMALLOC malloc
+#define YYFREE free
+
using namespace re2c;
extern "C"
{
-int yyparse();
int yylex();
-void yyerror(char*);
+void yyerror(const char*);
}
static re2c::uint accept;
#endif
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 56 "parser.y"
+#line 58 "parser.y"
typedef union YYSTYPE {
re2c::Symbol *symbol;
re2c::RegExp *regexp;
re2c::Str *str;
} YYSTYPE;
/* Line 196 of yacc.c. */
-#line 170 "parser.cc"
+#line 172 "parser.cc"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
/* Line 219 of yacc.c. */
-#line 182 "parser.cc"
+#line 184 "parser.cc"
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const unsigned char yyrline[] =
{
- 0, 82, 82, 84, 86, 89, 93, 95, 99, 104,
- 105, 109, 111, 115, 117, 124, 126, 130, 132, 146,
- 152, 154, 158, 162, 164, 166
+ 0, 84, 84, 86, 88, 91, 95, 97, 101, 106,
+ 107, 111, 113, 117, 119, 126, 128, 132, 134, 148,
+ 154, 156, 160, 164, 166, 168
};
#endif
switch (yyn)
{
case 2:
-#line 82 "parser.y"
+#line 84 "parser.y"
{ accept = 0;
spec = NULL; }
break;
case 3:
-#line 85 "parser.y"
+#line 87 "parser.y"
{ spec = spec? mkAlt(spec, (yyvsp[0].regexp)) : (yyvsp[0].regexp); }
break;
case 5:
-#line 90 "parser.y"
+#line 92 "parser.y"
{ if((yyvsp[-3].symbol)->re)
in->fatal("sym already defined");
(yyvsp[-3].symbol)->re = (yyvsp[-1].regexp); }
break;
case 6:
-#line 94 "parser.y"
+#line 96 "parser.y"
{ in->config((yyvsp[-3].str), (yyvsp[-1].str)); }
break;
case 7:
-#line 96 "parser.y"
+#line 98 "parser.y"
{ in->config((yyvsp[-3].str), (yyvsp[-1].number)); }
break;
case 8:
-#line 100 "parser.y"
+#line 102 "parser.y"
{ (yyval.regexp) = new RuleOp((yyvsp[-2].regexp), (yyvsp[-1].regexp), (yyvsp[0].token), accept++); }
break;
case 9:
-#line 104 "parser.y"
+#line 106 "parser.y"
{ (yyval.regexp) = new NullOp; }
break;
case 10:
-#line 106 "parser.y"
+#line 108 "parser.y"
{ (yyval.regexp) = (yyvsp[0].regexp); }
break;
case 11:
-#line 110 "parser.y"
+#line 112 "parser.y"
{ (yyval.regexp) = (yyvsp[0].regexp); }
break;
case 12:
-#line 112 "parser.y"
+#line 114 "parser.y"
{ (yyval.regexp) = mkAlt((yyvsp[-2].regexp), (yyvsp[0].regexp)); }
break;
case 13:
-#line 116 "parser.y"
+#line 118 "parser.y"
{ (yyval.regexp) = (yyvsp[0].regexp); }
break;
case 14:
-#line 118 "parser.y"
+#line 120 "parser.y"
{ (yyval.regexp) = mkDiff((yyvsp[-2].regexp), (yyvsp[0].regexp));
if(!(yyval.regexp))
in->fatal("can only difference char sets");
break;
case 15:
-#line 125 "parser.y"
+#line 127 "parser.y"
{ (yyval.regexp) = (yyvsp[0].regexp); }
break;
case 16:
-#line 127 "parser.y"
+#line 129 "parser.y"
{ (yyval.regexp) = new CatOp((yyvsp[-1].regexp), (yyvsp[0].regexp)); }
break;
case 17:
-#line 131 "parser.y"
+#line 133 "parser.y"
{ (yyval.regexp) = (yyvsp[0].regexp); }
break;
case 18:
-#line 133 "parser.y"
+#line 135 "parser.y"
{
switch((yyvsp[0].op)){
case '*':
break;
case 19:
-#line 147 "parser.y"
+#line 149 "parser.y"
{
(yyval.regexp) = new CloseVOp((yyvsp[-1].regexp), (yyvsp[0].extop).minsize, (yyvsp[0].extop).maxsize);
}
break;
case 20:
-#line 153 "parser.y"
+#line 155 "parser.y"
{ (yyval.op) = (yyvsp[0].op); }
break;
case 21:
-#line 155 "parser.y"
+#line 157 "parser.y"
{ (yyval.op) = ((yyvsp[-1].op) == (yyvsp[0].op)) ? (yyvsp[-1].op) : '*'; }
break;
case 22:
-#line 159 "parser.y"
+#line 161 "parser.y"
{ if(!(yyvsp[0].symbol)->re)
in->fatal("can't find symbol");
(yyval.regexp) = (yyvsp[0].symbol)->re; }
break;
case 23:
-#line 163 "parser.y"
+#line 165 "parser.y"
{ (yyval.regexp) = (yyvsp[0].regexp); }
break;
case 24:
-#line 165 "parser.y"
+#line 167 "parser.y"
{ (yyval.regexp) = (yyvsp[0].regexp); }
break;
case 25:
-#line 167 "parser.y"
+#line 169 "parser.y"
{ (yyval.regexp) = (yyvsp[-1].regexp); }
break;
}
/* Line 1126 of yacc.c. */
-#line 1328 "parser.cc"
+#line 1330 "parser.cc"
\f
yyvsp -= yylen;
yyssp -= yylen;
}
-#line 170 "parser.y"
+#line 172 "parser.y"
extern "C" {
-void yyerror(char* s){
+void yyerror(const char* s)
+{
in->fatal(s);
}
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 56 "parser.y"
+#line 58 "parser.y"
typedef union YYSTYPE {
re2c::Symbol *symbol;
re2c::RegExp *regexp;
BitMap *BitMap::first = NULL;
-BitMap::BitMap(const Go *g, const State *x) : go(g), on(x), next(first)
+BitMap::BitMap(const Go *g, const State *x)
+ : go(g)
+ , on(x)
+ , next(first)
+ , i(0)
+ , m(0)
{
first = this;
}
o << indent(ind) << "goto yy" << to->label << ";\n";
++oline;
- vUsedLabels.append(to->label);
+ vUsedLabels.insert(to->label);
}
-void genIf(std::ostream &o, uint ind, char *cmp, uint v, bool &readCh)
+void genIf(std::ostream &o, uint ind, const char *cmp, uint v, bool &readCh)
{
if (readCh)
{
o << ") ";
}
-static void need(std::ostream &o, uint ind, uint n, bool & readCh, uint mask)
+static void need(std::ostream &o, uint ind, uint n, bool & readCh)
{
uint fillIndex;
bool hasFillIndex = (0<=vFillIndexes);
- if ( hasFillIndex == true )
+ if (hasFillIndex)
{
fillIndex = vFillIndexes++;
o << indent(ind) << "YYSETSTATE(" << fillIndex << ");\n";
++oline;
}
+ else
+ {
+ fillIndex = ~0;
+ }
if (n == 1)
{
if (state->link)
{
- need(o, ind, state->depth, readCh, 0);
+ need(o, ind, state->depth, readCh);
}
}
o << indent(ind) << "++YYCURSOR;\n";
o << "yy" << label << ":\n";
oline += 2;
- need(o, ind, state->depth, readCh, 0);
+ need(o, ind, state->depth, readCh);
}
else
{
{
o << indent(ind) << "YYMARKER = ++YYCURSOR;\n";
++oline;
- need(o, ind, state->depth, readCh, 0);
+ need(o, ind, state->depth, readCh);
}
else
{
;
}
-void Rule::emit(std::ostream &o, uint ind, bool &readCh) const
+void Rule::emit(std::ostream &o, uint ind, bool &) const
{
uint back = rule->ctx->fixedLength();
void State::emit(std::ostream &o, uint ind, bool &readCh) const
{
- if (vUsedLabels.contains(label))
+ if (vUsedLabels.count(label))
{
o << "yy" << label << ":\n";
oline++;
SCC(uint);
~SCC();
void traverse(State*);
+
+#ifdef PEDANTIC
+private:
+ SCC(const SCC& oth)
+ : top(oth.top)
+ , stk(oth.stk)
+ {
+ }
+ SCC& operator = (const SCC& oth)
+ {
+ new(this) SCC(oth);
+ return *this;
+ }
+#endif
};
SCC::SCC(uint size)
+ : top(new State * [size])
+ , stk(top)
{
- top = stk = new State * [size];
}
SCC::~SCC()
if (!t->link) // marked as non-key state
{
- if (t->depth == -1)
+ if (t->depth == cInfinity)
{
t->depth = maxDist(t);
}
uint start_label = label;
- vUsedLabels.append(label);
+ vUsedLabels.insert(label);
(void) new Enter(head, label++);
for (s = head; s; s = s->next)
null_stream noWhere;
unsigned int nOrgOline = oline;
- int maxFillIndexes = vFillIndexes;
- int orgVFillIndexes = vFillIndexes;
+ uint maxFillIndexes = vFillIndexes;
+ uint orgVFillIndexes = vFillIndexes;
for (s = head; s; s = s->next)
{
static void stats();
BitMap(const Go*, const State*);
~BitMap();
+
+#if PEDANTIC
+ BitMap(const BitMap& oth)
+ : go(oth.go)
+ , on(oth.on)
+ , next(oth.next)
+ , i(oth.i)
+ , m(oth.m)
+ {
+ }
+ BitMap& operator = (const BitMap& oth)
+ {
+ new(this) BitMap(oth);
+ return *this;
+ }
+#endif
};
-class null_stream: public std::ostream
+template<class char_type>
+class basic_null_streambuf
+ : public std::basic_streambuf<char_type>
{
public:
- null_stream()
- : std::ostream(&ns)
+ basic_null_streambuf()
+ : std::basic_streambuf<char_type>()
+ {
+ }
+};
+
+template <class char_type>
+class basic_null_stream
+ : protected basic_null_streambuf<char_type>
+ , public std::basic_ostream<char_type>
+{
+public:
+ basic_null_stream()
+ : basic_null_streambuf<char_type>()
+ , std::basic_ostream<char_type>(static_cast<basic_null_streambuf<char_type>*>(this))
{
}
- null_stream& put(char_type)
+ basic_null_stream& put(char_type)
{
// nothing to do
return *this;
}
- null_stream& write(const char_type *, std::streamsize)
+ basic_null_stream& write(const char_type *, std::streamsize)
{
// nothing to do
return *this;
}
-
-protected:
- class null_streambuf: public std::streambuf
- {
- public:
- null_streambuf()
- : std::streambuf()
- {
- }
- };
- null_streambuf ns;
};
+typedef basic_null_stream<char> null_stream;
+
} // end namespace re2c
#endif
return o;
}
-State::State() : rule(NULL), link(NULL), kCount(0), kernel(NULL), action(NULL)
+State::State()
+ : label(0)
+ , rule(NULL)
+ , next(0)
+ , link(NULL)
+ , depth(0)
+ , kCount(0)
+ , kernel(NULL)
+ , isBase(0)
+ , go()
+ , action(NULL)
{
- go.nSpans = 0;
- go.span = NULL;
}
State::~State()
};
DFA::DFA(Ins *ins, uint ni, uint lb, uint ub, Char *rep)
- : lbChar(lb), ubChar(ub)
+ : lbChar(lb)
+ , ubChar(ub)
+ , nStates(0)
+ , head(NULL)
+ , tail(&head)
+ , toDo(NULL)
{
Ins **work = new Ins * [ni + 1];
uint nc = ub - lb;
GoTo *goTo = new GoTo[nc];
Span *span = new Span[nc];
memset((char*) goTo, 0, nc*sizeof(GoTo));
- tail = &head;
- head = NULL;
- nStates = 0;
- toDo = NULL;
findState(work, closure(work, &ins[0]) - work);
while (toDo)
public:
Action(State*);
+ virtual ~Action();
+
virtual void emit(std::ostream&, uint, bool&) const = 0;
virtual bool isRule() const;
virtual bool isMatch() const;
virtual bool readAhead() const;
+
+#ifdef PEDANTIC
+protected:
+ Action(const Action& oth)
+ : state(oth.state)
+ {
+ }
+ Action& operator = (const Action& oth)
+ {
+ state = oth.state;
+ return *this;
+ }
+#endif
};
class Match: public Action
public:
Accept(State*, uint, uint*, State**);
void emit(std::ostream&, uint, bool&) const;
+
+#ifdef PEDANTIC
+private:
+ Accept(const Accept& oth)
+ : Action(oth)
+ , nRules(oth.nRules)
+ , saves(oth.saves)
+ , rules(oth.rules)
+ {
+ }
+ Accept& operator=(const Accept& oth)
+ {
+ new(this) Accept(oth);
+ return *this;
+ }
+#endif
};
class Rule: public Action
Rule(State*, RuleOp*);
void emit(std::ostream&, uint, bool&) const;
bool isRule() const;
+
+#ifdef PEDANTIC
+private:
+ Rule (const Rule& oth)
+ : Action(oth)
+ , rule(oth.rule)
+ {
+ }
+ Rule& operator=(const Rule& oth)
+ {
+ new(this) Rule(oth);
+ return *this;
+ }
+#endif
};
class Span
void emit(std::ostream&, uint, bool&) const;
friend std::ostream& operator<<(std::ostream&, const State&);
friend std::ostream& operator<<(std::ostream&, const State*);
+
+#ifdef PEDANTIC
+private:
+ State(const State& oth)
+ : label(oth.label)
+ , rule(oth.rule)
+ , next(oth.next)
+ , link(oth.link)
+ , depth(oth.depth)
+ , kCount(oth.kCount)
+ , kernel(oth.kernel)
+ , isBase(oth.isBase)
+ , go(oth.go)
+ , action(oth.action)
+ {
+ }
+ State& operator = (const State& oth)
+ {
+ new(this) State(oth);
+ return *this;
+ }
+#endif
};
class DFA
friend std::ostream& operator<<(std::ostream&, const DFA&);
friend std::ostream& operator<<(std::ostream&, const DFA*);
+
+#ifdef PEDANTIC
+ DFA(const DFA& oth)
+ : lbChar(oth.lbChar)
+ , ubChar(oth.ubChar)
+ , nStates(oth.nStates)
+ , head(oth.head)
+ , tail(oth.tail)
+ , toDo(oth.toDo)
+ {
+ }
+ DFA& operator = (const DFA& oth)
+ {
+ new(this) DFA(oth);
+ return *this;
+ }
+#endif
};
inline Action::Action(State *s) : state(s)
s->action = this;
}
+inline Action::~Action()
+{
+}
+
inline bool Action::isRule() const
{
return false;
#include <set>
#include <algorithm>
-template<typename _Ty>
-class label_list: protected std::set<_Ty>
-{
-public:
- label_list()
- : std::set<_Ty>()
- {
- }
-
- void append(const _Ty &val)
- {
- std::set<_Ty>::insert(val);
- }
-
- bool contains(const _Ty &val)
- {
- return find(val) != std::set<_Ty>::end();
- }
-};
-
namespace re2c
{
-extern char *fileName;
+extern const char *fileName;
extern char *outputFileName;
extern bool bFlag;
extern bool dFlag;
extern uint *xlat, *talx;
extern int vFillIndexes;
-extern label_list<uint> vUsedLabels;
+extern std::set<uint> vUsedLabels;
extern uint nRealChars;
namespace re2c
{
-char *fileName = 0;
+const char *fileName = 0;
char *outputFileName = 0;
bool bFlag = false;
bool dFlag = false;
uint nRealChars = 256;
int vFillIndexes = -1;
-label_list<uint> vUsedLabels;
+std::set<uint> vUsedLabels;
using namespace std;
}
// set up the input stream
- istream* input = 0;
+ //istream* input = 0;
+ basic_istream<char> *input = 0;
ifstream inputFile;
protected:
Symbol(const SubStr& str)
- : name(str)
- , re(NULL)
+ : re(NULL)
+ , name(str)
{
}
static SymbolTable symbol_table;
Str name;
+
+#if PEDANTIC
+ Symbol(const Symbol& oth)
+ : re(oth.re)
+ , name(oth.name)
+ {
+ }
+ Symbol& operator = (const Symbol& oth)
+ {
+ new(this) Symbol(oth);
+ return *this;
+ }
+#endif
};
void line_source(unsigned int, std::ostream&);
#include "parser.h"
#include "basics.h"
+#define YYMALLOC malloc
+#define YYFREE free
+
using namespace re2c;
extern "C"
{
-int yyparse();
int yylex();
-void yyerror(char*);
+void yyerror(const char*);
}
static re2c::uint accept;
%%
extern "C" {
-void yyerror(char* s){
+void yyerror(const char* s)
+{
in->fatal(s);
}
uint size;
public:
- virtual char *typeOf() = 0;
- RegExp *isA(char *t)
+ RegExp() : size(0)
+ {
+ }
+
+ virtual ~RegExp() {}
+ virtual const char *typeOf() = 0;
+ RegExp *isA(const char *t)
{
return typeOf() == t ? this : NULL;
}
{
public:
- static char *type;
+ static const char *type;
public:
- char *typeOf()
+ const char *typeOf()
{
return type;
}
{
public:
- static char *type;
+ static const char *type;
Range *match;
public:
MatchOp(Range *m) : match(m)
- { }
+ {
+ }
- char *typeOf()
+ const char *typeOf()
{
return type;
}
uint fixedLength();
void compile(Char*, Ins*);
void display(std::ostream&) const;
+
+#ifdef PEDANTIC
+private:
+ MatchOp(const MatchOp& oth)
+ : RegExp(oth)
+ , match(oth.match)
+ {
+ }
+
+ MatchOp& operator = (const MatchOp& oth)
+ {
+ new(this) MatchOp(oth);
+ return *this;
+ }
+#endif
};
class RuleOp: public RegExp
{
+public:
+ static const char *type;
private:
- RegExp *exp;
+ RegExp *exp;
public:
- RegExp *ctx;
- static char *type;
- Ins *ins;
- uint accept;
- Token *code;
- uint line;
+ RegExp *ctx;
+ Ins *ins;
+ uint accept;
+ Token *code;
+ uint line;
public:
RuleOp(RegExp*, RegExp*, Token*, uint);
- char *typeOf()
+ const char *typeOf()
{
return type;
}
{
o << exp << "/" << ctx << ";";
}
+
+#ifdef PEDANTIC
+private:
+ RuleOp(const RuleOp& oth)
+ : RegExp(oth)
+ , exp(oth.exp)
+ , ctx(oth.ctx)
+ , ins(oth.ins)
+ , accept(oth.accept)
+ , code(oth.code)
+ , line(oth.line)
+ {
+ }
+ RuleOp& operator = (const RuleOp& oth)
+ {
+ new(this) RuleOp(oth);
+ return *this;
+ }
+#endif
};
class AltOp: public RegExp
RegExp *exp1, *exp2;
public:
- static char *type;
+ static const char *type;
public:
AltOp(RegExp *e1, RegExp *e2)
+ : exp1(e1)
+ , exp2(e2)
{
- exp1 = e1;
- exp2 = e2;
}
- char *typeOf()
+ const char *typeOf()
{
return type;
}
}
friend RegExp *mkAlt(RegExp*, RegExp*);
+
+#ifdef PEDANTIC
+private:
+ AltOp(const AltOp& oth)
+ : RegExp(oth)
+ , exp1(oth.exp1)
+ , exp2(oth.exp2)
+ {
+ }
+ AltOp& operator = (const AltOp& oth)
+ {
+ new(this) AltOp(oth);
+ return *this;
+ }
+#endif
};
class CatOp: public RegExp
RegExp *exp1, *exp2;
public:
- static char *type;
+ static const char *type;
public:
CatOp(RegExp *e1, RegExp *e2)
+ : exp1(e1)
+ , exp2(e2)
{
- exp1 = e1;
- exp2 = e2;
}
- char *typeOf()
+ const char *typeOf()
{
return type;
}
{
o << exp1 << exp2;
}
+
+#ifdef PEDANTIC
+private:
+ CatOp(const CatOp& oth)
+ : RegExp(oth)
+ , exp1(oth.exp1)
+ , exp2(oth.exp2)
+ {
+ }
+ CatOp& operator = (const CatOp& oth)
+ {
+ new(this) CatOp(oth);
+ return *this;
+ }
+#endif
};
class CloseOp: public RegExp
RegExp *exp;
public:
- static char *type;
+ static const char *type;
public:
CloseOp(RegExp *e)
+ : exp(e)
{
- exp = e;
}
- char *typeOf()
+ const char *typeOf()
{
return type;
}
{
o << exp << "+";
}
+
+#ifdef PEDANTIC
+private:
+ CloseOp(const CloseOp& oth)
+ : RegExp(oth)
+ , exp(oth.exp)
+ {
+ }
+ CloseOp& operator = (const CloseOp& oth)
+ {
+ new(this) CloseOp(oth);
+ return *this;
+ }
+#endif
};
class CloseVOp: public RegExp
int max;
public:
- static char *type;
+ static const char *type;
public:
CloseVOp(RegExp *e, int lb, int ub)
+ : exp(e)
+ , min(lb)
+ , max(ub)
{
- exp = e;
- min = lb;
- max = ub;
}
- char *typeOf()
+ const char *typeOf()
{
return type;
}
{
o << exp << "+";
}
+#ifdef PEDANTIC
+private:
+ CloseVOp(const CloseVOp& oth)
+ : RegExp(oth)
+ , exp(oth.exp)
+ , min(oth.min)
+ , max(oth.max)
+ {
+ }
+ CloseVOp& operator = (const CloseVOp& oth)
+ {
+ new(this) CloseVOp(oth);
+ return *this;
+ }
+#endif
};
extern void genCode(std::ostream&, RegExp*);
class SubStr
{
-
public:
const char * str;
uint len;
SubStr(const char*, uint);
SubStr(const char*);
SubStr(const SubStr&);
+ virtual ~SubStr();
void out(std::ostream&) const;
std::string to_string() const
{
return std::string(str, len);
}
+#ifdef PEDANTIC
+protected:
+ SubStr& operator = (const SubStr& oth);
+#endif
};
class Str: public SubStr
{
-
public:
Str(const SubStr&);
Str(Str&);
: str(s.str), len(s.len)
{ }
+inline SubStr::~SubStr()
+{ }
+
+#ifdef PEDANTIC
+inline SubStr& SubStr::operator = (const SubStr& oth)
+{
+ str = oth.str;
+ return *this;
+}
+#endif
+
} // end namespace re2c
#ifndef HAVE_STRNDUP