Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r24711a3 r15f769c  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Apr 26 18:41:54 2021
    13 // Update Count     : 4990
     12// Last Modified On : Sun Jun 20 18:46:51 2021
     13// Update Count     : 5023
    1414//
    1515
     
    269269%token INT128 UINT128 uuFLOAT80 uuFLOAT128                              // GCC
    270270%token uFLOAT16 uFLOAT32 uFLOAT32X uFLOAT64 uFLOAT64X uFLOAT128 // GCC
     271%token DECIMAL32 DECIMAL64 DECIMAL128                                   // GCC
    271272%token ZERO_T ONE_T                                                                             // CFA
    272273%token SIZEOF TYPEOF VALIST AUTO_TYPE                                   // GCC
     
    287288
    288289// names and constants: lexer differentiates between identifier and typedef names
    289 %token<tok> IDENTIFIER          QUOTED_IDENTIFIER       TYPEDEFname             TYPEGENname
     290%token<tok> IDENTIFIER          QUOTED_IDENTIFIER       TYPEDIMname             TYPEDEFname             TYPEGENname
    290291%token<tok> TIMEOUT                     WOR                                     CATCH                   RECOVER                 CATCHRESUME             FIXUP           FINALLY         // CFA
    291292%token<tok> INTEGERconstant     CHARACTERconstant       STRINGliteral
     
    586587        | quasi_keyword
    587588                { $$ = new ExpressionNode( build_varref( $1 ) ); }
     589        | TYPEDIMname                                                                           // CFA, generic length argument
     590                // { $$ = new ExpressionNode( new TypeExpr( maybeMoveBuildType( DeclarationNode::newFromTypedef( $1 ) ) ) ); }
     591                // { $$ = new ExpressionNode( build_varref( $1 ) ); }
     592                { $$ = new ExpressionNode( build_dimensionref( $1 ) ); }
    588593        | tuple
    589594        | '(' comma_expression ')'
     
    18871892        | uFLOAT128
    18881893                { $$ = DeclarationNode::newBasicType( DeclarationNode::uFloat128 ); }
     1894        | DECIMAL32
     1895                { SemanticError( yylloc, "_Decimal32 is currently unimplemented." ); $$ = nullptr; }
     1896        | DECIMAL64
     1897                { SemanticError( yylloc, "_Decimal64 is currently unimplemented." ); $$ = nullptr; }
     1898        | DECIMAL128
     1899                { SemanticError( yylloc, "_Decimal128 is currently unimplemented." ); $$ = nullptr; }
    18891900        | COMPLEX                                                                                       // C99
    18901901                { $$ = DeclarationNode::newComplexType( DeclarationNode::Complex ); }
     
    25352546        | '[' identifier_or_type_name ']'
    25362547                {
    2537                         typedefTable.addToScope( *$2, TYPEDEFname, "9" );
    2538                         $$ = DeclarationNode::newTypeParam( TypeDecl::ALtype, $2 );
     2548                        typedefTable.addToScope( *$2, TYPEDIMname, "9" );
     2549                        $$ = DeclarationNode::newTypeParam( TypeDecl::Dimension, $2 );
    25392550                }
    25402551        // | type_specifier identifier_parameter_declarator
     
    25902601                { $$ = new ExpressionNode( new TypeExpr( maybeMoveBuildType( $1 ) ) ); }
    25912602        | assignment_expression
    2592                 { SemanticError( yylloc, toString("Expression generic parameters are currently unimplemented: ", $1->build()) ); $$ = nullptr; }
    25932603        | type_list ',' type
    25942604                { $$ = (ExpressionNode *)($1->set_last( new ExpressionNode( new TypeExpr( maybeMoveBuildType( $3 ) ) ) )); }
    25952605        | type_list ',' assignment_expression
    2596                 { SemanticError( yylloc, toString("Expression generic parameters are currently unimplemented: ", $3->build()) ); $$ = nullptr; }
    2597                 // { $$ = (ExpressionNode *)( $1->set_last( $3 )); }
     2606                { $$ = (ExpressionNode *)( $1->set_last( $3 )); }
    25982607        ;
    25992608
Note: See TracChangeset for help on using the changeset viewer.