Changes in src/Parser/parser.yy [a7c90d4:d0ffed1]
- File:
-
- 1 edited
-
src/Parser/parser.yy (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
ra7c90d4 rd0ffed1 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Mar 5 15:48:24201713 // Update Count : 22 2712 // Last Modified On : Tue Feb 28 09:58:10 2017 13 // Update Count : 2208 14 14 // 15 15 … … 91 91 // keywords 92 92 %token TYPEDEF 93 %token EXTERN STATIC AUTO REGISTER 94 %token THREADLOCAL // C11 95 %token INLINE FORTRAN // C99, extension ISO/IEC 9899:1999 Section J.5.9(1) 96 %token NORETURN // C11 93 %token AUTO EXTERN REGISTER STATIC 94 %token INLINE // C99 95 %token FORTRAN // C99, extension ISO/IEC 9899:1999 Section J.5.9(1) 97 96 %token CONST VOLATILE 98 97 %token RESTRICT // C99 99 %token ATOMIC // C11 100 %token FORALL LVALUE MUTEX // CFA 98 %token FORALL LVALUE // CFA 101 99 %token VOID CHAR SHORT INT LONG FLOAT DOUBLE SIGNED UNSIGNED ZERO_T ONE_T 102 100 %token VALIST // GCC … … 104 102 %token TYPEOF LABEL // GCC 105 103 %token ENUM STRUCT UNION 106 %token OTYPE FTYPE DTYPE TTYPE TRAIT // CFA104 %token OTYPE FTYPE DTYPE TTYPE TRAIT // CFA 107 105 %token SIZEOF OFFSETOF 108 106 %token ATTRIBUTE EXTENSION // GCC … … 110 108 %token CHOOSE DISABLE ENABLE FALLTHRU TRY CATCH CATCHRESUME FINALLY THROW THROWRESUME AT // CFA 111 109 %token ASM // C99, extension ISO/IEC 9899:1999 Section J.5.10(1) 112 %token ALIGNAS ALIGNOF GENERIC STATICASSERT// C11110 %token ALIGNAS ALIGNOF ATOMIC GENERIC NORETURN STATICASSERT THREADLOCAL // C11 113 111 114 112 // names and constants: lexer differentiates between identifier and typedef names … … 1402 1400 type_qualifier_name: 1403 1401 CONST 1404 { $$ = DeclarationNode::new TypeQualifier( DeclarationNode::Const ); }1402 { $$ = DeclarationNode::newQualifier( DeclarationNode::Const ); } 1405 1403 | RESTRICT 1406 { $$ = DeclarationNode::new TypeQualifier( DeclarationNode::Restrict ); }1404 { $$ = DeclarationNode::newQualifier( DeclarationNode::Restrict ); } 1407 1405 | VOLATILE 1408 { $$ = DeclarationNode::new TypeQualifier( DeclarationNode::Volatile ); }1406 { $$ = DeclarationNode::newQualifier( DeclarationNode::Volatile ); } 1409 1407 | LVALUE // CFA 1410 { $$ = DeclarationNode::newTypeQualifier( DeclarationNode::Lvalue ); } 1411 | MUTEX 1412 { $$ = DeclarationNode::newTypeQualifier( DeclarationNode::Mutex ); } 1408 { $$ = DeclarationNode::newQualifier( DeclarationNode::Lvalue ); } 1413 1409 | ATOMIC 1414 { $$ = DeclarationNode::new TypeQualifier( DeclarationNode::Atomic ); }1410 { $$ = DeclarationNode::newQualifier( DeclarationNode::Atomic ); } 1415 1411 | FORALL '(' 1416 1412 { … … 1452 1448 | REGISTER 1453 1449 { $$ = 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; } 1454 1458 | THREADLOCAL // C11 1455 1459 { $$ = DeclarationNode::newStorageClass( DeclarationNode::Threadlocal ); } 1456 // Put function specifiers here to simplify parsing rules, but separate them semantically.1457 | INLINE // C991458 { $$ = DeclarationNode::newFuncSpecifier( DeclarationNode::Inline ); }1459 | FORTRAN // C991460 { $$ = DeclarationNode::newFuncSpecifier( DeclarationNode::Fortran ); }1461 | NORETURN // C111462 { $$ = DeclarationNode::newFuncSpecifier( DeclarationNode::Noreturn ); }1463 1460 ; 1464 1461 … … 2036 2033 { $$ = $3->addQualifiers( $1 ); } 2037 2034 | type_declaring_list ',' type_declarator 2038 { $$ = $1->appendList( $3->copyS pecifiers( $1 ) ); }2035 { $$ = $1->appendList( $3->copyStorageClasses( $1 ) ); } 2039 2036 ; 2040 2037
Note:
See TracChangeset
for help on using the changeset viewer.