- Timestamp:
- Oct 8, 2022, 4:25:24 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 95bda0a
- Parents:
- 265e460
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r265e460 rb2ddaf3 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Sep 26 08:45:53202213 // Update Count : 570 412 // Last Modified On : Sat Oct 8 08:21:18 2022 13 // Update Count : 5709 14 14 // 15 15 … … 103 103 // distribute declaration_specifier across all declared variables, e.g., static, const, but not __attribute__. 104 104 assert( declList ); 105 //printf( "distAttr1 typeSpec %p\n", typeSpec ); typeSpec->print( std::cout );105 // printf( "distAttr1 typeSpec %p\n", typeSpec ); typeSpec->print( std::cout ); 106 106 DeclarationNode * cur = declList, * cl = (new DeclarationNode)->addType( typeSpec ); 107 //printf( "distAttr2 cl %p\n", cl ); cl->type->print( std::cout );108 //cl->type->aggregate.name = cl->type->aggInst.aggregate->aggregate.name;107 // printf( "distAttr2 cl %p\n", cl ); cl->type->print( std::cout ); 108 // cl->type->aggregate.name = cl->type->aggInst.aggregate->aggregate.name; 109 109 110 110 for ( cur = dynamic_cast<DeclarationNode *>( cur->get_next() ); cur != nullptr; cur = dynamic_cast<DeclarationNode *>( cur->get_next() ) ) { … … 112 112 } // for 113 113 declList->addType( cl ); 114 //printf( "distAttr3 declList %p\n", declList ); declList->print( std::cout, 0 );114 // printf( "distAttr3 declList %p\n", declList ); declList->print( std::cout, 0 ); 115 115 return declList; 116 116 } // distAttr … … 3043 3043 $$ = $6; 3044 3044 } 3045 // global distribution 3045 3046 | type_qualifier_list 3046 3047 { … … 3067 3068 | declaration_qualifier_list type_qualifier_list 3068 3069 { 3069 if ( ($1->type && $1->type->qualifiers.val) || $2->type->qualifiers.val) { SemanticError( yylloc, "CV qualifiers cannot be distributed; only storage-class and forall qualifiers." ); }3070 if ( ($1->type && $1->type->forall) || $2->type->forall) forall = true; // remember generic type3070 if ( ($1->type && $1->type->qualifiers.val) || ($2->type && $2->type->qualifiers.val) ) { SemanticError( yylloc, "CV qualifiers cannot be distributed; only storage-class and forall qualifiers." ); } 3071 if ( ($1->type && $1->type->forall) || ($2->type && $2->type->forall) ) forall = true; // remember generic type 3071 3072 } 3072 3073 '{' up external_definition_list_opt down '}' // CFA, namespace
Note: See TracChangeset
for help on using the changeset viewer.