#include "ParsingAutomaton.h"
namespace
{
namespace
{
using
namespace
collections
;
using
namespace
definitions
;
namespace
{
::
(
*
)
{
return
->
!=
::
?
::
:
::
;
}
void
(
::
(*
)(
*),
<
*>&
,
*
,
*
,
<
>&
)
{
FOREACH(Transition*, singleTransitionPath, transitionPath)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
*>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
*
;
__foreach_iterator__
.
(
singleTransitionPath
);)
{
if
(
singleTransitionPath
->
==
&&
(
singleTransitionPath
)!=
::
)
{
<
<
*>>
=
new
<
*>;
(*
path
.
(),
);
.
(
(
,
path
,
true
));
return
;
}
}
::
=
?
(
):
::
;
switch
(
result
)
{
case
::
:
{
FOREACH(Transition*, newTransition, state->transitions)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
*>&
= ::
vl
::
collections
::
(
->
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
*
;
__foreach_iterator__
.
(
newTransition
);)
{
if
(!
.
(
newTransition
))
{
.
(
newTransition
);
(
,
,
newTransition
,
newTransition
->
,
);
.
(
.
()-
1
);
}
}
}
break
;
case
::
:
{
<
<
*>>
=
new
<
*>;
(*
path
.
(),
);
.
(
(
,
path
,
false
));
}
break
;
default
:;
}
}
void
(
::
(*
)(
*),
*
,
<
>&
)
{
<
*>
;
(
,
transitionPath
,
0
,
,
);
}
*
(
<
>
,
*
,
<
*>&
,
<
*,
*>&
)
{
*
=
0
;
=
.
().
(
);
if
(
mapIndex
==-
1
)
{
newState
=
(
);
.
(
,
newState
);
}
else
{
newState
=
.
().
(
mapIndex
);
}
if
(!
.
(
))
{
.
(
);
}
return
newState
;
}
void
(
collections
::
<
*,
*>&
,
collections
::
<
*>&
,
<
>
)
{
=
0
;
while
(
currentStateIndex
<
.
())
{
*
=
currentStateIndex
++];
*
=
(
,
currentOldState
,
,
);
<
>
;
(&
,
currentOldState
,
closure
);
FOREACH(ClosureItem, closureItem, closure)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
>&
= ::
vl
::
collections
::
(
closure
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
;
__foreach_iterator__
.
(
closureItem
);)
{
*
=
closureItem
.
(
closureItem
.
()-
1
);
if
(!
closureItem
.
||
oldTransition
->
!=
::
)
{
if
(
oldTransition
->
->
&&
closureItem
.
()>
1
)
{
*
=
(
,
oldTransition
->
,
,
);
*
=
(
currentNewState
,
newEndState
);
FOREACH(Transition*, pathTransition, *closureItem.transitions.Obj())
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
*>&
= ::
vl
::
collections
::
(*
closureItem
.
.
());
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
*
;
__foreach_iterator__
.
(
pathTransition
);)
{
if
(
pathTransition
==
oldTransition
)
break
;
(
transition
->
,
pathTransition
->
,
true
);
}
}
else
{
*
=
(
,
oldTransition
->
,
,
);
*
=
(
currentNewState
,
newEndState
,
oldTransition
);
FOREACH(Transition*, pathTransition, *closureItem.transitions.Obj())
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
*>&
= ::
vl
::
collections
::
(*
closureItem
.
.
());
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
*
;
__foreach_iterator__
.
(
pathTransition
);)
{
(
transition
->
,
pathTransition
->
,
true
);
}
}
}
}
}
}
}
}
}