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