Changeset 13e8427
- Timestamp:
- May 28, 2018, 5:01:57 PM (6 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, with_gc
- Children:
- 533540a
- Parents:
- 1213f21
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r1213f21 r13e8427 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun May 27 12:01:51201813 // Update Count : 33 7312 // Last Modified On : Mon May 28 17:01:36 2018 13 // Update Count : 3383 14 14 // 15 15 … … 835 835 // '[' ']' 836 836 // { $$ = new ExpressionNode( build_tuple() ); } 837 // '[' push assignment_expression pop ']'837 // | '[' push assignment_expression pop ']' 838 838 // { $$ = new ExpressionNode( build_tuple( $3 ) ); } 839 839 '[' push ',' tuple_expression_list pop ']' … … 2209 2209 '|' no_attr_identifier_or_type_name '(' type_list ')' 2210 2210 { $$ = DeclarationNode::newTraitUse( $2, $4 ); } 2211 | '|' '{' push trait_declaration_list '}'2211 | '|' '{' push trait_declaration_list pop '}' 2212 2212 { $$ = $4; } 2213 | '|' '(' push type_parameter_list pop ')' '{' push trait_declaration_list '}' '(' type_list ')'2213 | '|' '(' push type_parameter_list pop ')' '{' push trait_declaration_list pop '}' '(' type_list ')' 2214 2214 { SemanticError( yylloc, "Generic data-type assertion is currently unimplemented." ); $$ = nullptr; } 2215 2215 ; … … 2257 2257 TRAIT no_attr_identifier_or_type_name '(' push type_parameter_list pop ')' '{' '}' 2258 2258 { $$ = DeclarationNode::newTrait( $2, $5, 0 ); } 2259 | TRAIT no_attr_identifier_or_type_name '(' push type_parameter_list pop ')' '{' push trait_declaration_list '}'2259 | TRAIT no_attr_identifier_or_type_name '(' push type_parameter_list pop ')' '{' push trait_declaration_list pop '}' 2260 2260 { $$ = DeclarationNode::newTrait( $2, $5, $10 ); } 2261 2261 ; … … 2263 2263 trait_declaration_list: // CFA 2264 2264 trait_declaration 2265 | trait_declaration_list p ush trait_declaration2266 { $$ = $1->appendList( $ 3); }2265 | trait_declaration_list pop push trait_declaration 2266 { $$ = $1->appendList( $4 ); } 2267 2267 ; 2268 2268 2269 2269 trait_declaration: // CFA 2270 cfa_trait_declaring_list pop';'2271 | trait_declaring_list pop';'2270 cfa_trait_declaring_list ';' 2271 | trait_declaring_list ';' 2272 2272 ; 2273 2273 … … 2974 2974 '[' ']' 2975 2975 { $$ = DeclarationNode::newArray( 0, 0, false ); } 2976 // multi_array_dimension handles the '[' '*' ']' case2976 // multi_array_dimension handles the '[' '*' ']' case 2977 2977 | '[' push type_qualifier_list '*' pop ']' // remaining C99 2978 2978 { $$ = DeclarationNode::newVarArray( $3 ); } 2979 2979 | '[' push type_qualifier_list pop ']' 2980 2980 { $$ = DeclarationNode::newArray( 0, $3, false ); } 2981 // multi_array_dimension handles the '[' assignment_expression ']' case2981 // multi_array_dimension handles the '[' assignment_expression ']' case 2982 2982 | '[' push type_qualifier_list assignment_expression pop ']' 2983 2983 { $$ = DeclarationNode::newArray( $4, $3, false ); } … … 3174 3174 '[' push cfa_abstract_parameter_list pop ']' 3175 3175 { $$ = DeclarationNode::newTuple( $3 ); } 3176 | '[' push type_specifier_nobody ELLIPSIS ']' 3177 { SemanticError( yylloc, "Tuple array currently unimplemented." ); $$ = nullptr; } 3178 | '[' push type_specifier_nobody ELLIPSIS constant_expression ']' 3179 { SemanticError( yylloc, "Tuple array currently unimplemented." ); $$ = nullptr; } 3176 3180 ; 3177 3181
Note: See TracChangeset
for help on using the changeset viewer.