|
|
|
@ -1,3 +1,4 @@ |
|
|
|
|
|
|
|
using System; |
|
|
|
using System.Collections; |
|
|
|
using System.Collections; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Collections.Specialized; |
|
|
|
using System.Collections.Specialized; |
|
|
|
@ -7,7 +8,8 @@ using ICSharpCode.NRefactory.VB.Dom; |
|
|
|
using ICSharpCode.NRefactory.VB.Parser; |
|
|
|
using ICSharpCode.NRefactory.VB.Parser; |
|
|
|
using ASTAttribute = ICSharpCode.NRefactory.VB.Dom.Attribute; |
|
|
|
using ASTAttribute = ICSharpCode.NRefactory.VB.Dom.Attribute; |
|
|
|
|
|
|
|
|
|
|
|
COMPILER VBNET |
|
|
|
COMPILER VB |
|
|
|
|
|
|
|
$trace=FG |
|
|
|
|
|
|
|
|
|
|
|
/* START AUTOGENERATED TOKENS SECTION */ |
|
|
|
/* START AUTOGENERATED TOKENS SECTION */ |
|
|
|
TOKENS |
|
|
|
TOKENS |
|
|
|
@ -20,7 +22,7 @@ TOKENS |
|
|
|
LiteralInteger |
|
|
|
LiteralInteger |
|
|
|
LiteralDouble |
|
|
|
LiteralDouble |
|
|
|
LiteralSingle |
|
|
|
LiteralSingle |
|
|
|
LiteralDecimal |
|
|
|
LiteralDecimal |
|
|
|
LiteralDate |
|
|
|
LiteralDate |
|
|
|
XmlOpenTag |
|
|
|
XmlOpenTag |
|
|
|
XmlCloseTag |
|
|
|
XmlCloseTag |
|
|
|
@ -53,7 +55,7 @@ TOKENS |
|
|
|
"}" |
|
|
|
"}" |
|
|
|
"(" |
|
|
|
"(" |
|
|
|
")" |
|
|
|
")" |
|
|
|
">" |
|
|
|
">" |
|
|
|
"<" |
|
|
|
"<" |
|
|
|
"<>" |
|
|
|
"<>" |
|
|
|
">=" |
|
|
|
">=" |
|
|
|
@ -258,7 +260,7 @@ TOKENS |
|
|
|
|
|
|
|
|
|
|
|
PRODUCTIONS |
|
|
|
PRODUCTIONS |
|
|
|
|
|
|
|
|
|
|
|
VBNET |
|
|
|
VB |
|
|
|
(. |
|
|
|
(. |
|
|
|
lexer.NextToken(); // get the first token |
|
|
|
lexer.NextToken(); // get the first token |
|
|
|
compilationUnit = new CompilationUnit(); |
|
|
|
compilationUnit = new CompilationUnit(); |
|
|
|
@ -270,7 +272,6 @@ VBNET |
|
|
|
{ ImportsStmt { EndOfStmt } } |
|
|
|
{ ImportsStmt { EndOfStmt } } |
|
|
|
{ IF (IsGlobalAttrTarget()) GlobalAttributeSection { EndOfStmt } } |
|
|
|
{ IF (IsGlobalAttrTarget()) GlobalAttributeSection { EndOfStmt } } |
|
|
|
{ NamespaceMemberDecl { EndOfStmt } } |
|
|
|
{ NamespaceMemberDecl { EndOfStmt } } |
|
|
|
EOF |
|
|
|
|
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
OptionStmt (. INode node = null; bool val = true; .) = |
|
|
|
OptionStmt (. INode node = null; bool val = true; .) = |
|
|
|
@ -297,7 +298,7 @@ OptionStmt (. INode node = null; bool val = true; .) = |
|
|
|
AddChild(node); |
|
|
|
AddChild(node); |
|
|
|
} |
|
|
|
} |
|
|
|
.) |
|
|
|
.) |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
OptionValue<ref bool val> = |
|
|
|
OptionValue<ref bool val> = |
|
|
|
( |
|
|
|
( |
|
|
|
@ -386,7 +387,7 @@ NamespaceMemberDecl |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 4.9.1 */ |
|
|
|
/* 4.9.1 */ |
|
|
|
TypeParameterList<List<TemplateDefinition> templates> |
|
|
|
TypeParameterList<.List<TemplateDefinition> templates.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
TemplateDefinition template; |
|
|
|
TemplateDefinition template; |
|
|
|
.) |
|
|
|
.) |
|
|
|
@ -452,7 +453,7 @@ TypeParameterConstraint<out TypeReference constraint> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 6.4.2 */ |
|
|
|
/* 6.4.2 */ |
|
|
|
NonModuleDeclaration<ModifierList m, List<AttributeSection> attributes> |
|
|
|
NonModuleDeclaration<.ModifierList m, List<AttributeSection> attributes.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
TypeReference typeRef = null; |
|
|
|
TypeReference typeRef = null; |
|
|
|
List<TypeReference> baseInterfaces = null; |
|
|
|
List<TypeReference> baseInterfaces = null; |
|
|
|
@ -790,7 +791,7 @@ EnumMemberDecl<out FieldDeclaration f> |
|
|
|
EndOfStmt |
|
|
|
EndOfStmt |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
ClassMemberDecl<ModifierList m, List<AttributeSection> attributes> = |
|
|
|
ClassMemberDecl<.ModifierList m, List<AttributeSection> attributes.> = |
|
|
|
StructureMemberDecl<m, attributes> |
|
|
|
StructureMemberDecl<m, attributes> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
@ -804,7 +805,7 @@ ClassBaseType<out TypeReference typeRef> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 7.6.1 */ |
|
|
|
/* 7.6.1 */ |
|
|
|
StructureMemberDecl<ModifierList m, List<AttributeSection> attributes> |
|
|
|
StructureMemberDecl<.ModifierList m, List<AttributeSection> attributes.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
TypeReference type = null; |
|
|
|
TypeReference type = null; |
|
|
|
List<ParameterDeclarationExpression> p = new List<ParameterDeclarationExpression>(); |
|
|
|
List<ParameterDeclarationExpression> p = new List<ParameterDeclarationExpression>(); |
|
|
|
@ -1395,7 +1396,7 @@ AccessorDecls<out PropertyGetRegion getBlock, out PropertySetRegion setBlock> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 9.7.1 */ |
|
|
|
/* 9.7.1 */ |
|
|
|
GetAccessorDecl<out PropertyGetRegion getBlock, List<AttributeSection> attributes> |
|
|
|
GetAccessorDecl<.out PropertyGetRegion getBlock, List<AttributeSection> attributes.> |
|
|
|
(. Statement stmt = null; Modifiers m; .) |
|
|
|
(. Statement stmt = null; Modifiers m; .) |
|
|
|
= |
|
|
|
= |
|
|
|
PropertyAccessorAccessModifier<out m> |
|
|
|
PropertyAccessorAccessModifier<out m> |
|
|
|
@ -1411,7 +1412,7 @@ GetAccessorDecl<out PropertyGetRegion getBlock, List<AttributeSection> attribute |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 9.7.2 */ |
|
|
|
/* 9.7.2 */ |
|
|
|
SetAccessorDecl<out PropertySetRegion setBlock, List<AttributeSection> attributes> |
|
|
|
SetAccessorDecl<.out PropertySetRegion setBlock, List<AttributeSection> attributes.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
Statement stmt = null; |
|
|
|
Statement stmt = null; |
|
|
|
List<ParameterDeclarationExpression> p = new List<ParameterDeclarationExpression>(); |
|
|
|
List<ParameterDeclarationExpression> p = new List<ParameterDeclarationExpression>(); |
|
|
|
@ -1435,7 +1436,7 @@ SetAccessorDecl<out PropertySetRegion setBlock, List<AttributeSection> attribute |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 9.5 */ |
|
|
|
/* 9.5 */ |
|
|
|
ConstantDeclarator<List<VariableDeclaration> constantDeclaration> |
|
|
|
ConstantDeclarator<.List<VariableDeclaration> constantDeclaration.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
Expression expr = null; |
|
|
|
Expression expr = null; |
|
|
|
TypeReference type = null; |
|
|
|
TypeReference type = null; |
|
|
|
@ -1454,13 +1455,13 @@ ConstantDeclarator<List<VariableDeclaration> constantDeclaration> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 9.6 */ |
|
|
|
/* 9.6 */ |
|
|
|
VariableDeclarator<List<VariableDeclaration> fieldDeclaration> |
|
|
|
VariableDeclarator<.List<VariableDeclaration> fieldDeclaration.> |
|
|
|
= |
|
|
|
= |
|
|
|
Identifier (. string name = t.val; .) |
|
|
|
Identifier (. string name = t.val; .) |
|
|
|
VariableDeclaratorPartAfterIdentifier<fieldDeclaration, name> |
|
|
|
VariableDeclaratorPartAfterIdentifier<fieldDeclaration, name> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
VariableDeclaratorPartAfterIdentifier<List<VariableDeclaration> fieldDeclaration, string name> |
|
|
|
VariableDeclaratorPartAfterIdentifier<.List<VariableDeclaration> fieldDeclaration, string name.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
Expression expr = null; |
|
|
|
Expression expr = null; |
|
|
|
TypeReference type = null; |
|
|
|
TypeReference type = null; |
|
|
|
@ -1528,7 +1529,7 @@ VariableDeclaratorPartAfterIdentifier<List<VariableDeclaration> fieldDeclaration |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 6.8 */ |
|
|
|
/* 6.8 */ |
|
|
|
ArrayInitializationModifier<out List<Expression> arrayModifiers> |
|
|
|
ArrayInitializationModifier<.out List<Expression> arrayModifiers.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
arrayModifiers = null; |
|
|
|
arrayModifiers = null; |
|
|
|
.) = |
|
|
|
.) = |
|
|
|
@ -1536,7 +1537,7 @@ ArrayInitializationModifier<out List<Expression> arrayModifiers> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 7.5.4.3 */ |
|
|
|
/* 7.5.4.3 */ |
|
|
|
InitializationRankList<out List<Expression> rank> |
|
|
|
InitializationRankList<.out List<Expression> rank.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
rank = new List<Expression>(); |
|
|
|
rank = new List<Expression>(); |
|
|
|
Expression expr = null; |
|
|
|
Expression expr = null; |
|
|
|
@ -1589,7 +1590,7 @@ Charset<out CharsetModifier charsetModifier> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 9.2.6 */ |
|
|
|
/* 9.2.6 */ |
|
|
|
HandlesClause<out List<string> handlesClause> |
|
|
|
HandlesClause<.out List<string> handlesClause.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
handlesClause = new List<string>(); |
|
|
|
handlesClause = new List<string>(); |
|
|
|
string name; |
|
|
|
string name; |
|
|
|
@ -1599,7 +1600,7 @@ HandlesClause<out List<string> handlesClause> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 7.8. */ |
|
|
|
/* 7.8. */ |
|
|
|
InterfaceBase<out List<TypeReference> bases> |
|
|
|
InterfaceBase<.out List<TypeReference> bases.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
TypeReference type; |
|
|
|
TypeReference type; |
|
|
|
bases = new List<TypeReference>(); |
|
|
|
bases = new List<TypeReference>(); |
|
|
|
@ -1614,7 +1615,7 @@ InterfaceBase<out List<TypeReference> bases> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 7.2 */ |
|
|
|
/* 7.2 */ |
|
|
|
TypeImplementsClause<out List<TypeReference> baseInterfaces> |
|
|
|
TypeImplementsClause<.out List<TypeReference> baseInterfaces.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
baseInterfaces = new List<TypeReference>(); |
|
|
|
baseInterfaces = new List<TypeReference>(); |
|
|
|
TypeReference type = null; |
|
|
|
TypeReference type = null; |
|
|
|
@ -1631,7 +1632,7 @@ TypeImplementsClause<out List<TypeReference> baseInterfaces> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 9.1 */ |
|
|
|
/* 9.1 */ |
|
|
|
ImplementsClause<out List<InterfaceImplementation> baseInterfaces> |
|
|
|
ImplementsClause<.out List<InterfaceImplementation> baseInterfaces.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
baseInterfaces = new List<InterfaceImplementation>(); |
|
|
|
baseInterfaces = new List<InterfaceImplementation>(); |
|
|
|
TypeReference type = null; |
|
|
|
TypeReference type = null; |
|
|
|
@ -1827,7 +1828,7 @@ XmlLiteralExpression<out Expression pexpr> |
|
|
|
.) |
|
|
|
.) |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
XmlContentExpression<List<XmlExpression> exprs> = |
|
|
|
XmlContentExpression<.List<XmlExpression> exprs.> = |
|
|
|
(. XmlContentExpression expr = null; .) |
|
|
|
(. XmlContentExpression expr = null; .) |
|
|
|
( |
|
|
|
( |
|
|
|
XmlContent (. expr = new XmlContentExpression(t.val, XmlContentType.Text); .) |
|
|
|
XmlContent (. expr = new XmlContentExpression(t.val, XmlContentType.Text); .) |
|
|
|
@ -1875,7 +1876,7 @@ XmlElement<out XmlExpression expr> |
|
|
|
(. expr = el; .) |
|
|
|
(. expr = el; .) |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
XmlAttribute<List<XmlExpression> attrs> |
|
|
|
XmlAttribute<.List<XmlExpression> attrs.> |
|
|
|
(. Location start = la.Location; .) |
|
|
|
(. Location start = la.Location; .) |
|
|
|
= |
|
|
|
= |
|
|
|
Identifier (. string name = t.val; .) "=" |
|
|
|
Identifier (. string name = t.val; .) "=" |
|
|
|
@ -1934,7 +1935,6 @@ InvocationExpression<ref Expression pexpr> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 11.11 */ |
|
|
|
/* 11.11 */ |
|
|
|
|
|
|
|
|
|
|
|
CastTarget<out TypeReference type> |
|
|
|
CastTarget<out TypeReference type> |
|
|
|
(. |
|
|
|
(. |
|
|
|
type = null; |
|
|
|
type = null; |
|
|
|
@ -2300,7 +2300,7 @@ QueryExpr<out Expression expr> |
|
|
|
.) |
|
|
|
.) |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
FromOrAggregateQueryOperator<List<QueryExpressionClause> middleClauses> |
|
|
|
FromOrAggregateQueryOperator<.List<QueryExpressionClause> middleClauses.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
QueryExpressionFromClause fromClause = null; |
|
|
|
QueryExpressionFromClause fromClause = null; |
|
|
|
QueryExpressionAggregateClause aggregateClause = null; |
|
|
|
QueryExpressionAggregateClause aggregateClause = null; |
|
|
|
@ -2311,7 +2311,7 @@ FromOrAggregateQueryOperator<List<QueryExpressionClause> middleClauses> |
|
|
|
(. middleClauses.Add(aggregateClause); .) |
|
|
|
(. middleClauses.Add(aggregateClause); .) |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
QueryOperator<List<QueryExpressionClause> middleClauses> |
|
|
|
QueryOperator<.List<QueryExpressionClause> middleClauses.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
QueryExpressionJoinVBClause joinClause = null; |
|
|
|
QueryExpressionJoinVBClause joinClause = null; |
|
|
|
QueryExpressionGroupVBClause groupByClause = null; |
|
|
|
QueryExpressionGroupVBClause groupByClause = null; |
|
|
|
@ -2339,7 +2339,7 @@ QueryOperator<List<QueryExpressionClause> middleClauses> |
|
|
|
(. middleClauses.Add(groupByClause); .) |
|
|
|
(. middleClauses.Add(groupByClause); .) |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
OrderByQueryOperator<List<QueryExpressionClause> middleClauses> |
|
|
|
OrderByQueryOperator<.List<QueryExpressionClause> middleClauses.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
QueryExpressionOrderClause orderClause = new QueryExpressionOrderClause(); |
|
|
|
QueryExpressionOrderClause orderClause = new QueryExpressionOrderClause(); |
|
|
|
orderClause.StartLocation = la.Location; |
|
|
|
orderClause.StartLocation = la.Location; |
|
|
|
@ -2353,7 +2353,7 @@ OrderByQueryOperator<List<QueryExpressionClause> middleClauses> |
|
|
|
.) |
|
|
|
.) |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
OrderExpressionList<out List<QueryExpressionOrdering> orderings> |
|
|
|
OrderExpressionList<.out List<QueryExpressionOrdering> orderings.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
orderings = new List<QueryExpressionOrdering>(); |
|
|
|
orderings = new List<QueryExpressionOrdering>(); |
|
|
|
QueryExpressionOrdering ordering = null; |
|
|
|
QueryExpressionOrdering ordering = null; |
|
|
|
@ -2422,7 +2422,7 @@ FromQueryOperator<out QueryExpressionFromClause fromClause> |
|
|
|
.) |
|
|
|
.) |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
SelectQueryOperator<List<QueryExpressionClause> middleClauses> |
|
|
|
SelectQueryOperator<.List<QueryExpressionClause> middleClauses.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
QueryExpressionSelectVBClause selectClause = new QueryExpressionSelectVBClause(); |
|
|
|
QueryExpressionSelectVBClause selectClause = new QueryExpressionSelectVBClause(); |
|
|
|
selectClause.StartLocation = la.Location; |
|
|
|
selectClause.StartLocation = la.Location; |
|
|
|
@ -2434,7 +2434,7 @@ SelectQueryOperator<List<QueryExpressionClause> middleClauses> |
|
|
|
.) |
|
|
|
.) |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
DistinctQueryOperator<List<QueryExpressionClause> middleClauses> |
|
|
|
DistinctQueryOperator<.List<QueryExpressionClause> middleClauses.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
QueryExpressionDistinctClause distinctClause = new QueryExpressionDistinctClause(); |
|
|
|
QueryExpressionDistinctClause distinctClause = new QueryExpressionDistinctClause(); |
|
|
|
distinctClause.StartLocation = la.Location; |
|
|
|
distinctClause.StartLocation = la.Location; |
|
|
|
@ -2446,7 +2446,7 @@ DistinctQueryOperator<List<QueryExpressionClause> middleClauses> |
|
|
|
.) |
|
|
|
.) |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
WhereQueryOperator<List<QueryExpressionClause> middleClauses> |
|
|
|
WhereQueryOperator<.List<QueryExpressionClause> middleClauses.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
QueryExpressionWhereClause whereClause = new QueryExpressionWhereClause(); |
|
|
|
QueryExpressionWhereClause whereClause = new QueryExpressionWhereClause(); |
|
|
|
whereClause.StartLocation = la.Location; |
|
|
|
whereClause.StartLocation = la.Location; |
|
|
|
@ -2500,7 +2500,7 @@ AggregateQueryOperator<out QueryExpressionAggregateClause aggregateClause> |
|
|
|
.) |
|
|
|
.) |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
LetQueryOperator<List<QueryExpressionClause> middleClauses> |
|
|
|
LetQueryOperator<.List<QueryExpressionClause> middleClauses.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
QueryExpressionLetVBClause letClause = new QueryExpressionLetVBClause(); |
|
|
|
QueryExpressionLetVBClause letClause = new QueryExpressionLetVBClause(); |
|
|
|
letClause.StartLocation = la.Location; |
|
|
|
letClause.StartLocation = la.Location; |
|
|
|
@ -2512,7 +2512,7 @@ LetQueryOperator<List<QueryExpressionClause> middleClauses> |
|
|
|
.) |
|
|
|
.) |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
ExpressionRangeVariableDeclarationList<List<ExpressionRangeVariable> variables> |
|
|
|
ExpressionRangeVariableDeclarationList<.List<ExpressionRangeVariable> variables.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
ExpressionRangeVariable variable = null; |
|
|
|
ExpressionRangeVariable variable = null; |
|
|
|
.) = |
|
|
|
.) = |
|
|
|
@ -2571,7 +2571,7 @@ JoinQueryOperator<out QueryExpressionJoinVBClause joinClause> |
|
|
|
.) |
|
|
|
.) |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
CollectionRangeVariableDeclarationList<List<CollectionRangeVariable> rangeVariables> |
|
|
|
CollectionRangeVariableDeclarationList<.List<CollectionRangeVariable> rangeVariables.> |
|
|
|
(. CollectionRangeVariable variableDeclaration; .) |
|
|
|
(. CollectionRangeVariable variableDeclaration; .) |
|
|
|
= |
|
|
|
= |
|
|
|
CollectionRangeVariableDeclaration<out variableDeclaration> |
|
|
|
CollectionRangeVariableDeclaration<out variableDeclaration> |
|
|
|
@ -2630,7 +2630,7 @@ MemberInitializer<out MemberInitializerExpression memberInitializer> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 9.3.2 */ |
|
|
|
/* 9.3.2 */ |
|
|
|
ArgumentList<out List<Expression> arguments> |
|
|
|
ArgumentList<.out List<Expression> arguments.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
arguments = new List<Expression>(); |
|
|
|
arguments = new List<Expression>(); |
|
|
|
Expression expr = null; |
|
|
|
Expression expr = null; |
|
|
|
@ -2644,7 +2644,7 @@ ArgumentList<out List<Expression> arguments> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* argument list that hasn't decided if it is method call or array initialisation */ |
|
|
|
/* argument list that hasn't decided if it is method call or array initialisation */ |
|
|
|
NormalOrReDimArgumentList<out List<Expression> arguments, out bool canBeNormal, out bool canBeRedim> |
|
|
|
NormalOrReDimArgumentList<.out List<Expression> arguments, out bool canBeNormal, out bool canBeRedim.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
arguments = new List<Expression>(); |
|
|
|
arguments = new List<Expression>(); |
|
|
|
canBeNormal = true; canBeRedim = !IsNamedAssign(); |
|
|
|
canBeNormal = true; canBeRedim = !IsNamedAssign(); |
|
|
|
@ -2802,7 +2802,7 @@ RankList<out int i> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 7.12 */ |
|
|
|
/* 7.12 */ |
|
|
|
TypeArgumentList<List<TypeReference> typeArguments> |
|
|
|
TypeArgumentList<.List<TypeReference> typeArguments.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
TypeReference typeref; |
|
|
|
TypeReference typeref; |
|
|
|
.) = |
|
|
|
.) = |
|
|
|
@ -2853,7 +2853,7 @@ Attribute<out ASTAttribute attribute> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* Spec, 5.2.2 */ |
|
|
|
/* Spec, 5.2.2 */ |
|
|
|
AttributeArguments<List<Expression> positional, List<NamedArgumentExpression> named> |
|
|
|
AttributeArguments<.List<Expression> positional, List<NamedArgumentExpression> named.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
bool nameFound = false; |
|
|
|
bool nameFound = false; |
|
|
|
string name = ""; |
|
|
|
string name = ""; |
|
|
|
@ -2930,7 +2930,7 @@ AttributeSection<out AttributeSection section> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 9.2.5 */ |
|
|
|
/* 9.2.5 */ |
|
|
|
FormalParameterList<List<ParameterDeclarationExpression> parameter> |
|
|
|
FormalParameterList<.List<ParameterDeclarationExpression> parameter.> |
|
|
|
(. ParameterDeclarationExpression p; .) |
|
|
|
(. ParameterDeclarationExpression p; .) |
|
|
|
= |
|
|
|
= |
|
|
|
FormalParameter<out p> (. if (p != null) parameter.Add(p); .) |
|
|
|
FormalParameter<out p> (. if (p != null) parameter.Add(p); .) |
|
|
|
@ -2986,18 +2986,19 @@ Block<out Statement stmt> |
|
|
|
if (t != null) blockStmt.StartLocation = t.EndLocation; |
|
|
|
if (t != null) blockStmt.StartLocation = t.EndLocation; |
|
|
|
BlockStart(blockStmt); |
|
|
|
BlockStart(blockStmt); |
|
|
|
.) |
|
|
|
.) |
|
|
|
{ |
|
|
|
{ |
|
|
|
IF (IsEndStmtAhead()) |
|
|
|
IF (IsEndStmtAhead() || StartOf(StatementEndOfStmt)) |
|
|
|
(. Token first = la; .) |
|
|
|
( |
|
|
|
"End" EndOfStmt |
|
|
|
"End" |
|
|
|
(. |
|
|
|
(. Token first = t; |
|
|
|
AddChild(new EndStatement() { |
|
|
|
AddChild(new EndStatement() { |
|
|
|
StartLocation = first.Location, |
|
|
|
StartLocation = first.Location, |
|
|
|
EndLocation = first.EndLocation } |
|
|
|
EndLocation = first.EndLocation } |
|
|
|
); |
|
|
|
); |
|
|
|
.) |
|
|
|
.) EndOfStmt |
|
|
|
| Statement EndOfStmt |
|
|
|
| |
|
|
|
/* IF (!LeaveBlock()) { }*/ |
|
|
|
(.NamedFirstSet:StatementEndOfStmt.) Statement EndOfStmt |
|
|
|
|
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
(. |
|
|
|
(. |
|
|
|
stmt = blockStmt; |
|
|
|
stmt = blockStmt; |
|
|
|
@ -3011,10 +3012,9 @@ Statement |
|
|
|
Statement stmt = null; |
|
|
|
Statement stmt = null; |
|
|
|
Location startPos = la.Location; |
|
|
|
Location startPos = la.Location; |
|
|
|
string label = String.Empty; |
|
|
|
string label = String.Empty; |
|
|
|
|
|
|
|
|
|
|
|
.) = |
|
|
|
.) = |
|
|
|
( |
|
|
|
( |
|
|
|
| IF (IsLabel()) LabelName<out label> |
|
|
|
IF (IsLabel()) LabelName<out label> |
|
|
|
(. |
|
|
|
(. |
|
|
|
AddChild(new LabelStatement(t.val)); |
|
|
|
AddChild(new LabelStatement(t.val)); |
|
|
|
.) |
|
|
|
.) |
|
|
|
@ -3070,28 +3070,9 @@ EmbeddedStatement<out Statement statement> |
|
|
|
List<Expression> p = null; |
|
|
|
List<Expression> p = null; |
|
|
|
Location startLocation = la.Location; |
|
|
|
Location startLocation = la.Location; |
|
|
|
.) = |
|
|
|
.) = |
|
|
|
( |
|
|
|
( ExitStatement<out statement> |
|
|
|
"Exit" (. ExitType exitType = ExitType.None; .) |
|
|
|
|
|
|
|
( |
|
|
|
|
|
|
|
"Sub" (. exitType = ExitType.Sub; .) |
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
"Function" (. exitType = ExitType.Function; .) |
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
"Property" (. exitType = ExitType.Property; .) |
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
"Do" (. exitType = ExitType.Do; .) |
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
"For" (. exitType = ExitType.For; .) |
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
"Try" (. exitType = ExitType.Try; .) |
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
"While" (. exitType = ExitType.While; .) |
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
"Select" (. exitType = ExitType.Select; .) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
(. statement = new ExitStatement(exitType); .) |
|
|
|
|
|
|
|
| TryStatement<out statement> |
|
|
|
| TryStatement<out statement> |
|
|
|
| "Continue" (. ContinueType continueType = ContinueType.None; .) [ "Do" (. continueType = ContinueType.Do; .) | "For" (. continueType = ContinueType.For; .) | "While" (. continueType = ContinueType.While; .)] (. statement = new ContinueStatement(continueType); .) |
|
|
|
| ContinueStatement<out statement> |
|
|
|
| /* 10.10.1.3 */ |
|
|
|
| /* 10.10.1.3 */ |
|
|
|
"Throw" [ Expr<out expr> ] (. statement = new ThrowStatement(expr); .) |
|
|
|
"Throw" [ Expr<out expr> ] (. statement = new ThrowStatement(expr); .) |
|
|
|
| /* 10.11 */ |
|
|
|
| /* 10.11 */ |
|
|
|
@ -3370,7 +3351,28 @@ EmbeddedStatement<out Statement statement> |
|
|
|
.) |
|
|
|
.) |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
SingleLineStatementList<List<Statement> list> |
|
|
|
ExitStatement<out Statement statement> = |
|
|
|
|
|
|
|
"Exit" (. ExitType exitType = ExitType.None; .) |
|
|
|
|
|
|
|
( "Sub" (. exitType = ExitType.Sub; .) |
|
|
|
|
|
|
|
| "Function" (. exitType = ExitType.Function; .) |
|
|
|
|
|
|
|
| "Property" (. exitType = ExitType.Property; .) |
|
|
|
|
|
|
|
| "Do" (. exitType = ExitType.Do; .) |
|
|
|
|
|
|
|
| "For" (. exitType = ExitType.For; .) |
|
|
|
|
|
|
|
| "Try" (. exitType = ExitType.Try; .) |
|
|
|
|
|
|
|
| "While" (. exitType = ExitType.While; .) |
|
|
|
|
|
|
|
| "Select" (. exitType = ExitType.Select; .) ) |
|
|
|
|
|
|
|
(. statement = new ExitStatement(exitType); .) |
|
|
|
|
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ContinueStatement<out Statement statement> = |
|
|
|
|
|
|
|
"Continue" (. ContinueType continueType = ContinueType.None; .) |
|
|
|
|
|
|
|
[ "Do" (. continueType = ContinueType.Do; .) |
|
|
|
|
|
|
|
| "For" (. continueType = ContinueType.For; .) |
|
|
|
|
|
|
|
| "While" (. continueType = ContinueType.While; .) ] |
|
|
|
|
|
|
|
(. statement = new ContinueStatement(continueType); .) |
|
|
|
|
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SingleLineStatementList<.List<Statement> list.> |
|
|
|
(. Statement embeddedStatement = null; .) |
|
|
|
(. Statement embeddedStatement = null; .) |
|
|
|
= |
|
|
|
= |
|
|
|
( "End" (. embeddedStatement = new EndStatement() { StartLocation = t.Location, EndLocation = t.EndLocation }; .) |
|
|
|
( "End" (. embeddedStatement = new EndStatement() { StartLocation = t.Location, EndLocation = t.EndLocation }; .) |
|
|
|
@ -3513,7 +3515,7 @@ ResumeStatement<out ResumeStatement resumeStatement> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 18.8.2 */ |
|
|
|
/* 18.8.2 */ |
|
|
|
CaseClauses<out List<CaseLabel> caseClauses> |
|
|
|
CaseClauses<.out List<CaseLabel> caseClauses.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
caseClauses = new List<CaseLabel>(); |
|
|
|
caseClauses = new List<CaseLabel>(); |
|
|
|
CaseLabel caseClause = null; |
|
|
|
CaseLabel caseClause = null; |
|
|
|
@ -3595,7 +3597,7 @@ TryStatement<out Statement tryStatement> |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* 10.10.1.2 */ |
|
|
|
/* 10.10.1.2 */ |
|
|
|
CatchClauses<out List<CatchClause> catchClauses> |
|
|
|
CatchClauses<.out List<CatchClause> catchClauses.> |
|
|
|
(. |
|
|
|
(. |
|
|
|
catchClauses = new List<CatchClause>(); |
|
|
|
catchClauses = new List<CatchClause>(); |
|
|
|
TypeReference type = null; |
|
|
|
TypeReference type = null; |
|
|
|
@ -3743,4 +3745,4 @@ PropertyAccessorAccessModifier<out Modifiers m> = |
|
|
|
)} |
|
|
|
)} |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
END VBNET. |
|
|
|
END VB . |