File Index
Symbol Index
#include "RegexRich.h"
namespace
{
namespace
{
class
{
public
:
enum
{
,
,
};
const
wchar_t
*
;
*
;
;
;
;
;
;
;
bool
(
const
&
)
const
{
return
==
.
&&
==
.
&&
==
.
&&
==
.
;
}
};
class
{
public
:
;
;
*
;
const
wchar_t
*
;
bool
(
const
&
)
const
{
return
==
.
&&
==
.
&&
==
.
;
}
};
}
template
<>
struct
<
regex_internal
::
>
{
static
const
bool
=
true
;
};
template
<>
struct
<
regex_internal
::
>
{
static
const
bool
=
true
;
};
namespace
{
using
namespace
collections
;
void
(
<
>&
,
&
,
&
,
const
&
)
{
if
(
.
()==
)
{
.
(
);
}
else
{
]
;
}
&
=
];
current
.
=
;
=
++;
}
(
<
>&
,
&
,
&
)
{
&
=
];
=
current
.
;
return
current
;
}
template
<
typename
,
typename
>
void
(
<
,
>&
,
&
,
const
&
)
{
if
(
.
()==
)
{
.
(
);
}
else
{
]=
;
}
++;
}
template
<
typename
,
typename
>
(
<
,
>&
,
&
)
{
return
--
];
}
}
namespace
{
bool
::
(
const
&
)
const
{
return
==
.
&&
==
.
&&
==
.
;
}
::
(
::
)
:dfa(
)
{
=
new
[
.
()];
for
(
=
0
;
i
<
.
();
i
++)
{
*
=
i
].
();
=
0
;
=
0
;
bool
=
false
;
for
(
=
0
;
j
<
state
->
.
();
j
++)
{
if
(
state
->
j
]->
==
::
)
{
charEdges
++;
}
else
{
if
(
state
->
j
]->
==
::
||
state
->
j
]->
==
::
)
{
mustSave
=
true
;
}
nonCharEdges
++;
}
}
[
i
].
=
mustSave
||
nonCharEdges
>
1
|| (
nonCharEdges
!=
0
&&
charEdges
!=
0
);
state
->
=&
[
i
];
}
}
::
()
{
delete
[]
;
}
bool
::
(
const
wchar_t
*
,
const
wchar_t
*
,
&
)
{
<
>
;
<
>
;
;
currentState
.
=
0
;
currentState
.
=
;
currentState
.
=-
1
;
currentState
.
=
0
;
currentState
.
=
0
;
currentState
.
=
;
currentState
.
=
0
;
currentState
.
=
::
;
while
(!
currentState
.
->
)
{
bool
=
false
;
=
currentState
;
for
(
=
currentState
.
;
i
<
currentState
.
->
.
();
i
++)
{
*
=
currentState
.
->
i
];
switch
(
transition
->
)
{
case
::
:
{
=
transition
->
;
found
=
range
.
<= *
currentState
.
&&
range
.
>= *
currentState
.
;
if
(
found
)
{
currentState
.
++;
}
}
break
;
case
::
:
{
found
=
currentState
.
==
;
}
break
;
case
::
:
{
found
= *
currentState
.
==
L'\0'
;
}
break
;
case
::
:
{
found
=
true
;
}
break
;
case
::
:
{
;
saver
.
=
currentState
.
;
saver
.
=
currentState
.
;
saver
.
=
transition
;
(
extensionSavers
,
currentState
.
,
currentState
.
,
saver
);
;
capture
.
=
transition
->
;
capture
.
=
currentState
.
-
;
capture
.
= -
1
;
(
.
,
currentState
.
,
capture
);
found
=
true
;
}
break
;
case
::
:
{
=
0
;
for
(
=
0
;
j
<
currentState
.
;
j
++)
{
&
=
.
j
];
if
(
capture
.
==
transition
->
)
{
if
(
capture
.
!= -
1
&& (
transition
->
== -
1
||
transition
->
==
index
))
{
if
(
(
+
capture
.
,
currentState
.
,
capture
.
) ==
0
)
{
currentState
.
+=
capture
.
;
found
=
true
;
break
;
}
}
if
(
transition
->
!= -
1
&&
index
==
transition
->
)
{
break
;
}
else
{
index
++;
}
}
}
}
break
;
case
::
:
{
;
saver
.
= -
1
;
saver
.
=
currentState
.
;
saver
.
=
transition
;
(
extensionSavers
,
currentState
.
,
currentState
.
,
saver
);
oldState
.
=
::
;
found
=
true
;
}
break
;
case
::
:
{
;
saver
.
= -
1
;
saver
.
=
currentState
.
;
saver
.
=
transition
;
(
extensionSavers
,
currentState
.
,
currentState
.
,
saver
);
oldState
.
=
::
;
found
=
true
;
}
break
;
case
::
:
{
}
break
;
case
::
:
{
=
(
extensionSavers
,
currentState
.
,
currentState
.
);
switch
(
extensionSaver
.
->
)
{
case
::
:
{
&
=
.
extensionSaver
.
];
capture
.
= (
currentState
.
-
) -
capture
.
;
found
=
true
;
}
break
;
case
::
:
for
(
=
currentState
.
-
1
;
j
>=
0
;
j
--)
{
&
=
stateSavers
j
];
if
(
stateSaver
.
==
::
)
{
oldState
.
=
stateSaver
.
;
oldState
.
=
j
;
currentState
.
=
stateSaver
.
;
currentState
.
=
j
;
break
;
}
}
found
=
true
;
break
;
case
::
:
for
(
=
currentState
.
-
1
;
j
>=
0
;
j
--)
{
&
=
stateSavers
j
];
if
(
stateSaver
.
==
::
)
{
oldState
stateSaver
;
oldState
.
=
::
;
currentState
stateSaver
;
currentState
.
=
::
;
i
=
currentState
.
-
1
;
break
;
}
}
break
;
default
:;
}
}
break
;
default
:;
}
if
(
found
)
{
*
= (
*)
currentState
.
->
;
if
(
data
->
)
{
oldState
.
=
i
+
1
;
(
stateSavers
,
currentState
.
,
oldState
);
}
currentState
.
=
transition
->
;
currentState
.
=
0
;
break
;
}
}
if
(!
found
)
{
if
(
currentState
.
)
{
currentState
(
stateSavers
,
currentState
.
);
if
(
currentState
.
->
currentState
.
-
1
]->
==
::
)
{
for
(
=
0
;
i
<
currentState
.
->
.
();
i
++)
{
*
=
currentState
.
->
i
];
if
(
transition
->
==
::
)
{
currentState
.
=
transition
->
;
currentState
.
=
0
;
currentState
.
=
::
;
break
;
}
}
}
}
else
{
break
;
}
}
}
if
(
currentState
.
->
)
{
.
=
-
;
.
= (
currentState
.
-
) -
.
;
for
(
=
.
.
() -
1
;
i
>=
currentState
.
;
i
--)
{
.
.
(
i
);
}
return
true
;
}
else
{
.
.
();
return
false
;
}
}
bool
::
(
const
wchar_t
*
,
const
wchar_t
*
,
&
)
{
const
wchar_t
*
=
;
while
(*
read
)
{
if
(
(
read
,
,
))
{
return
true
;
}
read
++;
}
return
false
;
}
const
<
>&
::
()
{
return
;
}
}
}