Changeset a9b657a for src/Parser


Ignore:
Timestamp:
Mar 10, 2017, 11:01:31 AM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
dc0557d
Parents:
c857ad3 (diff), 149d297 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc

Location:
src/Parser
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/Parser/DeclarationNode.cc

    rc857ad3 ra9b657a  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar  7 08:02:09 2017
    13 // Update Count     : 936
     12// Last Modified On : Tue Mar  7 17:28:56 2017
     13// Update Count     : 937
    1414//
    1515
     
    359359        DeclarationNode * newnode = new DeclarationNode;
    360360        newnode->type = new TypeData( TypeData::Pointer );
    361         return newnode->addQualifiers( qualifiers );
     361        if ( qualifiers ) {
     362                return newnode->addQualifiers( qualifiers );
     363        } else {
     364                return newnode;
     365        } // if
    362366} // DeclarationNode::newPointer
    363367
  • TabularUnified src/Parser/TypeData.h

    rc857ad3 ra9b657a  
    1010// Created On       : Sat May 16 15:18:36 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar  7 08:03:53 2017
    13 // Update Count     : 173
     12// Last Modified On : Wed Mar  8 22:28:33 2017
     13// Update Count     : 174
    1414//
    1515
     
    7676        DeclarationNode::Length length = DeclarationNode::NoLength;
    7777        DeclarationNode::BuiltinType builtintype = DeclarationNode::NoBuiltinType;
     78
    7879        typedef std::bitset< DeclarationNode::NoTypeQualifier > TypeQualifiers;
    7980        TypeQualifiers typeQualifiers;
    8081        DeclarationNode * forall;
    8182
    82                 // Basic_t basic;
    83                 Aggregate_t aggregate;
    84                 AggInst_t aggInst;
    85                 Array_t array;
    86                 Enumeration_t enumeration;
    87                 // Variable_t variable;
    88                 Function_t function;
    89                 Symbolic_t symbolic;
    90                 DeclarationNode * tuple;
    91                 ExpressionNode * typeexpr;
    92                 // DeclarationNode::BuiltinType builtin;
     83        // Basic_t basic;
     84        Aggregate_t aggregate;
     85        AggInst_t aggInst;
     86        Array_t array;
     87        Enumeration_t enumeration;
     88        // Variable_t variable;
     89        Function_t function;
     90        Symbolic_t symbolic;
     91        DeclarationNode * tuple;
     92        ExpressionNode * typeexpr;
    9393
    9494        TypeData( Kind k = Unknown );
  • TabularUnified src/Parser/lex.ll

    rc857ad3 ra9b657a  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Fri Mar  3 22:18:00 2017
    13  * Update Count     : 502
     12 * Last Modified On : Thu Mar  9 21:38:26 2017
     13 * Update Count     : 505
    1414 */
    1515
     
    202202__const__               { KEYWORD_RETURN(CONST); }                              // GCC
    203203continue                { KEYWORD_RETURN(CONTINUE); }
     204_Coroutine              { KEYWORD_RETURN(COROUTINE); }                  // CFA
    204205default                 { KEYWORD_RETURN(DEFAULT); }
    205206disable                 { KEYWORD_RETURN(DISABLE); }                    // CFA
     
    235236long                    { KEYWORD_RETURN(LONG); }
    236237lvalue                  { KEYWORD_RETURN(LVALUE); }                             // CFA
     238_Monitor                { KEYWORD_RETURN(MONITOR); }                    // CFA
    237239mutex                   { KEYWORD_RETURN(MUTEX); }                              // CFA
    238240_Noreturn               { KEYWORD_RETURN(NORETURN); }                   // C11
     
    254256struct                  { KEYWORD_RETURN(STRUCT); }
    255257switch                  { KEYWORD_RETURN(SWITCH); }
     258_Thread                 { KEYWORD_RETURN(THREAD); }                             // C11
    256259_Thread_local   { KEYWORD_RETURN(THREADLOCAL); }                // C11
    257260throw                   { KEYWORD_RETURN(THROW); }                              // CFA
  • TabularUnified src/Parser/parser.yy

    rc857ad3 ra9b657a  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Mar  5 15:48:24 2017
    13 // Update Count     : 2227
     12// Last Modified On : Thu Mar  9 21:40:20 2017
     13// Update Count     : 2292
    1414//
    1515
     
    104104%token TYPEOF LABEL                                                                             // GCC
    105105%token ENUM STRUCT UNION
     106%token COROUTINE MONITOR THREAD                                                 // CFA
    106107%token OTYPE FTYPE DTYPE TTYPE TRAIT                                    // CFA
    107108%token SIZEOF OFFSETOF
     
    223224%type<decl> external_function_definition function_definition function_array function_declarator function_no_ptr function_ptr
    224225
    225 %type<decl> identifier_parameter_array identifier_parameter_declarator identifier_parameter_function
    226 %type<decl> identifier_parameter_ptr identifier_list
     226%type<decl> identifier_parameter_declarator identifier_parameter_ptr identifier_parameter_array identifier_parameter_function
     227%type<decl> identifier_list
    227228
    228229%type<decl> cfa_abstract_array cfa_abstract_declarator_no_tuple cfa_abstract_declarator_tuple
     
    270271%type<en> type_name_list
    271272
    272 %type<decl> type_qualifier type_qualifier_name type_qualifier_list type_qualifier_list_opt type_specifier type_specifier_nobody
     273%type<decl> type_qualifier type_qualifier_name type_qualifier_list_opt type_qualifier_list
     274%type<decl> type_specifier type_specifier_nobody
    273275
    274276%type<decl> variable_declarator variable_ptr variable_array variable_function
     
    16331635        | UNION
    16341636                { $$ = DeclarationNode::Union; }
     1637        | COROUTINE
     1638                { $$ = DeclarationNode::Struct; }
     1639        | MONITOR
     1640                { $$ = DeclarationNode::Struct; }
     1641        | THREAD
     1642                { $$ = DeclarationNode::Struct; }
    16351643        ;
    16361644
Note: See TracChangeset for help on using the changeset viewer.