Comparing version 0.0.1 to 0.0.2
664
index.js
@@ -49,12 +49,32 @@ function parse(n) { | ||
function Unicode(n) { | ||
Token.call(this, "unicode"), this.code = n.toUpperCase(); | ||
} | ||
function Hex(n) { | ||
Token.call(this, "hex"), this.code = n.toUpperCase(); | ||
} | ||
function Octal(n) { | ||
Token.call(this, "octal"), this.code = n.toUpperCase(); | ||
} | ||
function BackReference(n) { | ||
Token.call(this, "back-reference"), this.code = n.toUpperCase(); | ||
} | ||
function ControlCharacter(n) { | ||
Token.call(this, "control"), this.code = n.toUpperCase(); | ||
} | ||
var parser = function() { | ||
function n(n, t) { | ||
function l() { | ||
function r() { | ||
this.constructor = n; | ||
} | ||
l.prototype = t.prototype, n.prototype = new l(); | ||
r.prototype = t.prototype, n.prototype = new r(); | ||
} | ||
function t(n, t, l, u, r) { | ||
function e(n, t) { | ||
function l(n) { | ||
function t(n, t, r, e, l) { | ||
function u(n, t) { | ||
function r(n) { | ||
function t(n) { | ||
@@ -73,42 +93,42 @@ return n.charCodeAt(0).toString(16).toUpperCase(); | ||
} | ||
var u, r; | ||
var e, l; | ||
switch (n.length) { | ||
case 0: | ||
u = "end of input"; | ||
e = "end of input"; | ||
break; | ||
case 1: | ||
u = n[0]; | ||
e = n[0]; | ||
break; | ||
default: | ||
u = n.slice(0, -1).join(", ") + " or " + n[n.length - 1]; | ||
e = n.slice(0, -1).join(", ") + " or " + n[n.length - 1]; | ||
} | ||
return r = t ? '"' + l(t) + '"' : "end of input", "Expected " + u + " but " + r + " found."; | ||
return l = t ? '"' + r(t) + '"' : "end of input", "Expected " + e + " but " + l + " found."; | ||
} | ||
this.expected = n, this.found = t, this.offset = l, this.line = u, this.column = r, | ||
this.name = "SyntaxError", this.message = e(n, t); | ||
this.expected = n, this.found = t, this.offset = r, this.line = e, this.column = l, | ||
this.name = "SyntaxError", this.message = u(n, t); | ||
} | ||
function l(n) { | ||
function l() { | ||
return n.substring(Uu, Wu); | ||
function r(n) { | ||
function r() { | ||
return n.substring(De, qe); | ||
} | ||
function u() { | ||
return Uu; | ||
function e() { | ||
return De; | ||
} | ||
function r(t) { | ||
function l(t, l, u) { | ||
var r, e; | ||
for (r = l; u > r; r++) e = n.charAt(r), "\n" === e ? (t.seenCR || t.line++, t.column = 1, | ||
t.seenCR = !1) : "\r" === e || "\u2028" === e || "\u2029" === e ? (t.line++, t.column = 1, | ||
function l(t) { | ||
function r(t, r, e) { | ||
var l, u; | ||
for (l = r; e > l; l++) u = n.charAt(l), "\n" === u ? (t.seenCR || t.line++, t.column = 1, | ||
t.seenCR = !1) : "\r" === u || "\u2028" === u || "\u2029" === u ? (t.line++, t.column = 1, | ||
t.seenCR = !0) : (t.column++, t.seenCR = !1); | ||
} | ||
return zu !== t && (zu > t && (zu = 0, Hu = { | ||
return We !== t && (We > t && (We = 0, ze = { | ||
line: 1, | ||
column: 1, | ||
seenCR: !1 | ||
}), l(Hu, zu, t), zu = t), Hu; | ||
}), r(ze, We, t), We = t), ze; | ||
} | ||
function e(n) { | ||
Iu > Wu || (Wu > Iu && (Iu = Wu, Ju = []), Ju.push(n)); | ||
function u(n) { | ||
Ie > qe || (qe > Ie && (Ie = qe, Je = []), Je.push(n)); | ||
} | ||
@@ -119,19 +139,19 @@ function o(n) { | ||
} | ||
function a() { | ||
var t, l, u, r, o; | ||
return t = Wu, l = c(), null !== l ? (u = Wu, 124 === n.charCodeAt(Wu) ? (r = st, | ||
Wu++) : (r = null, 0 === Ku && e(ht)), null !== r ? (o = a(), null !== o ? (r = [ r, o ], | ||
u = r) : (Wu = u, u = it)) : (Wu = u, u = it), null === u && (u = ft), null !== u ? (Uu = t, | ||
l = pt(l, u), null === l ? (Wu = t, t = l) : t = l) : (Wu = t, t = it)) : (Wu = t, | ||
function c() { | ||
var t, r, e, l, o; | ||
return t = qe, r = a(), null !== r ? (e = qe, 124 === n.charCodeAt(qe) ? (l = ft, | ||
qe++) : (l = null, 0 === Ke && u(pt)), null !== l ? (o = c(), null !== o ? (l = [ l, o ], | ||
e = l) : (qe = e, e = it)) : (qe = e, e = it), null === e && (e = st), null !== e ? (De = t, | ||
r = ht(r, e), null === r ? (qe = t, t = r) : t = r) : (qe = t, t = it)) : (qe = t, | ||
t = it), t; | ||
} | ||
function c() { | ||
var n, t, l, u, r; | ||
if (n = Wu, t = f(), null === t && (t = ft), null !== t) if (l = Wu, Ku++, u = p(), | ||
Ku--, null === u ? l = ft : (Wu = l, l = it), null !== l) { | ||
for (u = [], r = h(), null === r && (r = i()); null !== r; ) u.push(r), r = h(), | ||
null === r && (r = i()); | ||
null !== u ? (r = s(), null === r && (r = ft), null !== r ? (Uu = n, t = dt(t, u, r), | ||
null === t ? (Wu = n, n = t) : n = t) : (Wu = n, n = it)) : (Wu = n, n = it); | ||
} else Wu = n, n = it; else Wu = n, n = it; | ||
function a() { | ||
var n, t, r, e, l; | ||
if (n = qe, t = s(), null === t && (t = st), null !== t) if (r = qe, Ke++, e = h(), | ||
Ke--, null === e ? r = st : (qe = r, r = it), null !== r) { | ||
for (e = [], l = p(), null === l && (l = i()); null !== l; ) e.push(l), l = p(), | ||
null === l && (l = i()); | ||
null !== e ? (l = f(), null === l && (l = st), null !== l ? (De = n, t = dt(t, e, l), | ||
null === t ? (qe = n, n = t) : n = t) : (qe = n, n = it)) : (qe = n, n = it); | ||
} else qe = n, n = it; else qe = n, n = it; | ||
return n; | ||
@@ -141,338 +161,338 @@ } | ||
var n; | ||
return n = x(), null === n && (n = F(), null === n && (n = M())), n; | ||
return n = g(), null === n && (n = m(), null === n && (n = B())), n; | ||
} | ||
function s() { | ||
var t, r; | ||
return t = qe, 94 === n.charCodeAt(qe) ? (r = Ct, qe++) : (r = null, 0 === Ke && u(kt)), | ||
null !== r && (De = t, r = vt()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function f() { | ||
var t, l; | ||
return t = Wu, 94 === n.charCodeAt(Wu) ? (l = vt, Wu++) : (l = null, 0 === Ku && e(At)), | ||
null !== l && (Uu = t, l = wt()), null === l ? (Wu = t, t = l) : t = l, t; | ||
var t, r; | ||
return t = qe, 36 === n.charCodeAt(qe) ? (r = yt, qe++) : (r = null, 0 === Ke && u(bt)), | ||
null !== r && (De = t, r = At()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function s() { | ||
var t, l; | ||
return t = Wu, 36 === n.charCodeAt(Wu) ? (l = Ct, Wu++) : (l = null, 0 === Ku && e(bt)), | ||
null !== l && (Uu = t, l = kt()), null === l ? (Wu = t, t = l) : t = l, t; | ||
function p() { | ||
var n, t, r; | ||
return n = qe, t = i(), null !== t ? (r = h(), null !== r ? (De = n, t = wt(t, r), | ||
null === t ? (qe = n, n = t) : n = t) : (qe = n, n = it)) : (qe = n, n = it), n; | ||
} | ||
function h() { | ||
var n, t, l; | ||
return n = Wu, t = i(), null !== t ? (l = p(), null !== l ? (Uu = n, t = yt(t, l), | ||
null === t ? (Wu = n, n = t) : n = t) : (Wu = n, n = it)) : (Wu = n, n = it), n; | ||
var n, t, r; | ||
return Ke++, n = qe, t = d(), null !== t ? (r = x(), null === r && (r = st), null !== r ? (De = n, | ||
t = Tt(t, r), null === t ? (qe = n, n = t) : n = t) : (qe = n, n = it)) : (qe = n, | ||
n = it), Ke--, null === n && (t = null, 0 === Ke && u(xt)), n; | ||
} | ||
function p() { | ||
var n, t, l; | ||
return Ku++, n = Wu, t = d(), null !== t ? (l = T(), null === l && (l = ft), null !== l ? (Uu = n, | ||
t = gt(t, l), null === t ? (Wu = n, n = t) : n = t) : (Wu = n, n = it)) : (Wu = n, | ||
n = it), Ku--, null === n && (t = null, 0 === Ku && e(Tt)), n; | ||
} | ||
function d() { | ||
var n; | ||
return n = v(), null === n && (n = A(), null === n && (n = w(), null === n && (n = C(), | ||
null === n && (n = b(), null === n && (n = k(), null === n && (n = y())))))), n; | ||
return n = C(), null === n && (n = k(), null === n && (n = v(), null === n && (n = y(), | ||
null === n && (n = b(), null === n && (n = A(), null === n && (n = w())))))), n; | ||
} | ||
function v() { | ||
var t, l, u, r, o, a; | ||
return t = Wu, 123 === n.charCodeAt(Wu) ? (l = xt, Wu++) : (l = null, 0 === Ku && e(Qt)), | ||
null !== l ? (u = g(), null !== u ? (44 === n.charCodeAt(Wu) ? (r = mt, Wu++) : (r = null, | ||
0 === Ku && e(Gt)), null !== r ? (o = g(), null !== o ? (125 === n.charCodeAt(Wu) ? (a = Rt, | ||
Wu++) : (a = null, 0 === Ku && e(Ft)), null !== a ? (Uu = t, l = St(u, o), null === l ? (Wu = t, | ||
t = l) : t = l) : (Wu = t, t = it)) : (Wu = t, t = it)) : (Wu = t, t = it)) : (Wu = t, | ||
t = it)) : (Wu = t, t = it), t; | ||
function C() { | ||
var t, r, e, l, o, c; | ||
return t = qe, 123 === n.charCodeAt(qe) ? (r = gt, qe++) : (r = null, 0 === Ke && u(Rt)), | ||
null !== r ? (e = T(), null !== e ? (44 === n.charCodeAt(qe) ? (l = Ot, qe++) : (l = null, | ||
0 === Ke && u(Qt)), null !== l ? (o = T(), null !== o ? (125 === n.charCodeAt(qe) ? (c = jt, | ||
qe++) : (c = null, 0 === Ke && u(mt)), null !== c ? (De = t, r = Gt(e, o), null === r ? (qe = t, | ||
t = r) : t = r) : (qe = t, t = it)) : (qe = t, t = it)) : (qe = t, t = it)) : (qe = t, | ||
t = it)) : (qe = t, t = it), t; | ||
} | ||
function A() { | ||
var t, l, u, r; | ||
return t = Wu, n.substr(Wu, 2) === jt ? (l = jt, Wu += 2) : (l = null, 0 === Ku && e(Ot)), | ||
null !== l ? (u = g(), null !== u ? (125 === n.charCodeAt(Wu) ? (r = Rt, Wu++) : (r = null, | ||
0 === Ku && e(Ft)), null !== r ? (Uu = t, l = Lt(u), null === l ? (Wu = t, t = l) : t = l) : (Wu = t, | ||
t = it)) : (Wu = t, t = it)) : (Wu = t, t = it), t; | ||
function k() { | ||
var t, r, e, l; | ||
return t = qe, n.substr(qe, 2) === Ft ? (r = Ft, qe += 2) : (r = null, 0 === Ke && u(St)), | ||
null !== r ? (e = T(), null !== e ? (125 === n.charCodeAt(qe) ? (l = jt, qe++) : (l = null, | ||
0 === Ke && u(mt)), null !== l ? (De = t, r = Ut(e), null === r ? (qe = t, t = r) : t = r) : (qe = t, | ||
t = it)) : (qe = t, t = it)) : (qe = t, t = it), t; | ||
} | ||
function w() { | ||
var t, l, u, r; | ||
return t = Wu, 123 === n.charCodeAt(Wu) ? (l = xt, Wu++) : (l = null, 0 === Ku && e(Qt)), | ||
null !== l ? (u = g(), null !== u ? (n.substr(Wu, 2) === Mt ? (r = Mt, Wu += 2) : (r = null, | ||
0 === Ku && e(Et)), null !== r ? (Uu = t, l = Bt(u), null === l ? (Wu = t, t = l) : t = l) : (Wu = t, | ||
t = it)) : (Wu = t, t = it)) : (Wu = t, t = it), t; | ||
function v() { | ||
var t, r, e, l; | ||
return t = qe, 123 === n.charCodeAt(qe) ? (r = gt, qe++) : (r = null, 0 === Ke && u(Rt)), | ||
null !== r ? (e = T(), null !== e ? (n.substr(qe, 2) === Bt ? (l = Bt, qe += 2) : (l = null, | ||
0 === Ke && u(Lt)), null !== l ? (De = t, r = Mt(e), null === r ? (qe = t, t = r) : t = r) : (qe = t, | ||
t = it)) : (qe = t, t = it)) : (qe = t, t = it), t; | ||
} | ||
function C() { | ||
var t, l, u, r; | ||
return t = Wu, 123 === n.charCodeAt(Wu) ? (l = xt, Wu++) : (l = null, 0 === Ku && e(Qt)), | ||
null !== l ? (u = g(), null !== u ? (125 === n.charCodeAt(Wu) ? (r = Rt, Wu++) : (r = null, | ||
0 === Ku && e(Ft)), null !== r ? (Uu = t, l = $t(u), null === l ? (Wu = t, t = l) : t = l) : (Wu = t, | ||
t = it)) : (Wu = t, t = it)) : (Wu = t, t = it), t; | ||
function y() { | ||
var t, r, e, l; | ||
return t = qe, 123 === n.charCodeAt(qe) ? (r = gt, qe++) : (r = null, 0 === Ke && u(Rt)), | ||
null !== r ? (e = T(), null !== e ? (125 === n.charCodeAt(qe) ? (l = jt, qe++) : (l = null, | ||
0 === Ke && u(mt)), null !== l ? (De = t, r = Et(e), null === r ? (qe = t, t = r) : t = r) : (qe = t, | ||
t = it)) : (qe = t, t = it)) : (qe = t, t = it), t; | ||
} | ||
function b() { | ||
var t, l; | ||
return t = Wu, 43 === n.charCodeAt(Wu) ? (l = qt, Wu++) : (l = null, 0 === Ku && e(Dt)), | ||
null !== l && (Uu = t, l = Wt()), null === l ? (Wu = t, t = l) : t = l, t; | ||
var t, r; | ||
return t = qe, 43 === n.charCodeAt(qe) ? (r = Ht, qe++) : (r = null, 0 === Ke && u($t)), | ||
null !== r && (De = t, r = qt()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function k() { | ||
var t, l; | ||
return t = Wu, 42 === n.charCodeAt(Wu) ? (l = Ut, Wu++) : (l = null, 0 === Ku && e(zt)), | ||
null !== l && (Uu = t, l = Ht()), null === l ? (Wu = t, t = l) : t = l, t; | ||
function A() { | ||
var t, r; | ||
return t = qe, 42 === n.charCodeAt(qe) ? (r = Dt, qe++) : (r = null, 0 === Ke && u(Wt)), | ||
null !== r && (De = t, r = zt()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function y() { | ||
var t, l; | ||
return t = Wu, 63 === n.charCodeAt(Wu) ? (l = It, Wu++) : (l = null, 0 === Ku && e(Jt)), | ||
null !== l && (Uu = t, l = Kt()), null === l ? (Wu = t, t = l) : t = l, t; | ||
function w() { | ||
var t, r; | ||
return t = qe, 63 === n.charCodeAt(qe) ? (r = It, qe++) : (r = null, 0 === Ke && u(Jt)), | ||
null !== r && (De = t, r = Kt()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function T() { | ||
function x() { | ||
var t; | ||
return 63 === n.charCodeAt(Wu) ? (t = It, Wu++) : (t = null, 0 === Ku && e(Jt)), | ||
return 63 === n.charCodeAt(qe) ? (t = It, qe++) : (t = null, 0 === Ke && u(Jt)), | ||
t; | ||
} | ||
function g() { | ||
var t, l, u; | ||
if (t = Wu, l = [], Nt.test(n.charAt(Wu)) ? (u = n.charAt(Wu), Wu++) : (u = null, | ||
0 === Ku && e(Pt)), null !== u) for (;null !== u; ) l.push(u), Nt.test(n.charAt(Wu)) ? (u = n.charAt(Wu), | ||
Wu++) : (u = null, 0 === Ku && e(Pt)); else l = it; | ||
return null !== l && (Uu = t, l = Vt(l)), null === l ? (Wu = t, t = l) : t = l, | ||
function T() { | ||
var t, r, e; | ||
if (t = qe, r = [], Nt.test(n.charAt(qe)) ? (e = n.charAt(qe), qe++) : (e = null, | ||
0 === Ke && u(Pt)), null !== e) for (;null !== e; ) r.push(e), Nt.test(n.charAt(qe)) ? (e = n.charAt(qe), | ||
qe++) : (e = null, 0 === Ke && u(Pt)); else r = it; | ||
return null !== r && (De = t, r = Vt(r)), null === r ? (qe = t, t = r) : t = r, | ||
t; | ||
} | ||
function x() { | ||
var t, l, u, r; | ||
return t = Wu, 40 === n.charCodeAt(Wu) ? (l = Xt, Wu++) : (l = null, 0 === Ku && e(Yt)), | ||
null !== l ? (u = G(), null === u && (u = R(), null === u && (u = m(), null === u && (u = Q()))), | ||
null !== u ? (41 === n.charCodeAt(Wu) ? (r = Zt, Wu++) : (r = null, 0 === Ku && e(_t)), | ||
null !== r ? (Uu = t, l = nl(u), null === l ? (Wu = t, t = l) : t = l) : (Wu = t, | ||
t = it)) : (Wu = t, t = it)) : (Wu = t, t = it), t; | ||
function g() { | ||
var t, r, e, l; | ||
return t = qe, 40 === n.charCodeAt(qe) ? (r = Xt, qe++) : (r = null, 0 === Ke && u(Yt)), | ||
null !== r ? (e = Q(), null === e && (e = j(), null === e && (e = O(), null === e && (e = R()))), | ||
null !== e ? (41 === n.charCodeAt(qe) ? (l = Zt, qe++) : (l = null, 0 === Ke && u(_t)), | ||
null !== l ? (De = t, r = nr(e), null === r ? (qe = t, t = r) : t = r) : (qe = t, | ||
t = it)) : (qe = t, t = it)) : (qe = t, t = it), t; | ||
} | ||
function Q() { | ||
function R() { | ||
var n, t; | ||
return n = Wu, t = a(), null !== t && (Uu = n, t = tl(t)), null === t ? (Wu = n, | ||
return n = qe, t = c(), null !== t && (De = n, t = tr(t)), null === t ? (qe = n, | ||
n = t) : n = t, n; | ||
} | ||
function O() { | ||
var t, r, e; | ||
return t = qe, n.substr(qe, 2) === rr ? (r = rr, qe += 2) : (r = null, 0 === Ke && u(er)), | ||
null !== r ? (e = c(), null !== e ? (De = t, r = lr(e), null === r ? (qe = t, t = r) : t = r) : (qe = t, | ||
t = it)) : (qe = t, t = it), t; | ||
} | ||
function Q() { | ||
var t, r, e; | ||
return t = qe, n.substr(qe, 2) === ur ? (r = ur, qe += 2) : (r = null, 0 === Ke && u(or)), | ||
null !== r ? (e = c(), null !== e ? (De = t, r = cr(e), null === r ? (qe = t, t = r) : t = r) : (qe = t, | ||
t = it)) : (qe = t, t = it), t; | ||
} | ||
function j() { | ||
var t, r, e; | ||
return t = qe, n.substr(qe, 2) === ar ? (r = ar, qe += 2) : (r = null, 0 === Ke && u(ir)), | ||
null !== r ? (e = c(), null !== e ? (De = t, r = sr(e), null === r ? (qe = t, t = r) : t = r) : (qe = t, | ||
t = it)) : (qe = t, t = it), t; | ||
} | ||
function m() { | ||
var t, l, u; | ||
return t = Wu, n.substr(Wu, 2) === ll ? (l = ll, Wu += 2) : (l = null, 0 === Ku && e(ul)), | ||
null !== l ? (u = a(), null !== u ? (Uu = t, l = rl(u), null === l ? (Wu = t, t = l) : t = l) : (Wu = t, | ||
t = it)) : (Wu = t, t = it), t; | ||
var t, r, e, l, o; | ||
if (Ke++, t = qe, 91 === n.charCodeAt(qe) ? (r = pr, qe++) : (r = null, 0 === Ke && u(hr)), | ||
null !== r) if (94 === n.charCodeAt(qe) ? (e = Ct, qe++) : (e = null, 0 === Ke && u(kt)), | ||
null === e && (e = st), null !== e) { | ||
for (l = [], o = G(), null === o && (o = F()); null !== o; ) l.push(o), o = G(), | ||
null === o && (o = F()); | ||
null !== l ? (93 === n.charCodeAt(qe) ? (o = dr, qe++) : (o = null, 0 === Ke && u(Cr)), | ||
null !== o ? (De = t, r = kr(e, l), null === r ? (qe = t, t = r) : t = r) : (qe = t, | ||
t = it)) : (qe = t, t = it); | ||
} else qe = t, t = it; else qe = t, t = it; | ||
return Ke--, null === t && (r = null, 0 === Ke && u(fr)), t; | ||
} | ||
function G() { | ||
var t, l, u; | ||
return t = Wu, n.substr(Wu, 2) === el ? (l = el, Wu += 2) : (l = null, 0 === Ku && e(ol)), | ||
null !== l ? (u = a(), null !== u ? (Uu = t, l = al(u), null === l ? (Wu = t, t = l) : t = l) : (Wu = t, | ||
t = it)) : (Wu = t, t = it), t; | ||
var t, r, e, l; | ||
return Ke++, t = qe, r = F(), null !== r ? (45 === n.charCodeAt(qe) ? (e = yr, qe++) : (e = null, | ||
0 === Ke && u(br)), null !== e ? (l = F(), null !== l ? (De = t, r = Ar(r, l), null === r ? (qe = t, | ||
t = r) : t = r) : (qe = t, t = it)) : (qe = t, t = it)) : (qe = t, t = it), Ke--, | ||
null === t && (r = null, 0 === Ke && u(vr)), t; | ||
} | ||
function R() { | ||
var t, l, u; | ||
return t = Wu, n.substr(Wu, 2) === cl ? (l = cl, Wu += 2) : (l = null, 0 === Ku && e(il)), | ||
null !== l ? (u = a(), null !== u ? (Uu = t, l = fl(u), null === l ? (Wu = t, t = l) : t = l) : (Wu = t, | ||
t = it)) : (Wu = t, t = it), t; | ||
} | ||
function F() { | ||
var t, l, u, r, o; | ||
if (Ku++, t = Wu, 91 === n.charCodeAt(Wu) ? (l = hl, Wu++) : (l = null, 0 === Ku && e(pl)), | ||
null !== l) if (94 === n.charCodeAt(Wu) ? (u = vt, Wu++) : (u = null, 0 === Ku && e(At)), | ||
null === u && (u = ft), null !== u) { | ||
for (r = [], o = S(), null === o && (o = j()); null !== o; ) r.push(o), o = S(), | ||
null === o && (o = j()); | ||
null !== r ? (93 === n.charCodeAt(Wu) ? (o = dl, Wu++) : (o = null, 0 === Ku && e(vl)), | ||
null !== o ? (Uu = t, l = Al(u, r), null === l ? (Wu = t, t = l) : t = l) : (Wu = t, | ||
t = it)) : (Wu = t, t = it); | ||
} else Wu = t, t = it; else Wu = t, t = it; | ||
return Ku--, null === t && (l = null, 0 === Ku && e(sl)), t; | ||
} | ||
function S() { | ||
var t, l, u, r; | ||
return Ku++, t = Wu, l = j(), null !== l ? (45 === n.charCodeAt(Wu) ? (u = Cl, Wu++) : (u = null, | ||
0 === Ku && e(bl)), null !== u ? (r = j(), null !== r ? (Uu = t, l = kl(l, r), null === l ? (Wu = t, | ||
t = l) : t = l) : (Wu = t, t = it)) : (Wu = t, t = it)) : (Wu = t, t = it), Ku--, | ||
null === t && (l = null, 0 === Ku && e(wl)), t; | ||
} | ||
function j() { | ||
var n, t; | ||
return Ku++, n = L(), null === n && (n = O()), Ku--, null === n && (t = null, 0 === Ku && e(yl)), | ||
return Ke++, n = U(), null === n && (n = S()), Ke--, null === n && (t = null, 0 === Ke && u(wr)), | ||
n; | ||
} | ||
function O() { | ||
function S() { | ||
var t; | ||
return Tl.test(n.charAt(Wu)) ? (t = n.charAt(Wu), Wu++) : (t = null, 0 === Ku && e(gl)), | ||
return xr.test(n.charAt(qe)) ? (t = n.charAt(qe), qe++) : (t = null, 0 === Ke && u(Tr)), | ||
t; | ||
} | ||
function L() { | ||
function U() { | ||
var n; | ||
return n = q(), null === n && (n = Z(), null === n && (n = U(), null === n && (n = z(), | ||
null === n && (n = H(), null === n && (n = I(), null === n && (n = J(), null === n && (n = K(), | ||
return n = H(), null === n && (n = Z(), null === n && (n = D(), null === n && (n = W(), | ||
null === n && (n = z(), null === n && (n = I(), null === n && (n = J(), null === n && (n = K(), | ||
null === n && (n = N(), null === n && (n = P(), null === n && (n = V(), null === n && (n = X(), | ||
null === n && (n = Y(), null === n && (n = nt(), null === n && (n = tt(), null === n && (n = lt(), | ||
null === n && (n = ut(), null === n && (n = rt()))))))))))))))))), n; | ||
null === n && (n = Y(), null === n && (n = nt(), null === n && (n = tt(), null === n && (n = rt(), | ||
null === n && (n = et(), null === n && (n = lt()))))))))))))))))), n; | ||
} | ||
function M() { | ||
function B() { | ||
var n; | ||
return n = E(), null === n && (n = $(), null === n && (n = B())), n; | ||
return n = L(), null === n && (n = E(), null === n && (n = M())), n; | ||
} | ||
function E() { | ||
var t, l; | ||
return t = Wu, 46 === n.charCodeAt(Wu) ? (l = xl, Wu++) : (l = null, 0 === Ku && e(Ql)), | ||
null !== l && (Uu = t, l = ml()), null === l ? (Wu = t, t = l) : t = l, t; | ||
function L() { | ||
var t, r; | ||
return t = qe, 46 === n.charCodeAt(qe) ? (r = gr, qe++) : (r = null, 0 === Ke && u(Rr)), | ||
null !== r && (De = t, r = Or()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function B() { | ||
var t, l; | ||
return Ku++, t = Wu, Rl.test(n.charAt(Wu)) ? (l = n.charAt(Wu), Wu++) : (l = null, | ||
0 === Ku && e(Fl)), null !== l && (Uu = t, l = Sl(l)), null === l ? (Wu = t, t = l) : t = l, | ||
Ku--, null === t && (l = null, 0 === Ku && e(Gl)), t; | ||
function M() { | ||
var t, r; | ||
return Ke++, t = qe, jr.test(n.charAt(qe)) ? (r = n.charAt(qe), qe++) : (r = null, | ||
0 === Ke && u(mr)), null !== r && (De = t, r = Gr(r)), null === r ? (qe = t, t = r) : t = r, | ||
Ke--, null === t && (r = null, 0 === Ke && u(Qr)), t; | ||
} | ||
function $() { | ||
function E() { | ||
var n; | ||
return n = D(), null === n && (n = W(), null === n && (n = Z(), null === n && (n = U(), | ||
null === n && (n = z(), null === n && (n = H(), null === n && (n = I(), null === n && (n = J(), | ||
return n = $(), null === n && (n = q(), null === n && (n = Z(), null === n && (n = D(), | ||
null === n && (n = W(), null === n && (n = z(), null === n && (n = I(), null === n && (n = J(), | ||
null === n && (n = K(), null === n && (n = N(), null === n && (n = P(), null === n && (n = V(), | ||
null === n && (n = X(), null === n && (n = Y(), null === n && (n = _(), null === n && (n = nt(), | ||
null === n && (n = tt(), null === n && (n = lt(), null === n && (n = ut(), null === n && (n = rt()))))))))))))))))))), | ||
null === n && (n = tt(), null === n && (n = rt(), null === n && (n = et(), null === n && (n = lt()))))))))))))))))))), | ||
n; | ||
} | ||
function H() { | ||
var t, r; | ||
return t = qe, n.substr(qe, 2) === Fr ? (r = Fr, qe += 2) : (r = null, 0 === Ke && u(Sr)), | ||
null !== r && (De = t, r = Ur()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function $() { | ||
var t, r; | ||
return t = qe, n.substr(qe, 2) === Fr ? (r = Fr, qe += 2) : (r = null, 0 === Ke && u(Sr)), | ||
null !== r && (De = t, r = Br()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function q() { | ||
var t, l; | ||
return t = Wu, n.substr(Wu, 2) === jl ? (l = jl, Wu += 2) : (l = null, 0 === Ku && e(Ol)), | ||
null !== l && (Uu = t, l = Ll()), null === l ? (Wu = t, t = l) : t = l, t; | ||
var t, r; | ||
return t = qe, n.substr(qe, 2) === Lr ? (r = Lr, qe += 2) : (r = null, 0 === Ke && u(Mr)), | ||
null !== r && (De = t, r = Er()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function D() { | ||
var t, l; | ||
return t = Wu, n.substr(Wu, 2) === jl ? (l = jl, Wu += 2) : (l = null, 0 === Ku && e(Ol)), | ||
null !== l && (Uu = t, l = Ml()), null === l ? (Wu = t, t = l) : t = l, t; | ||
var t, r; | ||
return t = qe, n.substr(qe, 2) === Hr ? (r = Hr, qe += 2) : (r = null, 0 === Ke && u($r)), | ||
null !== r && (De = t, r = qr()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function W() { | ||
var t, l; | ||
return t = Wu, n.substr(Wu, 2) === El ? (l = El, Wu += 2) : (l = null, 0 === Ku && e(Bl)), | ||
null !== l && (Uu = t, l = $l()), null === l ? (Wu = t, t = l) : t = l, t; | ||
var t, r; | ||
return t = qe, n.substr(qe, 2) === Dr ? (r = Dr, qe += 2) : (r = null, 0 === Ke && u(Wr)), | ||
null !== r && (De = t, r = zr()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function U() { | ||
var t, l; | ||
return t = Wu, n.substr(Wu, 2) === ql ? (l = ql, Wu += 2) : (l = null, 0 === Ku && e(Dl)), | ||
null !== l && (Uu = t, l = Wl()), null === l ? (Wu = t, t = l) : t = l, t; | ||
} | ||
function z() { | ||
var t, l; | ||
return t = Wu, n.substr(Wu, 2) === Ul ? (l = Ul, Wu += 2) : (l = null, 0 === Ku && e(zl)), | ||
null !== l && (Uu = t, l = Hl()), null === l ? (Wu = t, t = l) : t = l, t; | ||
var t, r; | ||
return t = qe, n.substr(qe, 2) === Ir ? (r = Ir, qe += 2) : (r = null, 0 === Ke && u(Jr)), | ||
null !== r && (De = t, r = Kr()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function H() { | ||
var t, l; | ||
return t = Wu, n.substr(Wu, 2) === Il ? (l = Il, Wu += 2) : (l = null, 0 === Ku && e(Jl)), | ||
null !== l && (Uu = t, l = Kl()), null === l ? (Wu = t, t = l) : t = l, t; | ||
} | ||
function I() { | ||
var t, l; | ||
return t = Wu, n.substr(Wu, 2) === Nl ? (l = Nl, Wu += 2) : (l = null, 0 === Ku && e(Pl)), | ||
null !== l && (Uu = t, l = Vl()), null === l ? (Wu = t, t = l) : t = l, t; | ||
var t, r; | ||
return t = qe, n.substr(qe, 2) === Nr ? (r = Nr, qe += 2) : (r = null, 0 === Ke && u(Pr)), | ||
null !== r && (De = t, r = Vr()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function J() { | ||
var t, l; | ||
return t = Wu, n.substr(Wu, 2) === Xl ? (l = Xl, Wu += 2) : (l = null, 0 === Ku && e(Yl)), | ||
null !== l && (Uu = t, l = Zl()), null === l ? (Wu = t, t = l) : t = l, t; | ||
var t, r; | ||
return t = qe, n.substr(qe, 2) === Xr ? (r = Xr, qe += 2) : (r = null, 0 === Ke && u(Yr)), | ||
null !== r && (De = t, r = Zr()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function K() { | ||
var t, l; | ||
return t = Wu, n.substr(Wu, 2) === _l ? (l = _l, Wu += 2) : (l = null, 0 === Ku && e(nu)), | ||
null !== l && (Uu = t, l = tu()), null === l ? (Wu = t, t = l) : t = l, t; | ||
var t, r; | ||
return t = qe, n.substr(qe, 2) === _r ? (r = _r, qe += 2) : (r = null, 0 === Ke && u(ne)), | ||
null !== r && (De = t, r = te()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function N() { | ||
var t, l; | ||
return t = Wu, n.substr(Wu, 2) === lu ? (l = lu, Wu += 2) : (l = null, 0 === Ku && e(uu)), | ||
null !== l && (Uu = t, l = ru()), null === l ? (Wu = t, t = l) : t = l, t; | ||
var t, r; | ||
return t = qe, n.substr(qe, 2) === re ? (r = re, qe += 2) : (r = null, 0 === Ke && u(ee)), | ||
null !== r && (De = t, r = le()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function P() { | ||
var t, l; | ||
return t = Wu, n.substr(Wu, 2) === eu ? (l = eu, Wu += 2) : (l = null, 0 === Ku && e(ou)), | ||
null !== l && (Uu = t, l = au()), null === l ? (Wu = t, t = l) : t = l, t; | ||
var t, r; | ||
return t = qe, n.substr(qe, 2) === ue ? (r = ue, qe += 2) : (r = null, 0 === Ke && u(oe)), | ||
null !== r && (De = t, r = ce()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function V() { | ||
var t, l; | ||
return t = Wu, n.substr(Wu, 2) === cu ? (l = cu, Wu += 2) : (l = null, 0 === Ku && e(iu)), | ||
null !== l && (Uu = t, l = fu()), null === l ? (Wu = t, t = l) : t = l, t; | ||
var t, r; | ||
return t = qe, n.substr(qe, 2) === ae ? (r = ae, qe += 2) : (r = null, 0 === Ke && u(ie)), | ||
null !== r && (De = t, r = se()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function X() { | ||
var t, l; | ||
return t = Wu, n.substr(Wu, 2) === su ? (l = su, Wu += 2) : (l = null, 0 === Ku && e(hu)), | ||
null !== l && (Uu = t, l = pu()), null === l ? (Wu = t, t = l) : t = l, t; | ||
var t, r; | ||
return t = qe, n.substr(qe, 2) === fe ? (r = fe, qe += 2) : (r = null, 0 === Ke && u(pe)), | ||
null !== r && (De = t, r = he()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function Y() { | ||
var t, l; | ||
return t = Wu, n.substr(Wu, 2) === du ? (l = du, Wu += 2) : (l = null, 0 === Ku && e(vu)), | ||
null !== l && (Uu = t, l = Au()), null === l ? (Wu = t, t = l) : t = l, t; | ||
var t, r; | ||
return t = qe, n.substr(qe, 2) === de ? (r = de, qe += 2) : (r = null, 0 === Ke && u(Ce)), | ||
null !== r && (De = t, r = ke()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function Z() { | ||
var t, l, u; | ||
return t = Wu, n.substr(Wu, 2) === wu ? (l = wu, Wu += 2) : (l = null, 0 === Ku && e(Cu)), | ||
null !== l ? (n.length > Wu ? (u = n.charAt(Wu), Wu++) : (u = null, 0 === Ku && e(bu)), | ||
null !== u ? (Uu = t, l = ku(u), null === l ? (Wu = t, t = l) : t = l) : (Wu = t, | ||
t = it)) : (Wu = t, t = it), t; | ||
var t, r, e; | ||
return t = qe, n.substr(qe, 2) === ve ? (r = ve, qe += 2) : (r = null, 0 === Ke && u(ye)), | ||
null !== r ? (n.length > qe ? (e = n.charAt(qe), qe++) : (e = null, 0 === Ke && u(be)), | ||
null !== e ? (De = t, r = Ae(e), null === r ? (qe = t, t = r) : t = r) : (qe = t, | ||
t = it)) : (qe = t, t = it), t; | ||
} | ||
function _() { | ||
var t, l, u; | ||
return t = Wu, 92 === n.charCodeAt(Wu) ? (l = yu, Wu++) : (l = null, 0 === Ku && e(Tu)), | ||
null !== l ? (gu.test(n.charAt(Wu)) ? (u = n.charAt(Wu), Wu++) : (u = null, 0 === Ku && e(xu)), | ||
null !== u ? (Uu = t, l = Qu(), null === l ? (Wu = t, t = l) : t = l) : (Wu = t, | ||
t = it)) : (Wu = t, t = it), t; | ||
var t, r, e; | ||
return t = qe, 92 === n.charCodeAt(qe) ? (r = we, qe++) : (r = null, 0 === Ke && u(xe)), | ||
null !== r ? (Te.test(n.charAt(qe)) ? (e = n.charAt(qe), qe++) : (e = null, 0 === Ke && u(ge)), | ||
null !== e ? (De = t, r = Re(e), null === r ? (qe = t, t = r) : t = r) : (qe = t, | ||
t = it)) : (qe = t, t = it), t; | ||
} | ||
function nt() { | ||
var t, l, u, r; | ||
if (t = Wu, n.substr(Wu, 2) === mu ? (l = mu, Wu += 2) : (l = null, 0 === Ku && e(Gu)), | ||
null !== l) { | ||
if (u = [], Ru.test(n.charAt(Wu)) ? (r = n.charAt(Wu), Wu++) : (r = null, 0 === Ku && e(Fu)), | ||
null !== r) for (;null !== r; ) u.push(r), Ru.test(n.charAt(Wu)) ? (r = n.charAt(Wu), | ||
Wu++) : (r = null, 0 === Ku && e(Fu)); else u = it; | ||
null !== u ? (Uu = t, l = Su(u), null === l ? (Wu = t, t = l) : t = l) : (Wu = t, | ||
var t, r, e, l; | ||
if (t = qe, n.substr(qe, 2) === Oe ? (r = Oe, qe += 2) : (r = null, 0 === Ke && u(Qe)), | ||
null !== r) { | ||
if (e = [], je.test(n.charAt(qe)) ? (l = n.charAt(qe), qe++) : (l = null, 0 === Ke && u(me)), | ||
null !== l) for (;null !== l; ) e.push(l), je.test(n.charAt(qe)) ? (l = n.charAt(qe), | ||
qe++) : (l = null, 0 === Ke && u(me)); else e = it; | ||
null !== e ? (De = t, r = Ge(e), null === r ? (qe = t, t = r) : t = r) : (qe = t, | ||
t = it); | ||
} else Wu = t, t = it; | ||
} else qe = t, t = it; | ||
return t; | ||
} | ||
function tt() { | ||
var t, l, u, r; | ||
if (t = Wu, n.substr(Wu, 2) === ju ? (l = ju, Wu += 2) : (l = null, 0 === Ku && e(Ou)), | ||
null !== l) { | ||
if (u = [], Lu.test(n.charAt(Wu)) ? (r = n.charAt(Wu), Wu++) : (r = null, 0 === Ku && e(Mu)), | ||
null !== r) for (;null !== r; ) u.push(r), Lu.test(n.charAt(Wu)) ? (r = n.charAt(Wu), | ||
Wu++) : (r = null, 0 === Ku && e(Mu)); else u = it; | ||
null !== u ? (Uu = t, l = Eu(u), null === l ? (Wu = t, t = l) : t = l) : (Wu = t, | ||
var t, r, e, l; | ||
if (t = qe, n.substr(qe, 2) === Fe ? (r = Fe, qe += 2) : (r = null, 0 === Ke && u(Se)), | ||
null !== r) { | ||
if (e = [], Ue.test(n.charAt(qe)) ? (l = n.charAt(qe), qe++) : (l = null, 0 === Ke && u(Be)), | ||
null !== l) for (;null !== l; ) e.push(l), Ue.test(n.charAt(qe)) ? (l = n.charAt(qe), | ||
qe++) : (l = null, 0 === Ke && u(Be)); else e = it; | ||
null !== e ? (De = t, r = Le(e), null === r ? (qe = t, t = r) : t = r) : (qe = t, | ||
t = it); | ||
} else Wu = t, t = it; | ||
} else qe = t, t = it; | ||
return t; | ||
} | ||
function lt() { | ||
var t, l, u, r; | ||
if (t = Wu, n.substr(Wu, 2) === Bu ? (l = Bu, Wu += 2) : (l = null, 0 === Ku && e($u)), | ||
null !== l) { | ||
if (u = [], Lu.test(n.charAt(Wu)) ? (r = n.charAt(Wu), Wu++) : (r = null, 0 === Ku && e(Mu)), | ||
null !== r) for (;null !== r; ) u.push(r), Lu.test(n.charAt(Wu)) ? (r = n.charAt(Wu), | ||
Wu++) : (r = null, 0 === Ku && e(Mu)); else u = it; | ||
null !== u ? (Uu = t, l = qu(u), null === l ? (Wu = t, t = l) : t = l) : (Wu = t, | ||
function rt() { | ||
var t, r, e, l; | ||
if (t = qe, n.substr(qe, 2) === Me ? (r = Me, qe += 2) : (r = null, 0 === Ke && u(Ee)), | ||
null !== r) { | ||
if (e = [], Ue.test(n.charAt(qe)) ? (l = n.charAt(qe), qe++) : (l = null, 0 === Ke && u(Be)), | ||
null !== l) for (;null !== l; ) e.push(l), Ue.test(n.charAt(qe)) ? (l = n.charAt(qe), | ||
qe++) : (l = null, 0 === Ke && u(Be)); else e = it; | ||
null !== e ? (De = t, r = He(e), null === r ? (qe = t, t = r) : t = r) : (qe = t, | ||
t = it); | ||
} else Wu = t, t = it; | ||
} else qe = t, t = it; | ||
return t; | ||
} | ||
function ut() { | ||
var t, l; | ||
return t = Wu, n.substr(Wu, 2) === mu ? (l = mu, Wu += 2) : (l = null, 0 === Ku && e(Gu)), | ||
null !== l && (Uu = t, l = Du()), null === l ? (Wu = t, t = l) : t = l, t; | ||
function et() { | ||
var t, r; | ||
return t = qe, n.substr(qe, 2) === Oe ? (r = Oe, qe += 2) : (r = null, 0 === Ke && u(Qe)), | ||
null !== r && (De = t, r = $e()), null === r ? (qe = t, t = r) : t = r, t; | ||
} | ||
function rt() { | ||
var t, l, u; | ||
return t = Wu, 92 === n.charCodeAt(Wu) ? (l = yu, Wu++) : (l = null, 0 === Ku && e(Tu)), | ||
null !== l ? (n.length > Wu ? (u = n.charAt(Wu), Wu++) : (u = null, 0 === Ku && e(bu)), | ||
null !== u ? (Uu = t, l = Sl(u), null === l ? (Wu = t, t = l) : t = l) : (Wu = t, | ||
t = it)) : (Wu = t, t = it), t; | ||
function lt() { | ||
var t, r, e; | ||
return t = qe, 92 === n.charCodeAt(qe) ? (r = we, qe++) : (r = null, 0 === Ke && u(xe)), | ||
null !== r ? (n.length > qe ? (e = n.charAt(qe), qe++) : (e = null, 0 === Ke && u(be)), | ||
null !== e ? (De = t, r = Gr(e), null === r ? (qe = t, t = r) : t = r) : (qe = t, | ||
t = it)) : (qe = t, t = it), t; | ||
} | ||
var et, ot = arguments.length > 1 ? arguments[1] : {}, at = { | ||
regexp: a | ||
}, ct = a, it = null, ft = "", st = "|", ht = '"|"', pt = function(n, t) { | ||
var ut, ot = arguments.length > 1 ? arguments[1] : {}, ct = { | ||
regexp: c | ||
}, at = c, it = null, st = "", ft = "|", pt = '"|"', ht = function(n, t) { | ||
return t ? new Alternate(n, t[1]) : n; | ||
}, dt = function(n, t, l) { | ||
return new Match([ n ].concat(t).concat([ l ])); | ||
}, vt = "^", At = '"^"', wt = function() { | ||
}, dt = function(n, t, r) { | ||
return new Match([ n ].concat(t).concat([ r ])); | ||
}, Ct = "^", kt = '"^"', vt = function() { | ||
return new Token("start"); | ||
}, Ct = "$", bt = '"$"', kt = function() { | ||
}, yt = "$", bt = '"$"', At = function() { | ||
return new Token("end"); | ||
}, yt = function(n, t) { | ||
}, wt = function(n, t) { | ||
return new Quantified(n, t); | ||
}, Tt = "Quantifier", gt = function(n, t) { | ||
}, xt = "Quantifier", Tt = function(n, t) { | ||
return t && (n.greedy = !1), n; | ||
}, xt = "{", Qt = '"{"', mt = ",", Gt = '","', Rt = "}", Ft = '"}"', St = function(n, t) { | ||
}, gt = "{", Rt = '"{"', Ot = ",", Qt = '","', jt = "}", mt = '"}"', Gt = function(n, t) { | ||
return new Quantifier(n, t); | ||
}, jt = "{,", Ot = '"{,"', Lt = function(n) { | ||
}, Ft = "{,", St = '"{,"', Ut = function(n) { | ||
return new Quantifier(0, n); | ||
}, Mt = ",}", Et = '",}"', Bt = function(n) { | ||
}, Bt = ",}", Lt = '",}"', Mt = function(n) { | ||
return new Quantifier(n, 1/0); | ||
}, $t = function(n) { | ||
}, Et = function(n) { | ||
return new Quantifier(n, n); | ||
}, qt = "+", Dt = '"+"', Wt = function() { | ||
}, Ht = "+", $t = '"+"', qt = function() { | ||
return new Quantifier(1, 1/0); | ||
}, Ut = "*", zt = '"*"', Ht = function() { | ||
}, Dt = "*", Wt = '"*"', zt = function() { | ||
return new Quantifier(0, 1/0); | ||
@@ -483,75 +503,75 @@ }, It = "?", Jt = '"?"', Kt = function() { | ||
return +n.join(""); | ||
}, Xt = "(", Yt = '"("', Zt = ")", _t = '")"', nl = function(n) { | ||
}, Xt = "(", Yt = '"("', Zt = ")", _t = '")"', nr = function(n) { | ||
return n; | ||
}, tl = function(n) { | ||
}, tr = function(n) { | ||
return new CaptureGroup(index++, n); | ||
}, ll = "?:", ul = '"?:"', rl = function(n) { | ||
}, rr = "?:", er = '"?:"', lr = function(n) { | ||
return new Group("non-capture-group", n); | ||
}, el = "?=", ol = '"?="', al = function(n) { | ||
}, ur = "?=", or = '"?="', cr = function(n) { | ||
return new Group("positive-lookahead", n); | ||
}, cl = "?!", il = '"?!"', fl = function(n) { | ||
}, ar = "?!", ir = '"?!"', sr = function(n) { | ||
return new Group("negative-lookahead", n); | ||
}, sl = "CharacterSet", hl = "[", pl = '"["', dl = "]", vl = '"]"', Al = function(n, t) { | ||
}, fr = "CharacterSet", pr = "[", hr = '"["', dr = "]", Cr = '"]"', kr = function(n, t) { | ||
return new CharSet(!!n, t); | ||
}, wl = "CharacterRange", Cl = "-", bl = '"-"', kl = function(n, t) { | ||
}, vr = "CharacterRange", yr = "-", br = '"-"', Ar = function(n, t) { | ||
return new CharacterRange(n, t); | ||
}, yl = "Character", Tl = /^[^\\\]]/, gl = "[^\\\\\\]]", xl = ".", Ql = '"."', ml = function() { | ||
}, wr = "Character", xr = /^[^\\\]]/, Tr = "[^\\\\\\]]", gr = ".", Rr = '"."', Or = function() { | ||
return new Token("any-character"); | ||
}, Gl = "Literal", Rl = /^[^|\\\/.[() ?+*$\^]/, Fl = "[^|\\\\\\/.[() ?+*$\\^]", Sl = function(n) { | ||
}, Qr = "Literal", jr = /^[^|\\\/.[() ?+*$\^]/, mr = "[^|\\\\\\/.[() ?+*$\\^]", Gr = function(n) { | ||
return new Literal(n); | ||
}, jl = "\\b", Ol = '"\\\\b"', Ll = function() { | ||
}, Fr = "\\b", Sr = '"\\\\b"', Ur = function() { | ||
return new Token("backspace"); | ||
}, Ml = function() { | ||
}, Br = function() { | ||
return new Token("word-boundary"); | ||
}, El = "\\B", Bl = '"\\\\B"', $l = function() { | ||
}, Lr = "\\B", Mr = '"\\\\B"', Er = function() { | ||
return new Token("non-word-boundary"); | ||
}, ql = "\\d", Dl = '"\\\\d"', Wl = function() { | ||
}, Hr = "\\d", $r = '"\\\\d"', qr = function() { | ||
return new Token("digit"); | ||
}, Ul = "\\D", zl = '"\\\\D"', Hl = function() { | ||
}, Dr = "\\D", Wr = '"\\\\D"', zr = function() { | ||
return new Token("non-digit"); | ||
}, Il = "\\f", Jl = '"\\\\f"', Kl = function() { | ||
}, Ir = "\\f", Jr = '"\\\\f"', Kr = function() { | ||
return new Token("form-feed"); | ||
}, Nl = "\\n", Pl = '"\\\\n"', Vl = function() { | ||
}, Nr = "\\n", Pr = '"\\\\n"', Vr = function() { | ||
return new Token("line-feed"); | ||
}, Xl = "\\r", Yl = '"\\\\r"', Zl = function() { | ||
}, Xr = "\\r", Yr = '"\\\\r"', Zr = function() { | ||
return new Token("carriage-return"); | ||
}, _l = "\\s", nu = '"\\\\s"', tu = function() { | ||
}, _r = "\\s", ne = '"\\\\s"', te = function() { | ||
return new Token("white-space"); | ||
}, lu = "\\S", uu = '"\\\\S"', ru = function() { | ||
}, re = "\\S", ee = '"\\\\S"', le = function() { | ||
return new Token("non-white-space"); | ||
}, eu = "\\t", ou = '"\\\\t"', au = function() { | ||
}, ue = "\\t", oe = '"\\\\t"', ce = function() { | ||
return new Token("tab"); | ||
}, cu = "\\v", iu = '"\\\\v"', fu = function() { | ||
}, ae = "\\v", ie = '"\\\\v"', se = function() { | ||
return new Token("vertical-tab"); | ||
}, su = "\\w", hu = '"\\\\w"', pu = function() { | ||
}, fe = "\\w", pe = '"\\\\w"', he = function() { | ||
return new Token("word"); | ||
}, du = "\\W", vu = '"\\\\W"', Au = function() { | ||
}, de = "\\W", Ce = '"\\\\W"', ke = function() { | ||
return new Token("non-word"); | ||
}, wu = "\\c", Cu = '"\\\\c"', bu = "any character", ku = function() { | ||
return new Token("control-character"); | ||
}, yu = "\\", Tu = '"\\\\"', gu = /^[1-9]/, xu = "[1-9]", Qu = function() { | ||
return new Token("back-reference"); | ||
}, mu = "\\0", Gu = '"\\\\0"', Ru = /^[0-7]/, Fu = "[0-7]", Su = function() { | ||
return new Token("octal-character"); | ||
}, ju = "\\x", Ou = '"\\\\x"', Lu = /^[0-9a-fA-F]/, Mu = "[0-9a-fA-F]", Eu = function() { | ||
return new Token("hex-character"); | ||
}, Bu = "\\u", $u = '"\\\\u"', qu = function() { | ||
return new Token("unicode-character"); | ||
}, Du = function() { | ||
}, ve = "\\c", ye = '"\\\\c"', be = "any character", Ae = function() { | ||
return new Control("control-character"); | ||
}, we = "\\", xe = '"\\\\"', Te = /^[1-9]/, ge = "[1-9]", Re = function(n) { | ||
return new BackReference(n); | ||
}, Oe = "\\0", Qe = '"\\\\0"', je = /^[0-7]/, me = "[0-7]", Ge = function(n) { | ||
return new Octal(n.join("")); | ||
}, Fe = "\\x", Se = '"\\\\x"', Ue = /^[0-9a-fA-F]/, Be = "[0-9a-fA-F]", Le = function(n) { | ||
return new Hex(n.join("")); | ||
}, Me = "\\u", Ee = '"\\\\u"', He = function(n) { | ||
return new Unicode(n.join("")); | ||
}, $e = function() { | ||
return new Token("null-character"); | ||
}, Wu = 0, Uu = 0, zu = 0, Hu = { | ||
}, qe = 0, De = 0, We = 0, ze = { | ||
line: 1, | ||
column: 1, | ||
seenCR: !1 | ||
}, Iu = 0, Ju = [], Ku = 0; | ||
}, Ie = 0, Je = [], Ke = 0; | ||
if ("startRule" in ot) { | ||
if (!(ot.startRule in at)) throw new Error("Can't start parsing from rule \"" + ot.startRule + '".'); | ||
ct = at[ot.startRule]; | ||
if (!(ot.startRule in ct)) throw new Error("Can't start parsing from rule \"" + ot.startRule + '".'); | ||
at = ct[ot.startRule]; | ||
} | ||
if (Token.offset = u, Token.text = l, et = ct(), null !== et && Wu === n.length) return et; | ||
throw o(Ju), Uu = Math.max(Wu, Iu), new t(Ju, Uu < n.length ? n.charAt(Uu) : null, Uu, r(Uu).line, r(Uu).column); | ||
if (Token.offset = e, Token.text = r, ut = at(), null !== ut && qe === n.length) return ut; | ||
throw o(Je), De = Math.max(qe, Ie), new t(Je, De < n.length ? n.charAt(De) : null, De, l(De).line, l(De).column); | ||
} | ||
return n(t, Error), { | ||
SyntaxError: t, | ||
parse: l | ||
parse: r | ||
}; | ||
@@ -571,2 +591,8 @@ }(), index = 1; | ||
CharacterRange.prototype = Object.create(Token.prototype), CharacterRange.prototype.constructor = CharacterRange, | ||
exports.Literal = Literal, Literal.prototype = Object.create(Token.prototype), Literal.prototype.constructor = Literal; | ||
exports.Literal = Literal, Literal.prototype = Object.create(Token.prototype), Literal.prototype.constructor = Literal, | ||
exports.Unicode = Unicode, Unicode.prototype = Object.create(Token.prototype), Unicode.prototype.constructor = Unicode, | ||
exports.Hex = Hex, Hex.prototype = Object.create(Token.prototype), Hex.prototype.constructor = Hex, | ||
exports.Octal = Octal, Octal.prototype = Object.create(Token.prototype), Octal.prototype.constructor = Octal, | ||
exports.BackReference = BackReference, BackReference.prototype = Object.create(Token.prototype), | ||
BackReference.prototype.constructor = BackReference, exports.ControlCharacter = ControlCharacter, | ||
ControlCharacter.prototype = Object.create(Token.prototype), ControlCharacter.prototype.constructor = ControlCharacter; |
{ | ||
"name": "regexp", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Regex Parser", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
@@ -115,3 +115,14 @@ module.exports = [ | ||
] | ||
}], | ||
[/\u1Af/, { | ||
type: 'match', | ||
offset: 0, | ||
text: '\\u1Af', | ||
body: [{ | ||
type: 'unicode', | ||
offset: 0, | ||
text: '\\u1Af', | ||
code: '1AF' | ||
}] | ||
}] | ||
] |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33357
743