Changeset f38e7d7
- Timestamp:
- Apr 17, 2018, 6:03:36 PM (5 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, 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, with_gc
- Children:
- d046db2, e16294d
- Parents:
- 81bb114
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r81bb114 rf38e7d7 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Mar 28 17:52:24201813 // Update Count : 31 3012 // Last Modified On : Tue Apr 17 17:10:30 2018 13 // Update Count : 3144 14 14 // 15 15 … … 391 391 %precedence '(' 392 392 393 %locations // support location tracking for error messages393 %locations // support location tracking for error messages 394 394 395 395 %start translation_unit // parse-tree root … … 1708 1708 | LONG 1709 1709 { $$ = DeclarationNode::newLength( DeclarationNode::Long ); } 1710 | ZERO_T1711 { $$ = DeclarationNode::newBuiltinType( DeclarationNode::Zero ); }1712 | ONE_T1713 { $$ = DeclarationNode::newBuiltinType( DeclarationNode::One ); }1714 1710 | VALIST // GCC, __builtin_va_list 1715 1711 { $$ = DeclarationNode::newBuiltinType( DeclarationNode::Valist ); } … … 1731 1727 basic_type_specifier: 1732 1728 direct_type 1729 // Cannot have type modifiers, e.g., short, long, etc. 1733 1730 | type_qualifier_list_opt indirect_type type_qualifier_list_opt 1734 1731 { $$ = $2->addQualifiers( $1 )->addQualifiers( $3 ); } … … 1736 1733 1737 1734 direct_type: 1738 // A semantic check is necessary for conflicting type qualifiers.1739 1735 basic_type_name 1740 1736 | type_qualifier_list basic_type_name … … 1755 1751 | ATTR_TYPEGENname '(' comma_expression ')' // CFA: e.g., @type(a+b) y; 1756 1752 { $$ = DeclarationNode::newAttr( $1, $3 ); } 1753 | ZERO_T // CFA 1754 { $$ = DeclarationNode::newBuiltinType( DeclarationNode::Zero ); } 1755 | ONE_T // CFA 1756 { $$ = DeclarationNode::newBuiltinType( DeclarationNode::One ); } 1757 1757 ; 1758 1758
Note: See TracChangeset
for help on using the changeset viewer.