#include "ParsingDefinitions.h"
namespace
{
namespace
{
namespace
{
using
namespace
collections
;
<
>
()
{
;
definitionWriter
.
(
(
L"AttributeDef"
)
.Member(
L"name"
,
())
.Attribute(
(
L"Semantic"
).Argument(
L"Attribute"
))
.Member(
L"arguments"
,
().
())
)
.Type(
(
L"DefBase"
)
.Member(
L"attributes"
,
(
L"AttributeDef"
).
())
)
.Type(
(
L"TypeObj"
)
)
.Type(
(
L"PrimitiveTypeObj"
,
(
L"TypeObj"
))
.Member(
L"name"
,
())
.Attribute(
(
L"Semantic"
).Argument(
L"Type"
))
)
.Type(
(
L"TokenTypeObj"
,
(
L"TypeObj"
))
)
.Type(
(
L"SubTypeObj"
,
(
L"TypeObj"
))
.Member(
L"parentType"
,
(
L"TypeObj"
))
.Member(
L"name"
,
())
.Attribute(
(
L"Semantic"
).Argument(
L"Type"
))
)
.Type(
(
L"ArrayTypeObj"
,
(
L"TypeObj"
))
.Member(
L"elementType"
,
(
L"TypeObj"
))
)
.Type(
(
L"TypeDef"
,
(
L"DefBase"
))
.Member(
L"name"
,
())
.Attribute(
(
L"Color"
).Argument(
L"Type"
))
)
.Type(
(
L"ClassMemberDef"
,
(
L"DefBase"
))
.Member(
L"type"
,
(
L"TypeObj"
))
.Member(
L"name"
,
())
.Member(
L"unescapingFunction"
,
())
)
.Type(
(
L"ClassTypeDef"
,
(
L"TypeDef"
))
.Member(
L"ambiguousType"
,
(
L"TypeObj"
))
.Member(
L"parentType"
,
(
L"TypeObj"
))
.Member(
L"members"
,
(
L"ClassMemberDef"
).
())
.Member(
L"subTypes"
,
(
L"TypeDef"
).
())
)
.Type(
(
L"EnumMemberDef"
,
(
L"DefBase"
))
.Member(
L"name"
,
())
)
.Type(
(
L"EnumTypeDef"
,
(
L"TypeDef"
))
.Member(
L"members"
,
(
L"EnumMemberDef"
).
())
)
.Type(
(
L"GrammarDef"
)
)
.Type(
(
L"PrimitiveGrammarDef"
,
(
L"GrammarDef"
))
.Member(
L"name"
,
())
.Attribute(
(
L"Semantic"
).Argument(
L"Token"
).Argument(
L"Rule"
))
)
.Type(
(
L"TextGrammarDef"
,
(
L"GrammarDef"
))
.Member(
L"text"
,
())
.Attribute(
(
L"Semantic"
).Argument(
L"Literal"
))
)
.Type(
(
L"SequenceGrammarDef"
,
(
L"GrammarDef"
))
.Member(
L"first"
,
(
L"GrammarDef"
))
.Member(
L"second"
,
(
L"GrammarDef"
))
)
.Type(
(
L"AlternativeGrammarDef"
,
(
L"GrammarDef"
))
.Member(
L"first"
,
(
L"GrammarDef"
))
.Member(
L"second"
,
(
L"GrammarDef"
))
)
.Type(
(
L"LoopGrammarDef"
,
(
L"GrammarDef"
))
.Member(
L"grammar"
,
(
L"GrammarDef"
))
)
.Type(
(
L"OptionalGrammarDef"
,
(
L"GrammarDef"
))
.Member(
L"grammar"
,
(
L"GrammarDef"
))
)
.Type(
(
L"CreateGrammarDef"
,
(
L"GrammarDef"
))
.Member(
L"grammar"
,
(
L"GrammarDef"
))
.Member(
L"type"
,
(
L"TypeObj"
))
)
.Type(
(
L"AssignGrammarDef"
,
(
L"GrammarDef"
))
.Member(
L"grammar"
,
(
L"GrammarDef"
))
.Member(
L"memberName"
,
())
.Attribute(
(
L"Semantic"
).Argument(
L"Field"
))
)
.Type(
(
L"UseGrammarDef"
,
(
L"GrammarDef"
))
.Member(
L"grammar"
,
(
L"GrammarDef"
))
)
.Type(
(
L"SetterGrammarDef"
,
(
L"GrammarDef"
))
.Member(
L"grammar"
,
(
L"GrammarDef"
))
.Member(
L"memberName"
,
())
.Attribute(
(
L"Semantic"
).Argument(
L"Field"
))
.Member(
L"value"
,
())
.Attribute(
(
L"Semantic"
).Argument(
L"EnumValue"
))
)
.Type(
(
L"TokenDef"
,
(
L"DefBase"
))
.SubType(
(
L"DiscardOption"
)
.Member(
L"DiscardToken"
)
.Member(
L"KeepToken"
)
)
.Member(
L"name"
,
())
.Attribute(
(
L"Color"
).Argument(
L"Token"
))
.Member(
L"regex"
,
())
.Member(
L"discard"
,
(
L"DiscardOption"
))
)
.Type(
(
L"RuleDef"
,
(
L"DefBase"
))
.Member(
L"name"
,
())
.Attribute(
(
L"Color"
).Argument(
L"Rule"
))
.Member(
L"type"
,
(
L"TypeObj"
))
.Member(
L"grammars"
,
(
L"GrammarDef"
).
())
)
.Type(
(
L"ParserDef"
)
.Member(
L"definitions"
,
(
L"DefBase"
).
())
)
.TokenAtt(
L"CLASS"
,
L"class"
)
.Attribute(
(
L"Color"
).Argument(
L"Keyword"
))
.Attribute(
(
L"Candidate"
))
.EndToken()
.TokenAtt(
L"AMBIGUOUS"
,
L"ambiguous"
)
.Attribute(
(
L"Color"
).Argument(
L"Keyword"
))
.Attribute(
(
L"Candidate"
))
.EndToken()
.TokenAtt(
L"ENUM"
,
L"enum"
)
.Attribute(
(
L"Color"
).Argument(
L"Keyword"
))
.Attribute(
(
L"Candidate"
))
.EndToken()
.TokenAtt(
L"TOKEN"
,
L"token"
)
.Attribute(
(
L"Color"
).Argument(
L"Keyword"
))
.Attribute(
(
L"Candidate"
))
.EndToken()
.TokenAtt(
L"DISCARDTOKEN"
,
L"discardtoken"
)
.Attribute(
(
L"Color"
).Argument(
L"Keyword"
))
.Attribute(
(
L"Candidate"
))
.EndToken()
.TokenAtt(
L"RULE"
,
L"rule"
)
.Attribute(
(
L"Color"
).Argument(
L"Keyword"
))
.Attribute(
(
L"Candidate"
))
.EndToken()
.TokenAtt(
L"AS"
,
L"as"
)
.Attribute(
(
L"Color"
).Argument(
L"Keyword"
))
.Attribute(
(
L"Candidate"
))
.EndToken()
.TokenAtt(
L"WITH"
,
L"with"
)
.Attribute(
(
L"Color"
).Argument(
L"Keyword"
))
.Attribute(
(
L"Candidate"
))
.EndToken()
.Token(
L"OPEN"
,
L"/{"
)
.Token(
L"CLOSE"
,
L"/}"
)
.Token(
L"SEMICOLON"
,
L";"
)
.Token(
L"COLON"
,
L":"
)
.Token(
L"COMMA"
,
L","
)
.Token(
L"DOT"
,
L"."
)
.Token(
L"ASSIGN"
,
L"/="
)
.Token(
L"USING"
,
L"/!"
)
.Token(
L"OR"
,
L"/|"
)
.Token(
L"OPTOPEN"
,
L"/["
)
.Token(
L"OPTCLOSE"
,
L"/]"
)
.Token(
L"PREOPEN"
,
L"/("
)
.Token(
L"PRECLOSE"
,
L"/)"
)
.TokenAtt(
L"ATT"
,
L"@"
)
.Attribute(
(
L"Color"
).Argument(
L"Attribute"
))
.EndToken()
.TokenAtt(
L"NAME"
,
L"[a-zA-Z_]/w*"
)
.Attribute(
(
L"Color"
).Argument(
L"Default"
))
.Attribute(
(
L"ContextColor"
))
.Attribute(
(
L"AutoComplete"
))
.EndToken()
.TokenAtt(
L"STRING"
,
L"\"([^\"]|\"\")*\""
)
.Attribute(
(
L"Color"
).Argument(
L"String"
))
.Attribute(
(
L"AutoComplete"
))
.EndToken()
.Discard(
L"SPACE"
,
L"/s+"
)
.Discard(
L"COMMENT"
,
L"////[^\\r\\n]*"
)
.Rule(
L"Attribute"
,
(
L"AttributeDef"
))
.Imply(
(
(
L"@"
) +
(
L"NAME"
)[
L"name"
] +
(
L"("
) +
(
(
L"STRING"
)[
L"arguments"
] + *(
(
L","
) +
(
L"STRING"
)[
L"arguments"
])) +
(
L")"
))
.As(
(
L"AttributeDef"
))
)
.EndRule()
.Rule(
L"Type"
,
(
L"TypeObj"
))
.Imply(
(
(
L"NAME"
)[
L"name"
])
.As(
(
L"PrimitiveTypeObj"
))
)
.Imply(
(
L"token"
)
.As(
(
L"TokenTypeObj"
))
)
.Imply(
(
(
L"Type"
)[
L"parentType"
] +
(
L"."
) +
(
L"NAME"
)[
L"name"
])
.As(
(
L"SubTypeObj"
))
)
.Imply(
(
(
L"Type"
)[
L"elementType"
] +
(
L"["
) +
(
L"]"
))
.As(
(
L"ArrayTypeObj"
))
)
.EndRule()
.Rule(
L"EnumMember"
,
(
L"EnumMemberDef"
))
.Imply(
(
(
L"NAME"
)[
L"name"
]
+
(
(
L"Attribute"
)[
L"attributes"
] + *(
(
L","
) +
(
L"Attribute"
)[
L"attributes"
]))
+
(
L","
)
)
.As(
(
L"EnumMemberDef"
))
)
.EndRule()
.Rule(
L"Enum"
,
(
L"EnumTypeDef"
))
.Imply(
(
(
L"enum"
) +
(
L"NAME"
)[
L"name"
]
+
(
(
L"Attribute"
)[
L"attributes"
] + *(
(
L","
) +
(
L"Attribute"
)[
L"attributes"
]))
+
(
L"{"
)
+ *(
(
L"EnumMember"
)[
L"members"
])
+
(
L"}"
)
)
.As(
(
L"EnumTypeDef"
))
)
.EndRule()
.Rule(
L"ClassMember"
,
(
L"ClassMemberDef"
))
.Imply(
(
(
L"Type"
)[
L"type"
] +
(
L"NAME"
)[
L"name"
]
+
(
(
L"("
) +
(
L"NAME"
)[
L"unescapingFunction"
] +
(
L")"
))
+
(
(
L"Attribute"
)[
L"attributes"
] + *(
(
L","
) +
(
L"Attribute"
)[
L"attributes"
]))
+
(
L";"
)
)
.As(
(
L"ClassMemberDef"
))
)
.EndRule()
.Rule(
L"Class"
,
(
L"ClassTypeDef"
))
.Imply(
(
(
L"class"
) +
(
L"NAME"
)[
L"name"
]
+
(
(
L"ambiguous"
) +
(
L"("
) +
(
L"Type"
)[
L"ambiguousType"
] +
(
L")"
))
+
(
(
L":"
) +
(
L"Type"
)[
L"parentType"
])
+
(
(
L"Attribute"
)[
L"attributes"
] + *(
(
L","
) +
(
L"Attribute"
)[
L"attributes"
]))
+
(
L"{"
)
+ *(
(
L"ClassMember"
)[
L"members"
] |
(
L"TypeDecl"
)[
L"subTypes"
])
+
(
L"}"
)
)
.As(
(
L"ClassTypeDef"
))
)
.EndRule()
.Rule(
L"TypeDecl"
,
(
L"TypeDef"
))
.Imply(!
(
L"Enum"
) | !
(
L"Class"
))
.EndRule()
.Rule(
L"PrimitiveGrammar"
,
(
L"GrammarDef"
))
.Imply(
(
(
L"NAME"
)[
L"name"
])
.As(
(
L"PrimitiveGrammarDef"
))
)
.Imply(
(
(
L"STRING"
)[
L"text"
])
.As(
(
L"TextGrammarDef"
))
)
.Imply(
(
(
L"PrimitiveGrammar"
)[
L"grammar"
] +
(
L":"
) +
(
L"NAME"
)[
L"memberName"
])
.As(
(
L"AssignGrammarDef"
))
)
.Imply(
(
(
L"!"
) +
(
L"PrimitiveGrammar"
)[
L"grammar"
])
.As(
(
L"UseGrammarDef"
))
)
.Imply(
(
(
L"["
) +
(
L"Grammar"
)[
L"grammar"
] +
(
L"]"
))
.As(
(
L"OptionalGrammarDef"
))
)
.Imply(
(
(
L"{"
) +
(
L"Grammar"
)[
L"grammar"
] +
(
L"}"
))
.As(
(
L"LoopGrammarDef"
))
)
.Imply(
(
(
L"("
) + !
(
L"Grammar"
) +
(
L")"
))
)
.EndRule()
.Rule(
L"SequenceGrammar"
,
(
L"GrammarDef"
))
.Imply(
!
(
L"PrimitiveGrammar"
)
)
.Imply(
(
(
L"SequenceGrammar"
)[
L"first"
] +
(
L"PrimitiveGrammar"
)[
L"second"
])
.As(
(
L"SequenceGrammarDef"
))
)
.EndRule()
.Rule(
L"AlternativeGrammar"
,
(
L"GrammarDef"
))
.Imply(
!
(
L"SequenceGrammar"
)
)
.Imply(
(
(
L"AlternativeGrammar"
)[
L"first"
] +
(
L"|"
) +
(
L"SequenceGrammar"
)[
L"second"
])
.As(
(
L"AlternativeGrammarDef"
))
)
.EndRule()
.Rule(
L"Grammar"
,
(
L"GrammarDef"
))
.Imply(
!
(
L"AlternativeGrammar"
)
)
.Imply(
(
(
L"Grammar"
)[
L"grammar"
] +
(
L"as"
) +
(
L"Type"
)[
L"type"
])
.As(
(
L"CreateGrammarDef"
))
)
.Imply(
(
(
L"Grammar"
)[
L"grammar"
] +
(
L"with"
) +
(
L"{"
) +
(
L"NAME"
)[
L"memberName"
] +
(
L"="
) +
(
L"STRING"
)[
L"value"
] +
(
L"}"
))
.As(
(
L"SetterGrammarDef"
))
)
.EndRule()
.Rule(
L"TokenDecl"
,
(
L"TokenDef"
))
.Imply(
(
(
L"token"
) +
(
L"NAME"
)[
L"name"
]
+
(
L"="
) +
(
L"STRING"
)[
L"regex"
]
+
(
(
L"Attribute"
)[
L"attributes"
] + *(
(
L","
) +
(
L"Attribute"
)[
L"attributes"
]))
+
(
L";"
)
)
.As(
(
L"TokenDef"
))
.Set(
L"discard"
,
L"KeepToken"
)
)
.Imply(
(
(
L"discardtoken"
) +
(
L"NAME"
)[
L"name"
] +
(
L"="
) +
(
L"STRING"
)[
L"regex"
] +
(
L";"
))
.As(
(
L"TokenDef"
))
.Set(
L"discard"
,
L"DiscardToken"
)
)
.EndRule()
.Rule(
L"RuleDecl"
,
(
L"RuleDef"
))
.Imply(
(
(
L"rule"
) +
(
L"Type"
)[
L"type"
] +
(
L"NAME"
)[
L"name"
]
+
(
(
L"Attribute"
)[
L"attributes"
] + *(
(
L","
) +
(
L"Attribute"
)[
L"attributes"
]))
+ *(
(
L"="
) +
(
L"Grammar"
)[
L"grammars"
])
+
(
L";"
)
)
.As(
(
L"RuleDef"
))
)
.EndRule()
.Rule(
L"ParserDecl"
,
(
L"ParserDef"
))
.Imply(
(
*(
(
L"TypeDecl"
)[
L"definitions"
] |
(
L"TokenDecl"
)[
L"definitions"
] |
(
L"RuleDecl"
)[
L"definitions"
]
)
+(
(
L"TypeDecl"
)[
L"definitions"
] |
(
L"TokenDecl"
)[
L"definitions"
] |
(
L"RuleDecl"
)[
L"definitions"
]
)
)
.As(
(
L"ParserDef"
))
)
.EndRule()
;
return
definitionWriter
.
();
}
(
const
&
)
{
if
(
.
()>=
2
&&
0
]==
L'"'
&&
.
()-
1
]==
L'"'
)
{
<
wchar_t
>
(
.
());
(&
chars
0
],
0
,
chars
.
()*
sizeof
(
wchar_t
));
const
wchar_t
*
=
.
()+
1
;
wchar_t
*
=&
chars
0
];
while
(*
reading
)
{
if
(*
reading
!=
L'"'
)
{
*
writing
++=*
reading
++;
}
else
if
(
reading
[
1
]!=
L'"'
)
{
break
;
}
else
{
*
writing
++=
L'"'
;
reading
+=
2
;
}
}
return
&
chars
0
];
}
return
L""
;
}
(
<
>
)
{
const
&
=
();
return
(
value
);
}
void
(
&
,
<
>
)
{
<
>
=
.
<
>();
if
(
token
)
{
token
();
}
}
void
(
&
,
<
>
)
{
<
>
=
.
<
>();
if
(
token
)
{
(
token
);
}
}
extern
<
>
(
<
>
);
template
<
typename
>
void
(
<
<
>>&
,
<
>
)
{
<
>
=
.
<
>();
if
(
source
)
{
for
(
=
0
;
i
<
source
();
i
++)
{
.
(
(
source
(
i
).
<
>()).
<
>());
}
}
}
void
(
<
>&
,
<
>
)
{
<
>
=
.
<
>();
if
(
source
)
{
for
(
=
0
;
i
<
source
();
i
++)
{
;
(
name
,
source
(
i
));
.
(
name
);
}
}
}
template
<
typename
>
void
(
<
>&
,
<
>
)
{
<
>
=
.
<
>();
if
(
source
)
{
(
source
).
<
>();
}
}
<
>
(
<
>
)
{
if
(!
)
{
return
0
;
}
else
if
(
()
L"AttributeDef"
)
{
<
ParsingDefinitionAttribute
>
=
new
ParsingDefinitionAttribute
;
(
target
,
(
L"name"
));
(
target
,
(
L"arguments"
));
for
(
=
0
;
i
<
target
.
();
i
++)
{
target
i
]
(
target
i
]);
}
return
target
;
}
else
if
(
()
L"PrimitiveTypeObj"
)
{
<
ParsingDefinitionPrimitiveType
>
=
new
ParsingDefinitionPrimitiveType
;
(
target
,
(
L"name"
));
return
target
;
}
else
if
(
()
L"TokenTypeObj"
)
{
<
ParsingDefinitionTokenType
>
=
new
ParsingDefinitionTokenType
;
return
target
;
}
else
if
(
()
L"SubTypeObj"
)
{
<
>
=
new
;
(
target
,
(
L"parentType"
));
(
target
,
(
L"name"
));
return
target
;
}
else
if
(
()
L"ArrayTypeObj"
)
{
<
ParsingDefinitionArrayType
>
=
new
ParsingDefinitionArrayType
;
(
target
,
(
L"elementType"
));
return
target
;
}
else
if
(
()
L"ClassMemberDef"
)
{
<
ParsingDefinitionClassMemberDefinition
>
=
new
ParsingDefinitionClassMemberDefinition
;
(
target
,
(
L"attributes"
));
(
target
,
(
L"type"
));
(
target
,
(
L"name"
));
(
target
,
(
L"unescapingFunction"
));
return
target
;
}
else
if
(
()
L"ClassTypeDef"
)
{
<
ParsingDefinitionClassDefinition
>
=
new
ParsingDefinitionClassDefinition
;
(
target
,
(
L"attributes"
));
(
target
,
(
L"ambiguousType"
));
(
target
,
(
L"parentType"
));
(
target
,
(
L"name"
));
(
target
,
(
L"members"
));
(
target
,
(
L"subTypes"
));
return
target
;
}
else
if
(
()
L"EnumMemberDef"
)
{
<
ParsingDefinitionEnumMemberDefinition
>
=
new
ParsingDefinitionEnumMemberDefinition
;
(
target
,
(
L"attributes"
));
(
target
,
(
L"name"
));
return
target
;
}
else
if
(
()
L"EnumTypeDef"
)
{
<
ParsingDefinitionEnumDefinition
>
=
new
ParsingDefinitionEnumDefinition
;
(
target
,
(
L"attributes"
));
(
target
,
(
L"name"
));
(
target
,
(
L"members"
));
return
target
;
}
else
if
(
()
L"PrimitiveGrammarDef"
)
{
<
ParsingDefinitionPrimitiveGrammar
>
=
new
ParsingDefinitionPrimitiveGrammar
;
(
target
,
(
L"name"
));
return
target
;
}
else
if
(
()
L"TextGrammarDef"
)
{
<
ParsingDefinitionTextGrammar
>
=
new
ParsingDefinitionTextGrammar
;
(
target
text
,
(
L"text"
));
return
target
;
}
else
if
(
()
L"SequenceGrammarDef"
)
{
<
ParsingDefinitionSequenceGrammar
>
=
new
ParsingDefinitionSequenceGrammar
;
(
target
,
(
L"first"
));
(
target
,
(
L"second"
));
return
target
;
}
else
if
(
()
L"AlternativeGrammarDef"
)
{
<
ParsingDefinitionAlternativeGrammar
>
=
new
ParsingDefinitionAlternativeGrammar
;
(
target
,
(
L"first"
));
(
target
,
(
L"second"
));
return
target
;
}
else
if
(
()
L"LoopGrammarDef"
)
{
<
ParsingDefinitionLoopGrammar
>
=
new
ParsingDefinitionLoopGrammar
;
(
target
,
(
L"grammar"
));
return
target
;
}
else
if
(
()
L"OptionalGrammarDef"
)
{
<
ParsingDefinitionOptionalGrammar
>
=
new
ParsingDefinitionOptionalGrammar
;
(
target
,
(
L"grammar"
));
return
target
;
}
else
if
(
()
L"CreateGrammarDef"
)
{
<
ParsingDefinitionCreateGrammar
>
=
new
ParsingDefinitionCreateGrammar
;
(
target
,
(
L"grammar"
));
(
target
,
(
L"type"
));
return
target
;
}
else
if
(
()
L"AssignGrammarDef"
)
{
<
ParsingDefinitionAssignGrammar
>
=
new
ParsingDefinitionAssignGrammar
;
(
target
,
(
L"grammar"
));
(
target
,
(
L"memberName"
));
return
target
;
}
else
if
(
()
L"UseGrammarDef"
)
{
<
ParsingDefinitionUseGrammar
>
=
new
ParsingDefinitionUseGrammar
;
(
target
,
(
L"grammar"
));
return
target
;
}
else
if
(
()
L"SetterGrammarDef"
)
{
<
ParsingDefinitionSetterGrammar
>
=
new
ParsingDefinitionSetterGrammar
;
(
target
,
(
L"grammar"
));
(
target
,
(
L"memberName"
));
(
target
,
(
L"value"
));
return
target
;
}
else
if
(
()
L"TokenDef"
)
{
<
ParsingDefinitionTokenDefinition
>
=
new
ParsingDefinitionTokenDefinition
;
(
target
,
(
L"attributes"
));
(
target
,
(
L"name"
));
(
target
regex
,
(
L"regex"
));
<
>
=
(
L"discard"
).Cast<
>();
target
=(
token
&&
token
()==
L"DiscardToken"
);
return
target
;
}
else
if
(
()
L"RuleDef"
)
{
<
ParsingDefinitionRuleDefinition
>
=
new
ParsingDefinitionRuleDefinition
;
(
target
,
(
L"attributes"
));
(
target
,
(
L"name"
));
(
target
,
(
L"type"
));
(
target
,
(
L"grammars"
));
return
target
;
}
else
if
(
()
L"ParserDef"
)
{
<
>
=
new
;
<
>
=
(
L"definitions"
).Cast<
>();
if
(
defs
)
{
=
defs
();
for
(
=
0
;
i
<
count
;
i
++)
{
<
>
=
defs
(
i
).
<
>();
<
>
=
(
def
);
if
(
<
ParsingDefinitionTypeDefinition
>
=
defObject
.
<
ParsingDefinitionTypeDefinition
>())
{
target
types
.
(
defType
);
}
else
if
(
<
ParsingDefinitionTokenDefinition
>
=
defObject
.
<
ParsingDefinitionTokenDefinition
>())
{
target
.
(
defToken
);
}
else
if
(
<
ParsingDefinitionRuleDefinition
>
=
defObject
.
<
ParsingDefinitionRuleDefinition
>())
{
target
.
(
defRule
);
}
}
}
return
target
;
}
else
{
return
0
;
}
}
<
>
(
<
>
)
{
return
(
.
<
>()).
<
>();
}
}
}
}