Changes in src/Parser/parser.yy [ab57786:c1c1112]
- File:
-
- 1 edited
-
src/Parser/parser.yy (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
rab57786 rc1c1112 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Aug 22 14:15:15201613 // Update Count : 19 4312 // Last Modified On : Wed Aug 24 16:21:37 2016 13 // Update Count : 1962 14 14 // 15 15 … … 54 54 #include "TypeData.h" 55 55 #include "LinkageSpec.h" 56 57 union DeclQualifiers {58 unsigned int value; // assume 32-bits59 struct {60 bool Extern : 1;61 bool Static : 1;62 bool Auto : 1;63 bool Register : 1;64 bool Inline : 1;65 bool Fortran : 1;66 bool Noreturn : 1;67 bool Threadlocal : 1;68 bool Extension : 1;69 bool Lvalue : 1;70 bool Const : 1;71 bool Volatile : 1;72 bool Restrict : 1;73 bool Atomic : 1;74 } qual;75 }; // DeclQualifiers76 DeclQualifiers declQualifiers = { 0 };77 78 union DeclType {79 unsigned int value; // assume 32-bits80 struct {81 bool Char : 1;82 bool Bool : 1;83 bool Short : 1;84 bool Int : 1;85 bool Float : 1;86 bool Double : 1;87 bool Long : 1;88 bool Signed : 1;89 bool Unsigned : 1;90 bool Void : 1;91 bool Complex : 1;92 bool Imaginary : 1;93 bool Valist : 1;94 } type;95 }; // DeclType96 DeclType declTypes = { 0 };97 56 98 57 extern DeclarationNode * parseTree; … … 1328 1287 type_qualifier_name 1329 1288 | attribute 1330 //{ $$ = DeclarationNode::newQualifier( DeclarationNode::Attribute ); }1289 //{ $$ = DeclarationNode::newQualifier( DeclarationNode::Attribute ); } 1331 1290 ; 1332 1291 … … 1382 1341 { $$ = DeclarationNode::newStorageClass( DeclarationNode::Register ); } 1383 1342 | INLINE // C99 1384 { $$ = DeclarationNode::newStorageClass( DeclarationNode::Inline ); } 1343 //{ $$ = DeclarationNode::newStorageClass( DeclarationNode::Inline ); } 1344 { $$ = new DeclarationNode; $$->isInline = true; } 1385 1345 | FORTRAN // C99 1386 1346 { $$ = DeclarationNode::newStorageClass( DeclarationNode::Fortran ); } 1387 1347 | NORETURN // C11 1388 { $$ = DeclarationNode::newStorageClass( DeclarationNode::Noreturn ); } 1348 //{ $$ = DeclarationNode::newStorageClass( DeclarationNode::Noreturn ); } 1349 { $$ = new DeclarationNode; $$->isNoreturn = true; } 1389 1350 | THREADLOCAL // C11 1390 1351 { $$ = DeclarationNode::newStorageClass( DeclarationNode::Threadlocal ); } … … 2153 2114 asm_name_opt: // GCC 2154 2115 // empty 2155 | ASM '(' string_literal ')' attribute_list_opt2116 | ASM '(' string_literal_list ')' attribute_list_opt { delete $3; } // FIX ME: unimplemented 2156 2117 ; 2157 2118 … … 2182 2143 // empty 2183 2144 | any_word 2184 | any_word '(' comma_expression_opt ')' 2145 | any_word '(' comma_expression_opt ')' { delete $3; } // FIX ME: unimplemented 2185 2146 ; 2186 2147 2187 2148 any_word: // GCC 2188 identifier_or_type_name { delete $1; } 2189 | storage_class { delete $1; } 2190 | basic_type_name { delete $1; } 2191 | type_qualifier { delete $1; } 2149 identifier_or_type_name { delete $1; } // FIX ME: unimplemented 2150 | storage_class { delete $1; } // FIX ME: unimplemented 2151 | basic_type_name { delete $1; } // FIX ME: unimplemented 2152 | type_qualifier { delete $1; } // FIX ME: unimplemented 2192 2153 ; 2193 2154
Note:
See TracChangeset
for help on using the changeset viewer.