@@ -467,7 +467,9 @@ constSection : (CONST<ConstSectionNodeImpl>^ | RESOURCESTRING<Co
467467 // example: " const {$include versioninfo.inc}"
468468 // Is this really the appropriate solution?
469469 ;
470- constDeclaration : attributeList? nameDeclaration (' :' varType)? ' =' constExpression portabilityDirective* ' ;'
470+ constDeclaration : attributeList? nameDeclaration ' :' fixedArrayType ' =' arrayExpression portabilityDirective* ' ;'
471+ -> ^ (TkConstDeclaration< ConstDeclarationNodeImpl> nameDeclaration arrayExpression fixedArrayType attributeList? portabilityDirective* )
472+ | attributeList? nameDeclaration (' :' varType)? ' =' constExpression portabilityDirective* ' ;'
471473 -> ^ (TkConstDeclaration< ConstDeclarationNodeImpl> nameDeclaration constExpression varType? attributeList? portabilityDirective* )
472474 ;
473475typeSection : TYPE< TypeSectionNodeImpl>^ typeDeclaration+
@@ -479,9 +481,14 @@ typeDeclaration : attributeList? genericNameDeclaration '=' typeDec
479481 ;
480482varSection : (VAR< VarSectionNodeImpl>^ | THREADVAR< VarSectionNodeImpl>^ ) varDeclaration varDeclaration*
481483 ;
482- varDeclaration : attributeList? nameDeclarationList ' :' varType portabilityDirective* varValueSpec? portabilityDirective* ' ;'
484+ varDeclaration : attributeList? nameDeclarationList ' :' fixedArrayType portabilityDirective* arrayVarValueSpec? portabilityDirective* ' ;'
485+ -> ^ (TkVarDeclaration< VarDeclarationNodeImpl> nameDeclarationList fixedArrayType arrayVarValueSpec? attributeList?)
486+ | attributeList? nameDeclarationList ' :' varType portabilityDirective* varValueSpec? portabilityDirective* ' ;'
483487 -> ^ (TkVarDeclaration< VarDeclarationNodeImpl> nameDeclarationList varType varValueSpec? attributeList?)
484488 ;
489+ arrayVarValueSpec : ABSOLUTE expression
490+ | ' =' arrayExpression
491+ ;
485492varValueSpec : ABSOLUTE expression
486493 | ' =' constExpression
487494 ;
@@ -531,6 +538,9 @@ parameterType : stringType
531538 | typeReference
532539 | PACKED parameterType^
533540 ;
541+ fixedArrayType : ARRAY arrayIndices OF arrayElementType
542+ -> ^ (ARRAY< ArrayTypeNodeImpl> OF arrayElementType arrayIndices )
543+ ;
534544arrayType : ARRAY arrayIndices? OF arrayElementType
535545 -> ^ (ARRAY< ArrayTypeNodeImpl> OF arrayElementType arrayIndices? )
536546 ;
0 commit comments