Changeset c0a33d2


Ignore:
Timestamp:
May 24, 2018, 6:02:05 PM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
ef3403c6
Parents:
1dc58fd
Message:

intermediate updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r1dc58fd rc0a33d2  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 22 08:41:57 2018
    13 // Update Count     : 3353
     12// Last Modified On : Thu May 24 16:49:58 2018
     13// Update Count     : 3367
    1414//
    1515
     
    837837//      '[' push assignment_expression pop ']'
    838838//              { $$ = new ExpressionNode( build_tuple( $3 ) ); }
    839         '[' ',' tuple_expression_list ']'
    840                 { $$ = new ExpressionNode( build_tuple( (ExpressionNode *)(new ExpressionNode( nullptr ) )->set_last( $3 ) ) ); }
    841         | '[' assignment_expression ',' tuple_expression_list ']'
    842                 { $$ = new ExpressionNode( build_tuple( (ExpressionNode *)$2->set_last( $4 ) ) ); }
     839        '[' push ',' tuple_expression_list pop ']'
     840                { $$ = new ExpressionNode( build_tuple( (ExpressionNode *)(new ExpressionNode( nullptr ) )->set_last( $4 ) ) ); }
     841        | '[' push assignment_expression ',' tuple_expression_list pop ']'
     842                { $$ = new ExpressionNode( build_tuple( (ExpressionNode *)$3->set_last( $5 ) ) ); }
    843843        ;
    844844
     
    866866        labeled_statement
    867867        | compound_statement
    868         | expression_statement                                          { $$ = $1; }
     868        | expression_statement
    869869        | selection_statement
    870870        | iteration_statement
     
    11831183        type_specifier_nobody
    11841184        | type_specifier_nobody declarator
    1185                 {
    1186                         $$ = $2->addType( $1 );
    1187                 }
     1185                { $$ = $2->addType( $1 ); }
    11881186        | type_specifier_nobody variable_abstract_declarator
    11891187                { $$ = $2->addType( $1 ); }
    11901188        | cfa_abstract_declarator_tuple no_attr_identifier      // CFA
    1191                 {
    1192                         $$ = $1->addName( $2 );
    1193                 }
     1189                { $$ = $1->addName( $2 ); }
    11941190        | cfa_abstract_declarator_tuple                                         // CFA
    11951191        ;
     
    13041300
    13051301local_label_list:                                                                               // GCC, local label
    1306         no_attr_identifier_or_type_name                         {}
    1307         | local_label_list ',' no_attr_identifier_or_type_name {}
     1302        no_attr_identifier_or_type_name
     1303        | local_label_list ',' no_attr_identifier_or_type_name
    13081304        ;
    13091305
     
    14001396                // type_specifier can resolve to just TYPEDEFname (e.g., typedef int T; int f( T );). Therefore this must be
    14011397                // flattened to allow lookahead to the '(' without having to reduce identifier_or_type_name.
    1402         cfa_abstract_tuple identifier_or_type_name '(' cfa_parameter_type_list_opt ')'
     1398        cfa_abstract_tuple identifier_or_type_name '(' push cfa_parameter_type_list_opt pop ')'
    14031399                // To obtain LR(1 ), this rule must be factored out from function return type (see cfa_abstract_declarator).
    1404                 { $$ = DeclarationNode::newFunction( $2, $1, $4, 0 ); }
    1405         | cfa_function_return identifier_or_type_name '(' cfa_parameter_type_list_opt ')'
    1406                 { $$ = DeclarationNode::newFunction( $2, $1, $4, 0 ); }
     1400                { $$ = DeclarationNode::newFunction( $2, $1, $5, 0 ); }
     1401        | cfa_function_return identifier_or_type_name '(' push cfa_parameter_type_list_opt pop ')'
     1402                { $$ = DeclarationNode::newFunction( $2, $1, $5, 0 ); }
    14071403        ;
    14081404
    14091405cfa_function_return:                                                                    // CFA
    1410         '[' cfa_parameter_list ']'
    1411                 { $$ = DeclarationNode::newTuple( $2 ); }
    1412         | '[' cfa_parameter_list ',' cfa_abstract_parameter_list ']'
     1406        '[' push cfa_parameter_list pop ']'
     1407                { $$ = DeclarationNode::newTuple( $3 ); }
     1408        | '[' push cfa_parameter_list pop ',' push cfa_abstract_parameter_list pop ']'
    14131409                // To obtain LR(1 ), the last cfa_abstract_parameter_list is added into this flattened rule to lookahead to the
    14141410                // ']'.
    1415                 { $$ = DeclarationNode::newTuple( $2->appendList( $4 ) ); }
     1411                { $$ = DeclarationNode::newTuple( $3->appendList( $7 ) ); }
    14161412        ;
    14171413
     
    15871583
    15881584forall:
    1589         FORALL '('
    1590                 {
    1591                         typedefTable.enterScope();
    1592                 }
    1593           type_parameter_list ')'                                                       // CFA
    1594                 {
    1595                         typedefTable.leaveScope();
    1596                         $$ = DeclarationNode::newForall( $4 );
    1597                 }
     1585        FORALL '(' push type_parameter_list pop ')'                                     // CFA
     1586                { $$ = DeclarationNode::newForall( $4 ); }
    15981587        ;
    15991588
     
    19701959        | cfa_abstract_parameter_list
    19711960        | cfa_parameter_list
    1972         | cfa_parameter_list ',' cfa_abstract_parameter_list
    1973                 { $$ = $1->appendList( $3 ); }
    1974         | cfa_abstract_parameter_list ',' ELLIPSIS
     1961        | cfa_parameter_list pop ',' push cfa_abstract_parameter_list
     1962                { $$ = $1->appendList( $5 ); }
     1963        | cfa_abstract_parameter_list pop ',' push ELLIPSIS
    19751964                { $$ = $1->addVarArgs(); }
    1976         | cfa_parameter_list ',' ELLIPSIS
     1965        | cfa_parameter_list pop ',' push ELLIPSIS
    19771966                { $$ = $1->addVarArgs(); }
    19781967        ;
     
    19821971                // factored out from cfa_parameter_list, flattening the rules to get lookahead to the ']'.
    19831972        cfa_parameter_declaration
    1984         | cfa_abstract_parameter_list ',' cfa_parameter_declaration
    1985                 { $$ = $1->appendList( $3 ); }
    1986         | cfa_parameter_list ',' cfa_parameter_declaration
    1987                 { $$ = $1->appendList( $3 ); }
    1988         | cfa_parameter_list ',' cfa_abstract_parameter_list ',' cfa_parameter_declaration
    1989                 { $$ = $1->appendList( $3 )->appendList( $5 ); }
     1973        | cfa_abstract_parameter_list pop ',' push cfa_parameter_declaration
     1974                { $$ = $1->appendList( $5 ); }
     1975        | cfa_parameter_list pop ',' push cfa_parameter_declaration
     1976                { $$ = $1->appendList( $5 ); }
     1977        | cfa_parameter_list pop ',' push cfa_abstract_parameter_list pop ',' push cfa_parameter_declaration
     1978                { $$ = $1->appendList( $5 )->appendList( $9 ); }
    19901979        ;
    19911980
    19921981cfa_abstract_parameter_list:                                                    // CFA, new & old style abstract
    19931982        cfa_abstract_parameter_declaration
    1994         | cfa_abstract_parameter_list ',' cfa_abstract_parameter_declaration
    1995                 { $$ = $1->appendList( $3 ); }
     1983        | cfa_abstract_parameter_list pop ',' push cfa_abstract_parameter_declaration
     1984                { $$ = $1->appendList( $5 ); }
    19961985        ;
    19971986
     
    21422131        '.' no_attr_identifier                                                          // C99, field name
    21432132                { $$ = new ExpressionNode( build_varref( $2 ) ); }
    2144         | '[' assignment_expression ']'                                         // C99, single array element
     2133        | '[' push assignment_expression pop ']'                        // C99, single array element
    21452134                // assignment_expression used instead of constant_expression because of shift/reduce conflicts with tuple.
    2146                 { $$ = $2; }
    2147         | '[' subrange ']'                                                                      // CFA, multiple array elements
    2148                 { $$ = $2; }
    2149         | '[' constant_expression ELLIPSIS constant_expression ']' // GCC, multiple array elements
    2150                 { $$ = new ExpressionNode( new RangeExpr( maybeMoveBuild< Expression >( $2 ), maybeMoveBuild< Expression >( $4 ) ) ); }
    2151         | '.' '[' field_list ']'                                                        // CFA, tuple field selector
    21522135                { $$ = $3; }
     2136        | '[' push subrange pop ']'                                                     // CFA, multiple array elements
     2137                { $$ = $3; }
     2138        | '[' push constant_expression ELLIPSIS constant_expression pop ']' // GCC, multiple array elements
     2139                { $$ = new ExpressionNode( new RangeExpr( maybeMoveBuild< Expression >( $3 ), maybeMoveBuild< Expression >( $5 ) ) ); }
     2140        | '.' '[' push field_list pop ']'                                       // CFA, tuple field selector
     2141                { $$ = $4; }
    21532142        ;
    21542143
     
    22882277cfa_trait_declaring_list:                                                               // CFA
    22892278        cfa_variable_specifier
    2290                 { $$ = $1; }
    22912279        | cfa_function_specifier
    2292                 { $$ = $1; }
    22932280        | cfa_trait_declaring_list pop ',' push identifier_or_type_name
    22942281                { $$ = $1->appendList( $1->cloneType( $5 ) ); }
     
    23492336                }
    23502337        | type_qualifier_list
    2351                 {
    2352                         if ( $1->type->forall ) xxx = forall = true; // remember generic type
    2353                 }
     2338                { if ( $1->type->forall ) xxx = forall = true; } // remember generic type
    23542339          push '{' external_definition_list '}'                         // CFA, namespace
    23552340                {
     
    23642349                }
    23652350        | declaration_qualifier_list
    2366                 {
    2367                         if ( $1->type->forall ) xxx = forall = true; // remember generic type
    2368                 }
     2351                { if ( $1->type->forall ) xxx = forall = true; } // remember generic type
    23692352          push '{' external_definition_list '}'                         // CFA, namespace
    23702353                {
     
    24062389                // declaration must still have a type_specifier.  OBSOLESCENT (see 1)
    24072390        | function_declarator compound_statement
    2408                 {
    2409                         typedefTable.leaveScope();
    2410                         $$ = $1->addFunctionBody( $2 );
    2411                 }
     2391                { $$ = $1->addFunctionBody( $2 ); }
    24122392        | KR_function_declarator KR_declaration_list_opt compound_statement
    2413                 {
    2414                         typedefTable.leaveScope();
    2415                         $$ = $1->addOldDeclList( $2 )->addFunctionBody( $3 );
    2416                 }
     2393                { $$ = $1->addOldDeclList( $2 )->addFunctionBody( $3 ); }
    24172394        ;
    24182395
     
    24272404        cfa_function_declaration with_clause_opt compound_statement     // CFA
    24282405                {
    2429                         typedefTable.leaveScope();
    24302406                        // Add the function body to the last identifier in the function definition list, i.e., foo3:
    24312407                        //   [const double] foo1(), foo2( int ), foo3( double ) { return 3.0; }
     
    24362412                {
    24372413                        rebindForall( $1, $2 );
    2438                         typedefTable.leaveScope();
    24392414                        $$ = $2->addFunctionBody( $4, $3 )->addType( $1 );
    24402415                }
     
    24422417                {
    24432418                        rebindForall( $1, $2 );
    2444                         typedefTable.leaveScope();
    24452419                        $$ = $2->addFunctionBody( $4, $3 )->addType( $1 );
    24462420                }
    24472421                // handles default int return type, OBSOLESCENT (see 1)
    24482422        | type_qualifier_list function_declarator with_clause_opt compound_statement
    2449                 {
    2450                         typedefTable.leaveScope();
    2451                         $$ = $2->addFunctionBody( $4, $3 )->addQualifiers( $1 );
    2452                 }
     2423                { $$ = $2->addFunctionBody( $4, $3 )->addQualifiers( $1 ); }
    24532424                // handles default int return type, OBSOLESCENT (see 1)
    24542425        | declaration_qualifier_list function_declarator with_clause_opt compound_statement
    2455                 {
    2456                         typedefTable.leaveScope();
    2457                         $$ = $2->addFunctionBody( $4, $3 )->addQualifiers( $1 );
    2458                 }
     2426                { $$ = $2->addFunctionBody( $4, $3 )->addQualifiers( $1 ); }
    24592427                // handles default int return type, OBSOLESCENT (see 1)
    24602428        | declaration_qualifier_list type_qualifier_list function_declarator with_clause_opt compound_statement
    2461                 {
    2462                         typedefTable.leaveScope();
    2463                         $$ = $3->addFunctionBody( $5, $4 )->addQualifiers( $2 )->addQualifiers( $1 );
    2464                 }
     2429                { $$ = $3->addFunctionBody( $5, $4 )->addQualifiers( $2 )->addQualifiers( $1 ); }
    24652430
    24662431                // Old-style K&R function definition, OBSOLESCENT (see 4)
     
    24682433                {
    24692434                        rebindForall( $1, $2 );
    2470                         typedefTable.leaveScope();
    24712435                        $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addType( $1 );
    24722436                }
    24732437                // handles default int return type, OBSOLESCENT (see 1)
    24742438        | type_qualifier_list KR_function_declarator KR_declaration_list_opt with_clause_opt compound_statement
    2475                 {
    2476                         typedefTable.leaveScope();
    2477                         $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addQualifiers( $1 );
    2478                 }
     2439                { $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addQualifiers( $1 ); }
    24792440                // handles default int return type, OBSOLESCENT (see 1)
    24802441        | declaration_qualifier_list KR_function_declarator KR_declaration_list_opt with_clause_opt compound_statement
    2481                 {
    2482                         typedefTable.leaveScope();
    2483                         $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addQualifiers( $1 );
    2484                 }
     2442                { $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addQualifiers( $1 ); }
    24852443                // handles default int return type, OBSOLESCENT (see 1)
    24862444        | declaration_qualifier_list type_qualifier_list KR_function_declarator KR_declaration_list_opt with_clause_opt compound_statement
    2487                 {
    2488                         typedefTable.leaveScope();
    2489                         $$ = $3->addOldDeclList( $4 )->addFunctionBody( $6, $5 )->addQualifiers( $2 )->addQualifiers( $1 );
    2490                 }
     2445                { $$ = $3->addOldDeclList( $4 )->addFunctionBody( $6, $5 )->addQualifiers( $2 )->addQualifiers( $1 ); }
    24912446        ;
    24922447
     
    26852640        paren_identifier '(' identifier_list ')'                        // function_declarator handles empty parameter
    26862641                { $$ = $1->addIdList( $3 ); }
    2687         | '(' KR_function_ptr ')' '(' parameter_type_list_opt ')'
    2688                 { $$ = $2->addParamList( $5 ); }
     2642        | '(' KR_function_ptr ')' '(' push parameter_type_list_opt pop ')'
     2643                { $$ = $2->addParamList( $6 ); }
    26892644        | '(' KR_function_no_ptr ')'                                            // redundant parenthesis
    26902645                { $$ = $2; }
     
    28042759
    28052760identifier_parameter_function:
    2806         paren_identifier '(' parameter_type_list_opt ')'        // empty parameter list OBSOLESCENT (see 3)
    2807                 { $$ = $1->addParamList( $3 ); }
    2808         | '(' identifier_parameter_ptr ')' '(' parameter_type_list_opt ')' // empty parameter list OBSOLESCENT (see 3)
    2809                 { $$ = $2->addParamList( $5 ); }
     2761        paren_identifier '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3)
     2762                { $$ = $1->addParamList( $4 ); }
     2763        | '(' identifier_parameter_ptr ')' '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3)
     2764                { $$ = $2->addParamList( $6 ); }
    28102765        | '(' identifier_parameter_function ')'                         // redundant parenthesis
    28112766                { $$ = $2; }
     
    28572812
    28582813type_parameter_function:
    2859         typedef '(' parameter_type_list_opt ')'                         // empty parameter list OBSOLESCENT (see 3)
    2860                 { $$ = $1->addParamList( $3 ); }
    2861         | '(' type_parameter_ptr ')' '(' parameter_type_list_opt ')' // empty parameter list OBSOLESCENT (see 3)
    2862                 { $$ = $2->addParamList( $5 ); }
     2814        typedef '(' push parameter_type_list_opt pop ')'        // empty parameter list OBSOLESCENT (see 3)
     2815                { $$ = $1->addParamList( $4 ); }
     2816        | '(' type_parameter_ptr ')' '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3)
     2817                { $$ = $2->addParamList( $6 ); }
    28632818        ;
    28642819
     
    29072862
    29082863abstract_function:
    2909         '(' parameter_type_list_opt ')'                                         // empty parameter list OBSOLESCENT (see 3)
    2910                 { $$ = DeclarationNode::newFunction( nullptr, nullptr, $2, nullptr ); }
    2911         | '(' abstract_ptr ')' '(' parameter_type_list_opt ')' // empty parameter list OBSOLESCENT (see 3)
    2912                 { $$ = $2->addParamList( $5 ); }
     2864        '(' push parameter_type_list_opt pop ')'                        // empty parameter list OBSOLESCENT (see 3)
     2865                { $$ = DeclarationNode::newFunction( nullptr, nullptr, $3, nullptr ); }
     2866        | '(' abstract_ptr ')' '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3)
     2867                { $$ = $2->addParamList( $6 ); }
    29132868        | '(' abstract_function ')'                                                     // redundant parenthesis
    29142869                { $$ = $2; }
     
    29252880
    29262881multi_array_dimension:
    2927         '[' assignment_expression ']'
    2928                 { $$ = DeclarationNode::newArray( $2, 0, false ); }
    2929         | '[' '*' ']'                                                                           // C99
     2882        '[' push assignment_expression pop ']'
     2883                { $$ = DeclarationNode::newArray( $3, 0, false ); }
     2884        | '[' push '*' pop ']'                                                          // C99
    29302885                { $$ = DeclarationNode::newVarArray( 0 ); }
    2931         | multi_array_dimension '[' assignment_expression ']'
    2932                 { $$ = $1->addArray( DeclarationNode::newArray( $3, 0, false ) ); }
    2933         | multi_array_dimension '[' '*' ']'                                     // C99
     2886        | multi_array_dimension '[' push assignment_expression pop ']'
     2887                { $$ = $1->addArray( DeclarationNode::newArray( $4, 0, false ) ); }
     2888        | multi_array_dimension '[' push '*' pop ']'            // C99
    29342889                { $$ = $1->addArray( DeclarationNode::newVarArray( 0 ) ); }
    29352890        ;
     
    29982953
    29992954abstract_parameter_function:
    3000         '(' parameter_type_list_opt ')'                                         // empty parameter list OBSOLESCENT (see 3)
    3001                 { $$ = DeclarationNode::newFunction( nullptr, nullptr, $2, nullptr ); }
    3002         | '(' abstract_parameter_ptr ')' '(' parameter_type_list_opt ')' // empty parameter list OBSOLESCENT (see 3)
    3003                 { $$ = $2->addParamList( $5 ); }
     2955        '(' push parameter_type_list_opt pop ')'                        // empty parameter list OBSOLESCENT (see 3)
     2956                { $$ = DeclarationNode::newFunction( nullptr, nullptr, $3, nullptr ); }
     2957        | '(' abstract_parameter_ptr ')' '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3)
     2958                { $$ = $2->addParamList( $6 ); }
    30042959        | '(' abstract_parameter_function ')'                           // redundant parenthesis
    30052960                { $$ = $2; }
     
    30232978                { $$ = DeclarationNode::newArray( 0, 0, false ); }
    30242979        // multi_array_dimension handles the '[' '*' ']' case
    3025         | '[' type_qualifier_list '*' ']'                                       // remaining C99
    3026                 { $$ = DeclarationNode::newVarArray( $2 ); }
    3027         | '[' type_qualifier_list ']'
    3028                 { $$ = DeclarationNode::newArray( 0, $2, false ); }
     2980        | '[' push type_qualifier_list '*' pop ']'                      // remaining C99
     2981                { $$ = DeclarationNode::newVarArray( $3 ); }
     2982        | '[' push type_qualifier_list pop ']'
     2983                { $$ = DeclarationNode::newArray( 0, $3, false ); }
    30292984        // multi_array_dimension handles the '[' assignment_expression ']' case
    3030         | '[' type_qualifier_list assignment_expression ']'
    3031                 { $$ = DeclarationNode::newArray( $3, $2, false ); }
    3032         | '[' STATIC type_qualifier_list_opt assignment_expression ']'
    3033                 { $$ = DeclarationNode::newArray( $4, $3, true ); }
    3034         | '[' type_qualifier_list STATIC assignment_expression ']'
    3035                 { $$ = DeclarationNode::newArray( $4, $2, true ); }
     2985        | '[' push type_qualifier_list assignment_expression pop ']'
     2986                { $$ = DeclarationNode::newArray( $4, $3, false ); }
     2987        | '[' push STATIC type_qualifier_list_opt assignment_expression pop ']'
     2988                { $$ = DeclarationNode::newArray( $5, $4, true ); }
     2989        | '[' push type_qualifier_list STATIC assignment_expression pop ']'
     2990                { $$ = DeclarationNode::newArray( $5, $3, true ); }
    30362991        ;
    30372992
     
    30773032
    30783033variable_abstract_function:
    3079         '(' variable_abstract_ptr ')' '(' parameter_type_list_opt ')' // empty parameter list OBSOLESCENT (see 3)
    3080                 { $$ = $2->addParamList( $5 ); }
     3034        '(' variable_abstract_ptr ')' '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3)
     3035                { $$ = $2->addParamList( $6 ); }
    30813036        | '(' variable_abstract_function ')'                            // redundant parenthesis
    30823037                { $$ = $2; }
     
    31413096
    31423097cfa_array_parameter_1st_dimension:
    3143         '[' type_qualifier_list '*' ']'                                         // remaining C99
    3144                 { $$ = DeclarationNode::newVarArray( $2 ); }
    3145         | '[' type_qualifier_list assignment_expression ']'
    3146                 { $$ = DeclarationNode::newArray( $3, $2, false ); }
    3147         | '[' declaration_qualifier_list assignment_expression ']'
     3098        '[' push type_qualifier_list '*' pop ']'                        // remaining C99
     3099                { $$ = DeclarationNode::newVarArray( $3 ); }
     3100        | '[' push type_qualifier_list assignment_expression pop ']'
     3101                { $$ = DeclarationNode::newArray( $4, $3, false ); }
     3102        | '[' push declaration_qualifier_list assignment_expression pop ']'
    31483103                // declaration_qualifier_list must be used because of shift/reduce conflict with
    31493104                // assignment_expression, so a semantic check is necessary to preclude them as a type_qualifier cannot
    31503105                // appear in this context.
    3151                 { $$ = DeclarationNode::newArray( $3, $2, true ); }
    3152         | '[' declaration_qualifier_list type_qualifier_list assignment_expression ']'
    3153                 { $$ = DeclarationNode::newArray( $4, $3->addQualifiers( $3 ), true ); }
     3106                { $$ = DeclarationNode::newArray( $4, $3, true ); }
     3107        | '[' push declaration_qualifier_list type_qualifier_list assignment_expression pop ']'
     3108                { $$ = DeclarationNode::newArray( $5, $4->addQualifiers( $3 ), true ); }
    31543109        ;
    31553110
     
    32203175
    32213176cfa_abstract_tuple:                                                                             // CFA
    3222         '[' cfa_abstract_parameter_list ']'
    3223                 { $$ = DeclarationNode::newTuple( $2 ); }
     3177        '[' push cfa_abstract_parameter_list pop ']'
     3178                { $$ = DeclarationNode::newTuple( $3 ); }
    32243179        ;
    32253180
     
    32273182//      '[' ']' '(' cfa_parameter_type_list_opt ')'
    32283183//              { $$ = DeclarationNode::newFunction( nullptr, DeclarationNode::newTuple( nullptr ), $4, nullptr ); }
    3229         cfa_abstract_tuple '(' cfa_parameter_type_list_opt ')'
    3230                 { $$ = DeclarationNode::newFunction( nullptr, $1, $3, nullptr ); }
    3231         | cfa_function_return '(' cfa_parameter_type_list_opt ')'
    3232                 { $$ = DeclarationNode::newFunction( nullptr, $1, $3, nullptr ); }
     3184        cfa_abstract_tuple '(' push cfa_parameter_type_list_opt pop ')'
     3185                { $$ = DeclarationNode::newFunction( nullptr, $1, $4, nullptr ); }
     3186        | cfa_function_return '(' push cfa_parameter_type_list_opt pop ')'
     3187                { $$ = DeclarationNode::newFunction( nullptr, $1, $4, nullptr ); }
    32333188        ;
    32343189
Note: See TracChangeset for help on using the changeset viewer.