Changeset 5721a6d for src/Parser/parser.yy
- Timestamp:
- Feb 1, 2016, 2:24:50 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 2a4b088, b4cd03b7
- Parents:
- ae8b942
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
rae8b942 r5721a6d 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Oct 8 17:17:54 201513 // Update Count : 14 7312 // Last Modified On : Mon Feb 1 13:51:20 2016 13 // Update Count : 1481 14 14 // 15 15 … … 78 78 %token ENUM STRUCT UNION 79 79 %token TYPE FTYPE DTYPE CONTEXT // CFA 80 %token SIZEOF 80 %token SIZEOF OFFSETOF 81 81 %token ATTRIBUTE EXTENSION // GCC 82 82 %token IF ELSE SWITCH CASE DEFAULT DO WHILE FOR BREAK CONTINUE GOTO RETURN … … 443 443 | SIZEOF '(' type_name_no_function ')' 444 444 { $$ = new CompositeExprNode( new OperatorNode( OperatorNode::SizeOf ), new TypeValueNode( $3 )); } 445 | OFFSETOF '(' type_name_no_function ',' no_attr_identifier ')' 446 { $$ = new CompositeExprNode( new OperatorNode( OperatorNode::OffsetOf ), new TypeValueNode( $3 ), new VarRefNode( $5 )); } 445 447 | ATTR_IDENTIFIER 446 448 { $$ = new CompositeExprNode( new OperatorNode( OperatorNode::Attr ), new VarRefNode( $1 )); }
Note: See TracChangeset
for help on using the changeset viewer.