Changeset ec3f9c8 for src


Ignore:
Timestamp:
Jan 27, 2021, 9:19:37 AM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
d9e4d83
Parents:
352cbc2
Message:

formatting, update deprecated type-kind usage for new syntax

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r352cbc2 rec3f9c8  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jan 26 11:18:19 2021
    13 // Update Count     : 4674
     12// Last Modified On : Wed Jan 27 08:58:56 2021
     13// Update Count     : 4680
    1414//
    1515
     
    4141
    4242%{
    43 #define YYDEBUG_LEXER_TEXT (yylval)                                             // lexer loads this up each time
     43#define YYDEBUG_LEXER_TEXT( yylval )                                    // lexer loads this up each time
    4444#define YYDEBUG 1                                                                               // get the pretty debugging code to compile
    4545#define YYERROR_VERBOSE                                                                 // more information in syntax errors
     
    187187        ConstantExpr * constant = dynamic_cast<ConstantExpr *>(type->expr.get());
    188188        if ( constant && (constant->get_constant()->get_value() == "0" || constant->get_constant()->get_value() == "1") ) {
    189         type = new ExpressionNode( new CastExpr( maybeMoveBuild<Expression>(type), new BasicType( Type::Qualifiers(), BasicType::SignedInt ) ) );
     189                type = new ExpressionNode( new CastExpr( maybeMoveBuild<Expression>(type), new BasicType( Type::Qualifiers(), BasicType::SignedInt ) ) );
    190190        } // if
    191191        return new ForCtrl(
     
    12471247                { $$ = new StatementNode( build_computedgoto( $3 ) ); }
    12481248                // A semantic check is required to ensure fallthru appears only in the body of a choose statement.
    1249     | fall_through_name ';'                                                             // CFA
     1249        | fall_through_name ';'                                                         // CFA
    12501250                { $$ = new StatementNode( build_branch( BranchStmt::FallThrough ) ); }
    1251     | fall_through_name identifier_or_type_name ';'             // CFA
     1251        | fall_through_name identifier_or_type_name ';'         // CFA
    12521252                { $$ = new StatementNode( build_branch( $2, BranchStmt::FallThrough ) ); }
    12531253        | fall_through_name DEFAULT ';'                                         // CFA
     
    17391739
    17401740enum_specifier_nobody:                                                                  // type specifier - {...}
    1741                 // Preclude SUE declarations in restricted scopes:
    1742                 //
    1743                 //    int f( struct S { int i; } s1, Struct S s2 ) { struct S s3; ... }
    1744                 //
    1745                 // because it is impossible to call f due to name equivalence.
     1741                // Preclude SUE declarations in restricted scopes (see type_specifier_nobody)
    17461742        basic_type_specifier
    17471743        | sue_type_specifier_nobody
     
    24612457                {
    24622458                        typedefTable.addToScope( *$2, TYPEDEFname, "9" );
    2463                         if ( $1 == TypeDecl::Otype ) { SemanticError( yylloc, "otype keyword is deprecated" ); }
    2464                         if ( $1 == TypeDecl::Dtype ) { SemanticError( yylloc, "dtype keyword is deprecated" ); }
    2465                         if ( $1 == TypeDecl::Ttype ) { SemanticError( yylloc, "ttype keyword is deprecated" ); }
     2459                        if ( $1 == TypeDecl::Otype ) { SemanticError( yylloc, "otype keyword is deprecated, use T " ); }
     2460                        if ( $1 == TypeDecl::Dtype ) { SemanticError( yylloc, "dtype keyword is deprecated, use T &" ); }
     2461                        if ( $1 == TypeDecl::Ttype ) { SemanticError( yylloc, "ttype keyword is deprecated, use T ..." ); }
    24662462                }
    24672463          type_initializer_opt assertion_list_opt
Note: See TracChangeset for help on using the changeset viewer.