-/* Generated by re2c 0.14.1.dev on Mon May 11 13:39:25 2015*/
+/* Generated by re2c 0.14.1.dev on Mon May 11 17:45:17 2015*/
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <sstream>
-#include "src/codegen/print.h"
#include "src/dfa/dfa.h"
#include "src/globals.h"
#include "src/parse/parser.h"
++YYCURSOR;
yy113:
{
- std::ostringstream msg;
- msg << "unexpected character: ";
- prtChOrHex(msg, *tok);
- fatal(msg.str().c_str());
+ fatalf("unexpected character: '%c'", *tok);
goto scan;
}
yy114:
#include <iomanip>
#include <cctype>
-#include "src/codegen/print.h"
#include "src/codegen/skeleton/skeleton.h"
#include "src/dfa/dfa.h"
#include "src/dfa/encoding/utf16/utf16_regexp.h"
o << "match ";
for (; ret < (Ins*) i.i.link; ++ret)
- prtCh(o, ret->c.value);
+ {
+ o << "\\x" << std::hex << ret->c.value;
+ }
break;
}
{
CharSet cs;
re->split(cs);
-
- /*for(uint32_t k = 0; k < encoding.nCodeUnits();)
- {
- uint32_t j;
- for(j = k; ++k < encoding.nCodeUnits() && cs.rep[k] == cs.rep[j];);
- printSpan(std::cerr, j, k);
- std::cerr << "\t" << cs.rep[j] - &cs.ptn[0] << std::endl;
- }*/
-
+
Char *rep = new Char[encoding.nCodeUnits()];
for (uint32_t j = 0; j < encoding.nCodeUnits(); ++j)
optimize(ins);
/*
- for (const Ins *inst = &ins[0]; inst < &ins[size]; ) {
+ for (const Ins *inst = &ins[0]; inst < &ins[size]; )
+ {
inst = showIns(std::cout, *inst, ins[0]);
}
*/
#include <ctype.h>
#include <string.h>
-#include "src/codegen/print.h"
#include "src/dfa/dfa.h"
#include "src/globals.h"
#include "src/util/substr.h"
#include <iostream>
#include <sstream>
-#include "src/codegen/print.h"
#include "src/dfa/dfa.h"
#include "src/globals.h"
#include "src/parse/parser.h"
}
* {
- std::ostringstream msg;
- msg << "unexpected character: ";
- prtChOrHex(msg, *tok);
- fatal(msg.str().c_str());
+ fatalf("unexpected character: '%c'", *tok);
goto scan;
}
*/
-#include "src/codegen/print.h"
#include "src/util/range.h"
namespace re2c
{
-std::ostream& operator<<(std::ostream &o, const Range &r)
-{
- if ((r.ub - r.lb) == 1)
- {
- prtCh(o, r.lb);
- }
- else
- {
- prtCh(o, r.lb);
- o << "-";
- prtCh(o, r.ub - 1);
- }
-
- return o << r.next;
-}
-
Range *doUnion(Range *r1, Range *r2)
{
if (r1 == NULL)
{
vFreeList.erase(this);
}
-
- friend std::ostream& operator<<(std::ostream&, const Range&);
- friend std::ostream& operator<<(std::ostream&, const Range*);
};
-inline std::ostream& operator<<(std::ostream &o, const Range *r)
-{
- return r ? o << *r : o;
-}
-
Range *doUnion(Range *r1, Range *r2);
Range *doDiff(Range *r1, Range *r2);