#include "ParsingAutomaton.h"
namespace
{
namespace
{
using
namespace
collections
;
using
namespace
definitions
;
namespace
{
::
()
:actionType(
)
,actionSource(
0
)
,actionTarget(
0
)
,creatorRule(
0
)
,shiftReduceSource(
0
)
,shiftReduceTarget(
0
)
{
}
::
()
{
}
::
()
:source(
0
)
,target(
0
)
,transitionType(
)
,stackOperationType(
)
,transitionSymbol(
0
)
{
}
::
()
{
}
bool
::
(
*
,
*
,
bool
)
{
if
(
)
{
if
(
->
!=
->
||
->
!=
->
)
{
return
false
;
}
}
if
(
->
.
()!=
->
.
() ||
->
!=
->
||
->
!=
->
)
{
return
false
;
}
for
(
=
0
;
j
<
->
.
();
j
++)
{
<
>
=
->
j
];
<
>
=
->
j
];
if
(
a1
!=
a2
||
a1
!=
a2
||
a1
!=
a2
||
a1
!=
a2
)
{
return
false
;
}
}
return
true
;
}
::
()
:ownerRule(
0
)
,ownerRuleSymbol(
0
)
,grammarNode(
0
)
,stateNode(
0
)
,statePosition(
)
,endState(
false
)
{
}
::
()
{
}
::
()
:rootRuleStartState(
0
)
,rootRuleEndState(
0
)
,startState(
0
)
,stateNameCount(
0
)
{
}
::
()
{
}
::
(
*
)
:symbolManager(
)
{
}
::
()
{
}
void
::
(
definitions
::
ParsingDefinitionRuleDefinition
*
,
<
>
)
{
.
(
);
.
(
);
.
(
,
);
}
*
::
(
definitions
::
ParsingDefinitionRuleDefinition
*
)
{
*
=
new
;
.
(
state
);
state
->
=
;
state
->
=
->
()->
(
->
);
state
->
=
->
+
L".Start"
;
state
->
=
L"@ <"
+
->
+
L">"
;
return
state
;
}
*
::
(
definitions
::
ParsingDefinitionRuleDefinition
*
)
{
*
=
new
;
.
(
state
);
state
->
=
;
state
->
=
->
()->
(
->
);
state
->
=
->
+
L".RootStart"
;
state
->
=
L"@ $<"
+
->
+
L">"
;
return
state
;
}
*
::
(
definitions
::
ParsingDefinitionRuleDefinition
*
)
{
*
=
new
;
.
(
state
);
state
->
=
;
state
->
=
->
()->
(
->
);
state
->
=
->
+
L".RootEnd"
;
state
->
=
L"$<"
+
->
+
L"> @"
;
return
state
;
}
*
::
(
definitions
::
ParsingDefinitionRuleDefinition
*
,
definitions
::
*
,
definitions
::
*
)
{
*
=
new
;
.
(
state
);
state
->
=
;
state
->
=
->
()->
(
->
);
state
->
=
;
state
->
=
;
state
->
=
::
;
state
->
=
->
+
L"."
+
(++
]
);
=
FindAppropriateGrammarState
(
,
,
true
);
state
->
=
L"<"
+
->
+
L">: "
+
(
,
,
true
);
return
state
;
}
*
::
(
definitions
::
ParsingDefinitionRuleDefinition
*
,
definitions
::
*
,
definitions
::
*
)
{
*
=
new
;
.
(
state
);
state
->
=
;
state
->
=
->
()->
(
->
);
state
->
=
;
state
->
=
;
state
->
=
::
;
state
->
=
->
+
L"."
+
(++
]
);
=
FindAppropriateGrammarState
(
,
,
false
);
state
->
=
L"<"
+
->
+
L">: "
+
(
,
,
false
);
return
state
;
}
*
::
(
*
)
{
*
=
0
;
if
(
->
==
::
)
{
resultState
=
(
->
,
->
,
->
);
}
else
{
resultState
=
(
->
,
->
,
->
);
}
resultState
->
=
->
;
return
resultState
;
}
*
::
(
*
,
*
)
{
*
=
new
;
.
(
transition
);
->
.
(
transition
);
->
.
(
transition
);
transition
->
=
;
transition
->
=
;
return
transition
;
}
*
::
(
*
,
*
)
{
*
=
(
,
);
transition
->
=
::
;
return
transition
;
}
*
::
(
*
,
*
)
{
*
=
(
,
);
transition
->
=
::
;
return
transition
;
}
*
::
(
*
,
*
)
{
*
=
(
,
);
transition
->
=
::
;
return
transition
;
}
*
::
(
*
,
*
)
{
*
=
(
,
);
transition
->
=
::
;
return
transition
;
}
*
::
(
*
,
*
)
{
*
=
(
,
);
transition
->
=
::
;
return
transition
;
}
*
::
(
*
,
*
,
*
)
{
*
=
(
,
);
transition
->
=
::
;
transition
->
=
;
return
transition
;
}
*
::
(
*
,
*
,
*
)
{
*
=
(
,
);
transition
->
=
->
;
transition
->
=
->
;
transition
->
=
->
;
return
transition
;
}
void
::
(
*
)
{
->
->
.
(
);
->
->
.
(
);
.
(
);
}
void
::
(
*
)
{
while
(
->
.
())
{
(
->
0
]);
}
while
(
->
.
())
{
(
->
0
]);
}
.
(
);
}
}
}
}