#include "Parsing.h"
#include "ParsingAutomaton.h"
namespace
{
namespace
{
namespace
{
using
namespace
definitions
;
using
namespace
analyzing
;
using
namespace
collections
;
using
namespace
regex
;
::
(
<
>
)
:table(
)
{
}
::
()
{
}
<
>
::
()
{
return
;
}
void
::
()
{
}
bool
::
(
&
,
ParsingTransitionProcessor
&
,
collections
::
<
<
>>&
)
{
();
.
();
for
(
=
0
;
i
<
.
().
();
i
++)
{
const
*
=&
.
().
(
i
);
if
(
token
->
==-
1
|| !
token
->
)
{
.
(
new
(
token
,
L"Unrecognizable token: \""
+
(
token
->
,
token
->
)+
L"\"."
));
}
}
while
(
true
)
{
::
=
(
,
);
if
(!
result
)
{
const
*
=
.
(
.
());
.
(
new
(
token
,
L"Internal error when parsing."
));
return
false
;
}
else
if
(
result
.
==
::
::
)
{
if
(
.
GetCurrentTableTokenIndex
()==
::
)
{
const
*
=
.
(
.
());
.
(
new
(
token
,
L"Failed to recover error when reaching the end of the input."
));
return
false
;
}
else
{
.
();
continue
;
}
}
else
if
(!
.
(
result
))
{
const
*
=
.
(
.
());
.
(
new
(
token
,
L"Internal error when building the parsing tree."
));
return
false
;
}
if
(
result
.
==
::
&& !
.
GetProcessingAmbiguityBranch
())
{
break
;
}
}
return
true
;
}
<
>
::
(
&
,
collections
::
<
<
>>&
)
{
;
(
,
builder
,
);
<
>
=
builder
.
();
if
(!
node
)
{
.
(
new
(
L"Internal error when building the parsing tree after a succeeded parsing process."
));
return
0
;
}
return
node
;
}
<
>
::
(
const
&
,
const
&
,
collections
::
<
<
>>&
,
)
{
(
,
,
);
if
(
state
.
(
)==-
1
)
{
.
(
new
(
L"Rule \""
+
+
L"\" does not exist."
));
return
0
;
}
return
(
state
,
);
}
bool
::
()
{
return
false
;
}
void
::
()
{
}
::
::
(
&
,
,
collections
::
<
<
>>&
)
{
const
*
=
.
(
.
());
.
(
new
(
token
, (
token
==
0
?
L"Error happened during parsing when reaching the end of the input."
:
L"Error happened during parsing."
)));
return
::
();
}
::
(
<
>
)
:
(
)
{
}
::
()
{
}
::
::
(
&
,
collections
::
<
<
>>&
)
{
::
;
if
(
())
{
result
(
, -
1
,
);
}
else
{
result
.
();
if
(
result
)
{
();
}
else
{
=
.
GetCurrentTableTokenIndex
();
if
(
currentTokenIndex
!= -
1
)
{
result
(
,
currentTokenIndex
,
);
}
}
}
return
result
;
}
::
&
::
(
)
{
return
];
}
::
&
::
(
,
)
{
*
=
0
;
if
(
>=
.
())
{
CHECK_ERROR(index == recoverFutures.Count(), L"ParsingAutoRecoverParser::CreateRecoverFuture(vint, vint)#Wrong argument: index.");
do
{
if
(!(
==
.
()))
throw
(
L"ParsingAutoRecoverParser::CreateRecoverFuture(vint, vint)#Wrong argument: index."
);}
while
(
0
);
;
recoverFuture
.
=
new
::
;
=
.
(
recoverFuture
);
}
rf
= &
(
);
rf
->
=
;
rf
->
=
;
return
*
rf
;
}
bool
::
()
{
return
!= -
1
;
}
void
::
()
{
= -
1
;
}
::
::
(
&
,
,
collections
::
<
<
>>&
)
{
if
(
==-
1
)
{
<
>
;
prioritizedTokens
.
(
::
);
(
prioritizedTokens
,
<
>(
::
,
() -
::
)
);
prioritizedTokens
.
(
::
);
prioritizedTokens
.
(
::
);
prioritizedTokens
.
(
);
prioritizedTokens
.
(
0
,
);
=-
1
;
=
0
;
while
(
processingFutureIndex
<
usedFutureCount
)
{
;
if
(
processingFutureIndex
!=-
1
)
{
previous
(
processingFutureIndex
);
}
processingFutureIndex
++;
if
(
previous
.
&&
previous
.
->
==-
1
)
continue
;
FOREACH(vint, currentTableTokenIndex, prioritizedTokens)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
>&
= ::
vl
::
collections
::
(
prioritizedTokens
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
;
__foreach_iterator__
.
(
currentTableTokenIndex
);)
{
=
previous
.
;
if
(
currentTableTokenIndex
!=
::
&&
currentTableTokenIndex
!=
::
)
{
newInsertedTokenCount
++;
}
if
(
currentTableTokenIndex
!=
&&
newInsertedTokenCount
>
)
{
continue
;
}
&
=
(
usedFutureCount
,
previous
.
);
now
.
=
newInsertedTokenCount
;
if
(
.
(
currentTableTokenIndex
,
previous
.
,
now
.
,
0
))
{
if
(
currentTableTokenIndex
==
)
{
if
(
previous
.
)
{
=
previous
.
;
*
= &
(
previous
.
);
while
(
rf
->
->
)
{
*
= &
(
rf
->
);
prf
->
=
rf
->
;
prf
->
->
=
rf
->
;
rf
=
prf
;
}
=
rf
->
;
}
else
{
=
0
;
}
goto
FOUND_ERROR_RECOVER_SOLUTION;
}
else
{
usedFutureCount
++;
}
}
}
}
}
FOUND_ERROR_RECOVER_SOLUTION:
*
=
0
;
if
(
!= -
1
)
{
rf
= &
(
);
if
(
rf
->
->
)
{
=
rf
->
;
}
else
{
= -
1
;
}
}
if
(
rf
)
{
return
.
(
rf
->
->
,
0
);
}
else
{
return
::
(
::
::
);
}
}
::
(
<
>
,
)
:
(
)
, recoveringFutureIndex(-
1
)
, maxInsertedTokenCount(
== -
1
?
4
:
)
{
}
::
~
ParsingAutoRecoverParser
()
{
FOREACH(RecoverFuture, future, recoverFutures)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
;
__foreach_iterator__
.
(
future
);)
{
delete
future
.
;
}
}
void
::
()
{
= -
1
;
::
();
}
::
(
<
>
)
:
(
)
,consumedDecisionCount(
0
)
{
}
::
()
{
}
void
::
(
&
,
,
collections
::
<
::
*>&
,
&
,
&
,
collections
::
<
<
>>&
)
{
=
;
}
::
GetResolvableFutureLevels
(
collections
::
<
::
*>&
,
,
)
{
if
(
-
<
2
)
{
return
1
;
}
<
::
*>
;
for
(
=
;
i
<
;
i
++)
{
resolvingFutures
.
(
i
]);
}
=
0
;
while
(
true
)
{
for
(
=
0
;
i
<
resolvingFutures
.
()-
1
;
i
++)
{
::
*
=
resolvingFutures
i
];
::
*
=
resolvingFutures
i
+
1
];
if
(
first
->
!=
second
->
||
first
->
!=
second
->
||
first
->
.
()!=
second
->
.
()
)
{
return
level
;
}
else
{
for
(
=
0
;
j
<
first
->
.
();
j
++)
{
if
(
first
->
j
]!=
second
->
j
])
{
return
level
;
}
}
}
}
level
++;
for
(
=
0
;
i
<
resolvingFutures
.
();
i
++)
{
if
(!(
resolvingFutures
i
]=
resolvingFutures
i
]->
))
{
return
level
;
}
}
}
}
::
(
&
,
collections
::
<
::
*>&
,
&
,
&
,
collections
::
<
<
>>&
)
{
.
(
.
());
=
0
;
=
1
;
=
0
;
bool
=
false
;
while
(
true
)
{
<
::
*>
;
=
previousBegin
;
=
previousEnd
;
while
(
processEnd
>
processBegin
)
{
if
(
.
(
,
processBegin
,
processEnd
-
processBegin
,
))
{
(
consumedTokenFutures
,
(
)
.Skip(
processEnd
)
.Take(
.
() -
processEnd
),
true
);
.
(
processEnd
,
.
() -
processEnd
);
}
.
ExploreLeftRecursiveReduce
(
,
processBegin
,
processEnd
-
processBegin
,
);
.
(
,
processBegin
,
processEnd
-
processBegin
,
);
processBegin
=
processEnd
;
processEnd
=
.
();
}
if
(
consumedTokenFutures
.
() ==
0
)
{
=
.
GetCurrentTableTokenIndex
();
(
,
tokenIndex
,
,
previousBegin
,
previousEnd
,
);
if
(
previousBegin
==
previousEnd
)
{
break
;
}
}
else
{
.
();
previousBegin
=
.
();
(
,
consumedTokenFutures
,
true
);
previousEnd
=
.
();
resolvableFutureLevels
=
GetResolvableFutureLevels
(
,
previousBegin
,
previousEnd
);
if
(
resolvableFutureLevels
!=
0
)
{
break
;
}
}
}
=
previousBegin
;
=
previousEnd
;
return
resolvableFutureLevels
;
}
::
(
collections
::
<
::
*>&
)
{
=-
1
;
for
(
=
0
;
i
<
.
()-
1
;
i
++)
{
=
0
;
::
*
=
i
];
::
*
=
i
+
1
];
=
first
->
->
.
();
=
second
->
->
.
();
while
(--
firstIndex
>=
0
&& --
secondIndex
>=
0
)
{
::
*
=&
first
->
->
firstIndex
];
::
*
=&
second
->
->
secondIndex
];
if
(
firstIns
&&
secondIns
)
{
if
(
firstIns
->
==
secondIns
->
&&
firstIns
->
==
secondIns
->
&&
firstIns
->
==
secondIns
->
&&
firstIns
->
==
secondIns
->
)
{
if
(
firstIns
->
==
::
::
||
firstIns
->
==
::
::
)
{
count
++;
}
continue
;
}
}
break
;
}
if
(
conflictReduceCount
==-
1
||
conflictReduceCount
>
count
)
{
conflictReduceCount
=
count
;
}
}
if
(
conflictReduceCount
==-
1
)
{
conflictReduceCount
=
0
;
}
return
conflictReduceCount
;
}
void
::
(
collections
::
<
::
*>&
,
,
collections
::
<
>&
)
{
.
(
.
());
for
(
=
0
;
i
<
.
();
i
++)
{
::
*
=
i
];
=
future
->
->
.
();
=
0
;
while
(
count
<
&&
index
>
0
)
{
switch
(
future
->
->
--
index
].
)
{
case
::
::
:
case
::
::
:
count
++;
break
;
default
:;
}
}
i
]=
index
;
}
}
::
GetAffectedStackNodeCount
(
collections
::
<
::
*>&
,
collections
::
<
>&
)
{
=-
1
;
for
(
=
0
;
i
<
.
();
i
++)
{
::
*
=
i
];
=
1
;
while
(
future
&&
future
->
)
{
=(
future
==
i
]?
i
]:
future
->
->
.
())-
1
;
for
(
=
start
;
j
>=
0
;
j
--)
{
switch
(
future
->
->
j
].
)
{
case
::
::
:
count
++;
break
;
case
::
::
:
count
--;
break
;
default
:;
}
}
future
=
future
->
;
}
if
(
affectedStackNodeCount
==-
1
)
{
affectedStackNodeCount
=
count
;
}
else
if
(
affectedStackNodeCount
!=
count
)
{
return
-
1
;
}
}
return
affectedStackNodeCount
;
}
void
::
(
&
,
::
*
,
lastAvailableInstructionCount
)
{
<
<
::
*,
regex
::
*>>
;
while
(
&&
->
!=-
1
)
{
path
.
(
<
::
*,
regex
::
*>(
->
,
->
));
=
->
;
}
for
(
=
path
.
() -
1
;
j
>=
0
;
j
--)
{
if
(
j
==
0
&&
lastAvailableInstructionCount
!=-
1
)
{
.
(
.
(
path
j
].
,
path
j
].
,
0
,
lastAvailableInstructionCount
,
false
));
}
else
{
.
(
.
(
path
j
].
,
path
j
].
));
}
}
}
void
::
(
&
,
collections
::
<
::
*>&
,
,
,
,
collections
::
<
<
>>&
)
{
<
::
*>
;
(
resolvingFutures
,
(
)
.Skip(
)
.Take(
-
)
);
for
(
=
1
;
i
<
;
i
++)
{
for
(
=
0
;
j
<
resolvingFutures
.
();
j
++)
{
resolvingFutures
j
] =
resolvingFutures
j
]->
;
}
}
<
>
;
=
(
resolvingFutures
);
(
resolvingFutures
,
conflictReduceCount
,
conflictReduceIndices
);
,
;
if
(
resolvingFutures
0
]->
->
.
()==
conflictReduceIndices
0
])
{
=
.
();
ambiguityNodeType
.
()
(
rootStartState
).
;
ambiguityRuleName
.
();
}
else
{
::
&
=
resolvingFutures
0
]->
->
conflictReduceIndices
0
]];
ambiguityNodeType
.
()
(
ins
.
).
;
ambiguityRuleName
.
()
(
ins
.
).
;
}
if
(
ambiguityNodeType
==
L""
)
{
const
*
=
.
(
.
());
.
(
new
(
token
,
L"Ambiguity happens when reducing rule \""
+
ambiguityRuleName
+
L"\" but this rule does not have an associated ambiguous node type."
));
return
;
}
=
GetAffectedStackNodeCount
(
resolvingFutures
,
conflictReduceIndices
);
if
(
affectedStackNodeCount
==-
1
)
{
const
*
=
.
(
.
());
.
(
new
(
token
, (
token
==
0
?
L"Failed to pass ambiguity checking during parsing when reaching to the end of the input."
:
L"Failed to pass ambiguity checking during parsing."
)));
return
;
}
<
::
>
;
for
(
=
0
;
i
<
resolvingFutures
.
();
i
++)
{
if
(
stateGroup
)
{
.
(
stateGroup
);
}
else
{
stateGroup
.
();
}
{
::
(
i
==
0
?
::
::
:
::
::
);
if
(
i
==
0
)
{
result
.
ambiguityAffectedStackNodeCount
=
affectedStackNodeCount
;
}
.
(
result
);
}
{
(
,
resolvingFutures
i
],
conflictReduceIndices
i
]);
if
(
i
==
resolvingFutures
.
()-
1
)
{
::
(
::
::
);
result
.
ambiguityNodeType
;
.
(
result
);
=
conflictReduceIndices
i
];
::
=
.
()-
2
];
.
(
.
(
lastDecision
.
,
lastDecision
.
,
start
,
lastDecision
.
->
.
()-
start
,
true
));
}
}
}
::
*
=
-
1
];
::
**
=&
lastFuture
;
for
(
int
=
1
;
i
<
;
i
++)
{
futureCleaner
=&(*
futureCleaner
)->
;
}
*
futureCleaner
=
0
;
if
(
lastFuture
)
{
(
,
lastFuture
, -
1
);
}
}
void
::
(
&
,
collections
::
<
::
*>&
,
,
,
,
collections
::
<
<
>>&
)
{
if
(
-
==
0
)
{
const
*
=
.
(
.
());
.
(
new
(
token
, (
token
==
0
?
L"Error happened during parsing when reaching to the end of the input."
:
L"Error happened during parsing."
)));
}
else
if
(
-
==
1
)
{
(
,
], -
1
);
}
else
{
(
,
,
,
,
,
);
}
}
::
::
(
&
,
collections
::
<
<
>>&
)
{
if
(
.
()==
)
{
<
::
*>
;
=
0
;
=
0
;
=
(
,
futures
,
resultBegin
,
resultEnd
,
);
(
,
futures
,
resultBegin
,
resultEnd
,
resolvableFutureLevels
,
);
FOREACH(ParsingState::Future*, future, futures)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
::
*>&
= ::
vl
::
collections
::
(
futures
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
::
*
;
__foreach_iterator__
.
(
future
);)
{
delete
future
;
}
}
if
(
.
()>
)
{
::
=
++];
if
(
==
.
())
{
.
();
=
0
;
}
return
result
;
}
else
{
return
::
();
}
}
void
::
()
{
.
();
=
0
;
::
();
}
void
ParsingAutoRecoverAmbiguousParser
::
(
&
,
,
collections
::
<
::
*>&
,
&
,
&
,
collections
::
<
<
>>&
)
{
=
0
;
while
(
insertedTokenCount
++ <
)
{
<
::
*>
;
=
;
=
;
while
(
processEnd
>
processBegin
)
{
for
(
=
processBegin
;
i
<
processEnd
;
i
++)
{
.
(
::
,
i
],
);
for
(
=
::
;
token
<
.
()
();
token
++)
{
.
(
token
,
i
],
);
}
}
if
(
.
() >
processEnd
)
{
(
consumedTokenFutures
,
(
)
.Skip(
processEnd
)
.Take(
.
() -
processEnd
),
true
);
.
(
processEnd
,
.
() -
processEnd
);
}
.
ExploreLeftRecursiveReduce
(
,
processBegin
,
processEnd
-
processBegin
,
);
.
(
,
processBegin
,
processEnd
-
processBegin
,
);
processBegin
=
processEnd
;
processEnd
=
.
();
}
if
(
consumedTokenFutures
.
() ==
0
)
{
goto
ERROR_RECOVERY_FAILED;
}
else
{
<
::
*>
;
FOREACH(ParsingState::Future*, future, consumedTokenFutures)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
::
*>&
= ::
vl
::
collections
::
(
consumedTokenFutures
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
::
*
;
__foreach_iterator__
.
(
future
);)
{
if
(
future
->
==
)
{
recoveryFutures
.
(
future
->
);
}
}
if
(
recoveryFutures
.
()>
0
)
{
FOREACH(ParsingState::Future*, future, recoveryFutures)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
::
*>&
= ::
vl
::
collections
::
(
recoveryFutures
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
::
*
;
__foreach_iterator__
.
(
future
);)
{
.
(
future
);
.
(
future
);
}
=
.
() -
recoveryFutures
.
();
=
.
();
FOREACH(ParsingState::Future*, future, consumedTokenFutures)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
::
*>&
= ::
vl
::
collections
::
(
consumedTokenFutures
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
::
*
;
__foreach_iterator__
.
(
future
);)
{
delete
future
;
}
goto
ERROR_RECOVERY_SUCCEEDED;
}
else
{
=
.
();
(
,
consumedTokenFutures
,
true
);
=
.
();
}
}
}
ERROR_RECOVERY_FAILED:
=
=
.
();
return
;
ERROR_RECOVERY_SUCCEEDED:
return
;
}
ParsingAutoRecoverAmbiguousParser
::
ParsingAutoRecoverAmbiguousParser
(
<
>
,
)
:
(
)
, maxInsertedTokenCount(
== -
1
?
4
:
)
{
}
ParsingAutoRecoverAmbiguousParser
::
~
ParsingAutoRecoverAmbiguousParser
()
{
}
<
>
(
<
>
)
{
if
(
)
{
if
(
())
{
return
new
(
);
}
else
{
return
new
(
);
}
}
else
{
return
0
;
}
}
<
>
(
<
>
)
{
if
(
)
{
if
(
())
{
return
new
ParsingAutoRecoverAmbiguousParser
(
);
}
else
{
return
new
(
);
}
}
else
{
return
0
;
}
}
<
>
CreateBootstrapStrictParser
()
{
<
<
>>
;
<
>
=
();
<
>
=
(
definition
,
false
,
errors
);
return
(
table
);
}
<
>
CreateBootstrapAutoRecoverParser
()
{
<
<
>>
;
<
>
=
();
<
>
=
(
definition
,
false
,
errors
);
return
(
table
);
}
}
}
}
#ifndef VCZH_DEBUG_NO_REFLECTION
namespace
{
namespace
{
namespace
{
using
namespace
parsing
;
PARSINGREFLECTION_TYPELIST(IMPL_VL_TYPE_INFO)
const
<
parsing
::
>::
= {
L"parsing::ParsingTextPos"
,
nullptr
,
::
};
const
<
parsing
::
>:: = {
L"parsing::ParsingTextRange"
,
nullptr
,
::
};
const
<
parsing
::
>::
= {
L"parsing::ParsingTreeNode"
,
nullptr
,
::
};
const
<
parsing
::
>::
= {
L"parsing::ParsingTreeToken"
,
nullptr
,
::
};
const
<
parsing
::
>::
= {
L"parsing::ParsingTreeObject"
,
nullptr
,
::
};
const
<
parsing
::
>::
= {
L"parsing::ParsingTreeArray"
,
nullptr
,
::
};
const
<
parsing
::
>::
= {
L"parsing::ParsingTreeCustomBase"
,
nullptr
,
::
};
const
<
parsing
::
>::
= {
L"parsing::ParsingToken"
,
nullptr
,
::
};
const
<
parsing
::
>::
= {
L"parsing::ParsingError"
,
nullptr
,
::
};
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
#define _ ,
BEGIN_STRUCT_MEMBER(ParsingTextPos)
template
<>
struct
CustomTypeDescriptorSelector
<
> {
public
:
class
:
public
<
,
::
> {
typedef
;
protected
:
void
()
override
{
STRUCT_MEMBER(index)
.
(
L"index"
,
new
<
decltype
(((
*)
0
)->
)>(
this
, &
::
,
L"index"
));
STRUCT_MEMBER(row)
.
(
L"row"
,
new
<
decltype
(((
*)
0
)->
)>(
this
, &
::
,
L"row"
));
STRUCT_MEMBER(column)
.
(
L"column"
,
new
<
decltype
(((
*)
0
)->
)>(
this
, &
::
,
L"column"
));
END_STRUCT_MEMBER(ParsingTextPos)
} }; };
BEGIN_STRUCT_MEMBER(ParsingTextRange)
template
<>
struct
<
> {
public
:
class
:
public
<
,
::
> {
typedef
;
protected
:
void
()
override
{
STRUCT_MEMBER(start)
.
(
L"start"
,
new
<
decltype
(((
*)
0
)->
)>(
this
, &
::
,
L"start"
));
STRUCT_MEMBER(end)
.
(
L"end"
,
new
<
decltype
(((
*)
0
)->
)>(
this
, &
::
,
L"end"
));
END_STRUCT_MEMBER(ParsingTextRange)
} }; };
BEGIN_CLASS_MEMBER(ParsingTreeNode)
template
<>
struct
CustomTypeDescriptorSelector
<
> {
public
:
class
:
public
{
typedef
;
static
const
=
::
;
public
:
() :
(
, &
<
>::
) {
<
>::
SetAssociatedTypeDescriptor
(
this
); }
~
CustomTypeDescriptorImpl
() {
<
>::
SetAssociatedTypeDescriptor
(
0
); }
protected
:
bool
()
override
{
return
<
typename
<
,
<
>>::
>::
; }
void
()
override
{
CLASS_MEMBER_PROPERTY_FAST(CodeRange)
{
const
wchar_t
*
[]={
L""
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"GetCodeRange"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); } {
const
wchar_t
*
[]={
L"value"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"SetCodeRange"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
(
new
(
this
,
L"CodeRange"
,
dynamic_cast
<
*>(
(
L"GetCodeRange"
,
true
)->GetMethod(
0
)),
dynamic_cast
<
*>(
(
L"SetCodeRange"
,
true
)->GetMethod(
0
)),
nullptr
) );
CLASS_MEMBER_PROPERTY_READONLY_FAST(Parent)
{
const
wchar_t
*
[]={
L""
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"GetParent"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
(
new
(
this
,
L"Parent"
,
dynamic_cast
<
*>(
(
L"GetParent"
,
true
)->GetMethod(
0
)),
nullptr
,
nullptr
) );
CLASS_MEMBER_PROPERTY_READONLY_FAST(SubNodes)
{
const
wchar_t
*
[]={
L""
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"GetSubNodes"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
(
new
(
this
,
L"SubNodes"
,
dynamic_cast
<
*>(
(
L"GetSubNodes"
,
true
)->GetMethod(
0
)),
nullptr
,
nullptr
) );
CLASS_MEMBER_METHOD(Clone, NO_PARAMETER)
{
const
wchar_t
*
[]={
L""
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"Clone"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
CLASS_MEMBER_METHOD(InitializeQueryCache, NO_PARAMETER)
{
const
wchar_t
*
[]={
L""
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"InitializeQueryCache"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
CLASS_MEMBER_METHOD(ClearQueryCache, NO_PARAMETER)
{
const
wchar_t
*
[]={
L""
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"ClearQueryCache"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
CLASS_MEMBER_METHOD_OVERLOAD(FindSubNode, {L"position"}, ParsingTreeNode*(ParsingTreeNode::*)(const ParsingTextPos&))
{
const
wchar_t
*
[]={
L"position"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
*(
::*)(
const
&)>::
> (
parameterNames
, (
*(
::*)(
const
&))&
::
,
nullptr
,
nullptr
);
(
L"FindSubNode"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
*(
::*)(
const
&)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
CLASS_MEMBER_METHOD_OVERLOAD(FindSubNode, {L"range"}, ParsingTreeNode*(ParsingTreeNode::*)(const ParsingTextRange&))
{
const
wchar_t
*
[]={
L"range"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
*(
::*)(
const
&)>::
> (
parameterNames
, (
*(
::*)(
const
&))&
::
,
nullptr
,
nullptr
);
(
L"FindSubNode"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
*(
::*)(
const
&)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
CLASS_MEMBER_METHOD_OVERLOAD(FindDeepestNode, {L"position"}, ParsingTreeNode*(ParsingTreeNode::*)(const ParsingTextPos&))
{
const
wchar_t
*
[]={
L"position"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
*(
::*)(
const
&)>::
> (
parameterNames
, (
*(
::*)(
const
&))&
::
,
nullptr
,
nullptr
);
(
L"FindDeepestNode"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
*(
::*)(
const
&)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
CLASS_MEMBER_METHOD_OVERLOAD(FindDeepestNode, {L"range"}, ParsingTreeNode*(ParsingTreeNode::*)(const ParsingTextRange&))
{
const
wchar_t
*
[]={
L"range"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
*(
::*)(
const
&)>::
> (
parameterNames
, (
*(
::*)(
const
&))&
::
,
nullptr
,
nullptr
);
(
L"FindDeepestNode"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
*(
::*)(
const
&)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
END_CLASS_MEMBER(ParsingTreeNode)
if
(
GetBaseTypeDescriptorCount
() ==
0
)
(
description
::
<
>()); } }; };
BEGIN_CLASS_MEMBER(ParsingTreeToken)
template
<>
struct
CustomTypeDescriptorSelector
<
> {
public
:
class
:
public
{
typedef
;
static
const
=
::
;
public
:
() :
(
, &
<
>::
) {
<
>::
SetAssociatedTypeDescriptor
(
this
); }
~
CustomTypeDescriptorImpl
() {
<
>::
SetAssociatedTypeDescriptor
(
0
); }
protected
:
bool
()
override
{
return
<
typename
<
,
<
>>::
>::
; }
void
()
override
{
CLASS_MEMBER_CONSTRUCTOR(Ptr<ParsingTreeToken>(const WString&, vint), {L"value" _ L"tokenIndex"})
{
const
wchar_t
*
[]={
L"value"
,
L"tokenIndex"
};
(
new
CustomConstructorInfoImpl
<
<
>(
const
&,
)>(
parameterNames
)); }
CLASS_MEMBER_PROPERTY_FAST(TokenIndex)
{
const
wchar_t
*
[]={
L""
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"GetTokenIndex"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); } {
const
wchar_t
*
[]={
L"value"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"SetTokenIndex"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
(
new
(
this
,
L"TokenIndex"
,
dynamic_cast
<
*>(
(
L"GetTokenIndex"
,
true
)->GetMethod(
0
)),
dynamic_cast
<
*>(
(
L"SetTokenIndex"
,
true
)->GetMethod(
0
)),
nullptr
) );
CLASS_MEMBER_PROPERTY_FAST(Value)
{
const
wchar_t
*
[]={
L""
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"GetValue"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); } {
const
wchar_t
*
[]={
L"value"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"SetValue"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
(
new
(
this
,
L"Value"
,
dynamic_cast
<
*>(
(
L"GetValue"
,
true
)->GetMethod(
0
)),
dynamic_cast
<
*>(
(
L"SetValue"
,
true
)->GetMethod(
0
)),
nullptr
) );
END_CLASS_MEMBER(ParsingTreeToken)
if
(
GetBaseTypeDescriptorCount
() ==
0
)
(
description
::
<
>()); } }; };
BEGIN_CLASS_MEMBER(ParsingTreeObject)
template
<>
struct
CustomTypeDescriptorSelector
<
> {
public
:
class
:
public
{
typedef
;
static
const
=
::
;
public
:
() :
(
, &
<
>::
) {
<
>::
SetAssociatedTypeDescriptor
(
this
); }
~
CustomTypeDescriptorImpl
() {
<
>::
SetAssociatedTypeDescriptor
(
0
); }
protected
:
bool
()
override
{
return
<
typename
<
,
<
>>::
>::
; }
void
()
override
{
CLASS_MEMBER_CONSTRUCTOR(Ptr<ParsingTreeObject>(const WString&), {L"type"})
{
const
wchar_t
*
[]={
L"type"
};
(
new
CustomConstructorInfoImpl
<
<
>(
const
&)>(
parameterNames
)); }
CLASS_MEMBER_PROPERTY_FAST(Type)
{
const
wchar_t
*
[]={
L""
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"GetType"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); } {
const
wchar_t
*
[]={
L"value"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"SetType"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
(
new
(
this
,
L"Type"
,
dynamic_cast
<
*>(
(
L"GetType"
,
true
)->GetMethod(
0
)),
dynamic_cast
<
*>(
(
L"SetType"
,
true
)->GetMethod(
0
)),
nullptr
) );
CLASS_MEMBER_PROPERTY_READONLY_FAST(Members)
{
const
wchar_t
*
[]={
L""
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"GetMembers"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
(
new
(
this
,
L"Members"
,
dynamic_cast
<
*>(
(
L"GetMembers"
,
true
)->GetMethod(
0
)),
nullptr
,
nullptr
) );
CLASS_MEMBER_PROPERTY_READONLY_FAST(MemberNames)
{
const
wchar_t
*
[]={
L""
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"GetMemberNames"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
(
new
(
this
,
L"MemberNames"
,
dynamic_cast
<
*>(
(
L"GetMemberNames"
,
true
)->GetMethod(
0
)),
nullptr
,
nullptr
) );
CLASS_MEMBER_PROPERTY_READONLY_FAST(CreatorRules)
{
const
wchar_t
*
[]={
L""
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"GetCreatorRules"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
(
new
(
this
,
L"CreatorRules"
,
dynamic_cast
<
*>(
(
L"GetCreatorRules"
,
true
)->GetMethod(
0
)),
nullptr
,
nullptr
) );
CLASS_MEMBER_METHOD(GetMember, {L"name"})
{
const
wchar_t
*
[]={
L"name"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"GetMember"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
CLASS_MEMBER_METHOD(SetMember, {L"name" _ L"node"})
{
const
wchar_t
*
[]={
L"name"
,
L"node"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"SetMember"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
END_CLASS_MEMBER(ParsingTreeObject)
if
(
GetBaseTypeDescriptorCount
() ==
0
)
(
description
::
<
>()); } }; };
BEGIN_CLASS_MEMBER(ParsingTreeArray)
template
<>
struct
CustomTypeDescriptorSelector
<
> {
public
:
class
:
public
{
typedef
;
static
const
=
::
;
public
:
() :
(
, &
<
>::
) {
<
>::
SetAssociatedTypeDescriptor
(
this
); }
~
CustomTypeDescriptorImpl
() {
<
>::
SetAssociatedTypeDescriptor
(
0
); }
protected
:
bool
()
override
{
return
<
typename
<
,
<
>>::
>::
; }
void
()
override
{
CLASS_MEMBER_CONSTRUCTOR(Ptr<ParsingTreeObject>(const WString&), {L"elementType"})
{
const
wchar_t
*
[]={
L"elementType"
};
(
new
CustomConstructorInfoImpl
<
<
>(
const
&)>(
parameterNames
)); }
CLASS_MEMBER_PROPERTY_FAST(ElementType)
{
const
wchar_t
*
[]={
L""
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"GetElementType"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); } {
const
wchar_t
*
[]={
L"value"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"SetElementType"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
(
new
(
this
,
L"ElementType"
,
dynamic_cast
<
*>(
(
L"GetElementType"
,
true
)->GetMethod(
0
)),
dynamic_cast
<
*>(
(
L"SetElementType"
,
true
)->GetMethod(
0
)),
nullptr
) );
CLASS_MEMBER_PROPERTY_READONLY_FAST(Items)
{
const
wchar_t
*
[]={
L""
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"GetItems"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
(
new
(
this
,
L"Items"
,
dynamic_cast
<
*>(
(
L"GetItems"
,
true
)->GetMethod(
0
)),
nullptr
,
nullptr
) );
CLASS_MEMBER_METHOD(GetItem, {L"index"})
{
const
wchar_t
*
[]={
L"index"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"GetItem"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
CLASS_MEMBER_METHOD(SetItem, {L"index" _ L"node"})
{
const
wchar_t
*
[]={
L"index"
,
L"node"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"SetItem"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
CLASS_MEMBER_METHOD(AddItem, {L"node"})
{
const
wchar_t
*
[]={
L"node"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"AddItem"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
CLASS_MEMBER_METHOD(InsertItem, {L"index" _ L"node"})
{
const
wchar_t
*
[]={
L"index"
,
L"node"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"InsertItem"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
CLASS_MEMBER_METHOD_OVERLOAD(RemoveItem, {L"index"}, bool(ParsingTreeArray::*)(vint))
{
const
wchar_t
*
[]={
L"index"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
bool
(
::*)(
)>::
> (
parameterNames
, (
bool
(
::*)(
))&
::
,
nullptr
,
nullptr
);
(
L"RemoveItem"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
bool
(
::*)(
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
CLASS_MEMBER_METHOD_OVERLOAD(RemoveItem, {L"node"}, bool(ParsingTreeArray::*)(ParsingTreeNode*))
{
const
wchar_t
*
[]={
L"node"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
bool
(
::*)(
*)>::
> (
parameterNames
, (
bool
(
::*)(
*))&
::
,
nullptr
,
nullptr
);
(
L"RemoveItem"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
bool
(
::*)(
*)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
CLASS_MEMBER_METHOD(IndexOfItem, {L"node"})
{
const
wchar_t
*
[]={
L"node"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"IndexOfItem"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
CLASS_MEMBER_METHOD(ContainsItem, {L"node"})
{
const
wchar_t
*
[]={
L"node"
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"ContainsItem"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
CLASS_MEMBER_METHOD(Clone, NO_PARAMETER)
{
const
wchar_t
*
[]={
L""
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
nullptr
,
nullptr
);
(
L"Clone"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
CLASS_MEMBER_METHOD_RENAME(GetCount, Count, NO_PARAMETER)
{
const
wchar_t
*
[]={
L""
};
auto
=
new
<
,
vl
::
function_lambda
::
<
decltype
(&
::
)>::
> (
parameterNames
, (
decltype
(&
::
))&
::
,
L"$This->"
L"Count"
L"($Arguments)"
,
L"::vl::Func<$Func>($This, &$Type::"
L"Count"
L")"
);
(
L"GetCount"
,
methodInfo
);
MethodPointerBinaryDataRetriver
<
decltype
(&
::
)>
(&
::
);
MethodPointerBinaryDataRecorder
<
,
>::
(
binaryDataRetriver
.
(),
this
,
methodInfo
); }
CLASS_MEMBER_PROPERTY_READONLY(Count, GetCount)
(
new
(
this
,
L"Count"
,
dynamic_cast
<
*>(
(
L"GetCount"
,
true
)->GetMethod(
0
)),
nullptr
,
nullptr
) );
END_CLASS_MEMBER(ParsingTreeArray)
if
(
GetBaseTypeDescriptorCount
() ==
0
)
(
description
::
<
>()); } }; };
BEGIN_CLASS_MEMBER(ParsingTreeCustomBase)
template
<>
struct
CustomTypeDescriptorSelector
<
> {
public
:
class
:
public
{
typedef
;
static
const
=
::
;
public
:
() :
(
, &
<
>::
) {
<
>::
SetAssociatedTypeDescriptor
(
this
); }
~
CustomTypeDescriptorImpl
() {
<
>::
SetAssociatedTypeDescriptor
(
0
); }
protected
:
bool
()
override
{
return
<
typename
<
,
<
>>::
>::
; }
void
()
override
{
CLASS_MEMBER_FIELD(codeRange)
(
new
<
,
decltype
(((
*)
0
)->
) >(
this
,
L"codeRange"
, &
::
) );
CLASS_MEMBER_FIELD(creatorRules)
(
new
<
,
decltype
(((
*)
0
)->
) >(
this
,
L"creatorRules"
, &
::
) );
END_CLASS_MEMBER(ParsingTreeCustomBase)
if
(
GetBaseTypeDescriptorCount
() ==
0
)
(
description
::
<
>()); } }; };
BEGIN_CLASS_MEMBER(ParsingToken)
template
<>
struct
CustomTypeDescriptorSelector
<
> {
public
:
class
:
public
{
typedef
;
static
const
=
::
;
public
:
() :
(
, &
<
>::
) {
<
>::
SetAssociatedTypeDescriptor
(
this
); }
~
CustomTypeDescriptorImpl
() {
<
>::
SetAssociatedTypeDescriptor
(
0
); }
protected
:
bool
()
override
{
return
<
typename
<
,
<
>>::
>::
; }
void
()
override
{
CLASS_MEMBER_BASE(ParsingTreeCustomBase)
CLASS_MEMBER_FIELD(tokenIndex)
(
new
<
,
decltype
(((
*)
0
)->
) >(
this
,
L"tokenIndex"
, &
::
) );
CLASS_MEMBER_FIELD(value)
(
new
<
,
decltype
(((
*)
0
)->
) >(
this
,
L"value"
, &
::
) );
END_CLASS_MEMBER(ParsingToken)
if
(
GetBaseTypeDescriptorCount
() ==
0
)
(
description
::
<
>()); } }; };
BEGIN_CLASS_MEMBER(ParsingError)
template
<>
struct
CustomTypeDescriptorSelector
<
> {
public
:
class
:
public
{
typedef
;
static
const
=
::
;
public
:
() :
(
, &
<
>::
) {
<
>::
SetAssociatedTypeDescriptor
(
this
); }
~
CustomTypeDescriptorImpl
() {
<
>::
SetAssociatedTypeDescriptor
(
0
); }
protected
:
bool
()
override
{
return
<
typename
<
,
<
>>::
>::
; }
void
()
override
{
CLASS_MEMBER_CONSTRUCTOR(Ptr<ParsingError>(), NO_PARAMETER)
{
const
wchar_t
*
[]={
L""
};
(
new
CustomConstructorInfoImpl
<
<
>()>(
parameterNames
)); }
CLASS_MEMBER_CONSTRUCTOR(Ptr<ParsingError>(const WString&), {L"errorMessage"})
{
const
wchar_t
*
[]={
L"errorMessage"
};
(
new
CustomConstructorInfoImpl
<
<
>(
const
&)>(
parameterNames
)); }
CLASS_MEMBER_CONSTRUCTOR(Ptr<ParsingError>(ParsingTreeCustomBase*, const WString&), {L"parsingTree" _ L"errorMessage"})
{
const
wchar_t
*
[]={
L"parsingTree"
,
L"errorMessage"
};
(
new
CustomConstructorInfoImpl
<
<
>(
*,
const
&)>(
parameterNames
)); }
CLASS_MEMBER_FIELD(codeRange)
(
new
<
,
decltype
(((
*)
0
)->
) >(
this
,
L"codeRange"
, &
::
) );
CLASS_MEMBER_FIELD(parsingTree)
(
new
<
,
decltype
(((
*)
0
)->
) >(
this
,
L"parsingTree"
, &
::
) );
CLASS_MEMBER_FIELD(errorMessage)
(
new
<
,
decltype
(((
*)
0
)->
) >(
this
,
L"errorMessage"
, &
::
) );
END_CLASS_MEMBER(ParsingError)
if
(
GetBaseTypeDescriptorCount
() ==
0
)
(
description
::
<
>()); } }; };
#undef _
#endif
}
}
}
#endif
namespace
{
namespace
{
namespace
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
class
:
public
,
public
{
public
:
void
(
*
)
{
PARSINGREFLECTION_TYPELIST(ADD_TYPE_INFO)
{
<
>
=
new
CustomTypeDescriptorSelector
<
parsing
::
>::
();
->
(
<
parsing
::
>::
.typeName,
type
); } {
<
>
=
new
CustomTypeDescriptorSelector
<
parsing
::
>::
();
->
(
<
parsing
::
>::
.typeName,
type
); } {
<
>
=
new
CustomTypeDescriptorSelector
<
parsing
::
>::
();
->
(
<
parsing
::
>::
.typeName,
type
); } {
<
>
=
new
CustomTypeDescriptorSelector
<
parsing
::
>::
();
->
(
<
parsing
::
>::
.typeName,
type
); } {
<
>
=
new
CustomTypeDescriptorSelector
<
parsing
::
>::
();
->
(
<
parsing
::
>::
.typeName,
type
); } {
<
>
=
new
CustomTypeDescriptorSelector
<
parsing
::
>::
();
->
(
<
parsing
::
>::
.typeName,
type
); } {
<
>
=
new
CustomTypeDescriptorSelector
<
parsing
::
>::
();
->
(
<
parsing
::
>::
.typeName,
type
); } {
<
>
=
new
CustomTypeDescriptorSelector
<
parsing
::
>::
();
->
(
<
parsing
::
>::
.typeName,
type
); } {
<
>
=
new
CustomTypeDescriptorSelector
<
parsing
::
>::
();
->
(
<
parsing
::
>::
.typeName,
type
); }
}
void
(
*
)
{
}
};
#endif
bool
()
{
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
*
=
();
if
(
manager
)
{
<
>
=
new
;
return
manager
->
(
loader
);
}
#endif
return
false
;
}
}
}
}