@@ -314,8 +314,7 @@ void parserInitState()
314314%type type { struct type_either }
315315
316316%type cardinality_op { struct upper_lower }
317- %type index_spec { struct upper_lower }
318- %type limit_spec { struct upper_lower }
317+ %type bound_spec { struct upper_lower }
319318
320319%type inverse_attr { Variable }
321320%type derived_attribute { Variable }
@@ -524,7 +523,7 @@ alias_push_scope ::= /* subroutine */.
524523 PUSH_SCOPE (s, (Symbol *)0 , OBJ_ALIAS);
525524}
526525
527- array_type (A) ::= TOK_ARRAY index_spec (B) TOK_OF optional_or_unique(C)
526+ array_type (A) ::= TOK_ARRAY bound_spec (B) TOK_OF optional_or_unique(C)
528527 attribute_type(D).
529528{
530529 A = TYPEBODYcreate (array_);
@@ -578,7 +577,7 @@ explicit_attr_list(A) ::= explicit_attr_list(B) explicit_attribute(C).
578577 LISTadd_last (A, (Generic)C);
579578}
580579
581- bag_type (A) ::= TOK_BAG limit_spec (B) TOK_OF attribute_type(C).
580+ bag_type (A) ::= TOK_BAG bound_spec (B) TOK_OF attribute_type(C).
582581{
583582 A = TYPEBODYcreate (bag_);
584583 A->base = C;
@@ -1253,7 +1252,7 @@ conformant_aggregation(A) ::= TOK_ARRAY TOK_OF optional_or_unique(B)
12531252 A->flags .unique = B.unique ;
12541253 A->base = C;
12551254}
1256- conformant_aggregation (A) ::= TOK_ARRAY index_spec (B) TOK_OF
1255+ conformant_aggregation (A) ::= TOK_ARRAY bound_spec (B) TOK_OF
12571256 optional_or_unique(C) parameter_type(D).
12581257{
12591258 A = TYPEBODYcreate (array_);
@@ -1269,7 +1268,7 @@ conformant_aggregation(A) ::= TOK_BAG TOK_OF parameter_type(B).
12691268 A->base = B;
12701269
12711270}
1272- conformant_aggregation (A) ::= TOK_BAG index_spec (B) TOK_OF parameter_type(C).
1271+ conformant_aggregation (A) ::= TOK_BAG bound_spec (B) TOK_OF parameter_type(C).
12731272{
12741273 A = TYPEBODYcreate (bag_);
12751274 A->base = C;
@@ -1283,7 +1282,7 @@ conformant_aggregation(A) ::= TOK_LIST TOK_OF unique(B) parameter_type(C).
12831282 A->base = C;
12841283
12851284}
1286- conformant_aggregation (A) ::= TOK_LIST index_spec (B) TOK_OF unique(C)
1285+ conformant_aggregation (A) ::= TOK_LIST bound_spec (B) TOK_OF unique(C)
12871286 parameter_type(D).
12881287{
12891288 A = TYPEBODYcreate (list_);
@@ -1297,7 +1296,7 @@ conformant_aggregation(A) ::= TOK_SET TOK_OF parameter_type(B).
12971296 A = TYPEBODYcreate (set_);
12981297 A->base = B;
12991298}
1300- conformant_aggregation (A) ::= TOK_SET index_spec (B) TOK_OF parameter_type(C).
1299+ conformant_aggregation (A) ::= TOK_SET bound_spec (B) TOK_OF parameter_type(C).
13011300{
13021301 A = TYPEBODYcreate (set_);
13031302 A->base = C;
@@ -1386,13 +1385,6 @@ increment_control ::= TOK_IDENTIFIER(A) TOK_ASSIGNMENT expression(B) TOK_TO
13861385 PUSH_SCOPE (i, (Symbol *)0 , OBJ_INCREMENT);
13871386}
13881387
1389- index_spec (A) ::= TOK_LEFT_BRACKET expression(B) TOK_COLON expression(C)
1390- TOK_RIGHT_BRACKET.
1391- {
1392- A.lower_limit = B;
1393- A.upper_limit = C;
1394- }
1395-
13961388initializer (A) ::= TOK_ASSIGNMENT expression(B).
13971389{
13981390 A = B;
@@ -1497,15 +1489,15 @@ set_or_bag_of_entity(A) ::= TOK_SET TOK_OF defined_type(B).
14971489 A.body ->base = B;
14981490
14991491}
1500- set_or_bag_of_entity (A) ::= TOK_SET limit_spec (B) TOK_OF defined_type(C).
1492+ set_or_bag_of_entity (A) ::= TOK_SET bound_spec (B) TOK_OF defined_type(C).
15011493{
15021494 A.type = 0 ;
15031495 A.body = TYPEBODYcreate (set_);
15041496 A.body ->base = C;
15051497 A.body ->upper = B.upper_limit ;
15061498 A.body ->lower = B.lower_limit ;
15071499}
1508- set_or_bag_of_entity (A) ::= TOK_BAG limit_spec (B) TOK_OF defined_type(C).
1500+ set_or_bag_of_entity (A) ::= TOK_BAG bound_spec (B) TOK_OF defined_type(C).
15091501{
15101502 A.type = 0 ;
15111503 A.body = TYPEBODYcreate (bag_);
@@ -1560,14 +1552,15 @@ inverse_clause(A) ::= TOK_INVERSE inverse_attr_list(B).
15601552 A = B;
15611553}
15621554
1563- limit_spec (A) ::= TOK_LEFT_BRACKET expression(B) TOK_COLON expression(C)
1555+ /* 10303-11:2004 production 185 bound_spec = '[' bound_1 ':' bound_2 ']' . */
1556+ bound_spec (A) ::= TOK_LEFT_BRACKET expression(B) TOK_COLON expression(C)
15641557 TOK_RIGHT_BRACKET.
15651558{
15661559 A.lower_limit = B;
15671560 A.upper_limit = C;
15681561}
15691562
1570- list_type (A) ::= TOK_LIST limit_spec (B) TOK_OF unique(C) attribute_type(D).
1563+ list_type (A) ::= TOK_LIST bound_spec (B) TOK_OF unique(C) attribute_type(D).
15711564{
15721565 A = TYPEBODYcreate (list_);
15731566 A->base = D;
@@ -1845,12 +1838,16 @@ qualifier(A) ::= TOK_BACKSLASH TOK_IDENTIFIER(B). [TOK_NOT]
18451838 A.expr ->e .op2 ->symbol = *B.symbol ;
18461839 SYMBOL_destroy (B.symbol );
18471840}
1841+
1842+ /* 10303-11:2004 production 239 index_qualifier = '[' index_1 [ ':' index_2 ] ']' . */
18481843qualifier (A) ::= TOK_LEFT_BRACKET simple_expression(B) TOK_RIGHT_BRACKET.
18491844{
18501845 A.expr = A.first = BIN_EXPcreate (OP_ARRAY_ELEMENT, (Expression)0 ,
18511846 (Expression)0 );
18521847 A.expr ->e .op2 = B;
18531848}
1849+
1850+ /* 10303-11:2004 production 239 index_qualifier = '[' index_1 [ ':' index_2 ] ']' . */
18541851qualifier (A) ::= TOK_LEFT_BRACKET simple_expression(B) TOK_COLON
18551852 simple_expression(C) TOK_RIGHT_BRACKET.
18561853{
@@ -2056,7 +2053,7 @@ semicolon ::= TOK_SEMICOLON.
20562053 yyerrok;
20572054}
20582055
2059- set_type (A) ::= TOK_SET limit_spec (B) TOK_OF attribute_type(C).
2056+ set_type (A) ::= TOK_SET bound_spec (B) TOK_OF attribute_type(C).
20602057{
20612058 A = TYPEBODYcreate (set_);
20622059 A->base = C;
0 commit comments