Ignore:
Timestamp:
Mar 3, 2017, 10:12:02 PM (8 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, resolv-new, with_gc
Children:
8191203
Parents:
f37147b
Message:

first attempt to create function specifiers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    rf37147b rdd020c0  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Feb 28 09:58:10 2017
    13 // Update Count     : 2208
     12// Last Modified On : Fri Mar  3 21:35:28 2017
     13// Update Count     : 2222
    1414//
    1515
     
    14001400type_qualifier_name:
    14011401        CONST
    1402                 { $$ = DeclarationNode::newQualifier( DeclarationNode::Const ); }
     1402                { $$ = DeclarationNode::newTypeQualifier( DeclarationNode::Const ); }
    14031403        | RESTRICT
    1404                 { $$ = DeclarationNode::newQualifier( DeclarationNode::Restrict ); }
     1404                { $$ = DeclarationNode::newTypeQualifier( DeclarationNode::Restrict ); }
    14051405        | VOLATILE
    1406                 { $$ = DeclarationNode::newQualifier( DeclarationNode::Volatile ); }
     1406                { $$ = DeclarationNode::newTypeQualifier( DeclarationNode::Volatile ); }
    14071407        | LVALUE                                                                                        // CFA
    1408                 { $$ = DeclarationNode::newQualifier( DeclarationNode::Lvalue ); }
     1408                { $$ = DeclarationNode::newTypeQualifier( DeclarationNode::Lvalue ); }
    14091409        | ATOMIC
    1410                 { $$ = DeclarationNode::newQualifier( DeclarationNode::Atomic ); }
     1410                { $$ = DeclarationNode::newTypeQualifier( DeclarationNode::Atomic ); }
    14111411        | FORALL '('
    14121412                {
     
    14481448        | REGISTER
    14491449                { $$ = DeclarationNode::newStorageClass( DeclarationNode::Register ); }
    1450         | INLINE                                                                                        // C99
    1451                 //{ $$ = DeclarationNode::newStorageClass( DeclarationNode::Inline ); }
    1452                 { $$ = new DeclarationNode; $$->isInline = true; }
    1453         | FORTRAN                                                                                       // C99
    1454                 { $$ = DeclarationNode::newStorageClass( DeclarationNode::Fortran ); }
    1455         | NORETURN                                                                                      // C11
    1456                 //{ $$ = DeclarationNode::newStorageClass( DeclarationNode::Noreturn ); }
    1457                 { $$ = new DeclarationNode; $$->isNoreturn = true; }
    14581450        | THREADLOCAL                                                                           // C11
    14591451                { $$ = DeclarationNode::newStorageClass( DeclarationNode::Threadlocal ); }
     1452                // Put function specifiers here to simplify parsing rules, but separate them semantically.
     1453        | INLINE                                                                                        // C99
     1454                { $$ = DeclarationNode::newFuncSpecifier( DeclarationNode::Inline ); }
     1455        | FORTRAN                                                                                       // C99
     1456                { $$ = DeclarationNode::newFuncSpecifier( DeclarationNode::Fortran ); }
     1457        | NORETURN                                                                                      // C11
     1458                { $$ = DeclarationNode::newFuncSpecifier( DeclarationNode::Noreturn ); }
    14601459        ;
    14611460
Note: See TracChangeset for help on using the changeset viewer.