Changeset faddbd8 for src/Parser/parser.yy
- Timestamp:
- Oct 5, 2016, 2:29:13 PM (8 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:
- d58a39a0
- Parents:
- 4b1fd2c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r4b1fd2c rfaddbd8 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Sep 24 12:16:53201613 // Update Count : 199212 // Last Modified On : Wed Oct 5 14:10:46 2016 13 // Update Count : 2002 14 14 // 15 15 … … 196 196 %type<decl> field_declaration field_declaration_list field_declarator field_declaring_list 197 197 %type<en> field field_list 198 %type<tok> field_name 198 199 199 200 %type<decl> external_function_definition function_definition function_array function_declarator function_no_ptr function_ptr … … 378 379 { $$ = new ExpressionNode( build_fieldSel( $1, build_varref( $3 ) ) ); } 379 380 | postfix_expression '.' '[' push field_list pop ']' // CFA, tuple field selector 381 | postfix_expression '.' INTEGERconstant 380 382 | postfix_expression ARROW no_attr_identifier 381 383 { $$ = new ExpressionNode( build_pfieldSel( $1, build_varref( $3 ) ) ); } … … 413 415 414 416 field: // CFA, tuple field selector 415 no_attr_identifier 416 { $$ = new ExpressionNode( build_varref( $1 ) ); } 417 field_name 417 418 // ambiguity with .0 so space required after field-selection, e.g. 418 419 // struct S { int 0, 1; } s; s. 0 = 0; s. 1 = 1; 419 | no_attr_identifier '.' field 420 { $$ = new ExpressionNode( build_varref( $1 ) ); } 421 | field_name '.' field 420 422 { $$ = new ExpressionNode( build_fieldSel( $3, build_varref( $1 ) ) ); } 421 | no_attr_identifier'.' '[' push field_list pop ']'423 | field_name '.' '[' push field_list pop ']' 422 424 { $$ = new ExpressionNode( build_fieldSel( $5, build_varref( $1 ) ) ); } 423 | no_attr_identifierARROW field425 | field_name ARROW field 424 426 { $$ = new ExpressionNode( build_pfieldSel( $3, build_varref( $1 ) ) ); } 425 | no_attr_identifierARROW '[' push field_list pop ']'427 | field_name ARROW '[' push field_list pop ']' 426 428 { $$ = new ExpressionNode( build_pfieldSel( $5, build_varref( $1 ) ) ); } 429 ; 430 431 field_name: 432 no_attr_identifier 433 | INTEGERconstant 427 434 ; 428 435 … … 2005 2012 { 2006 2013 linkageStack.push( linkage ); // handle nested extern "C"/"Cforall" 2007 linkage = LinkageSpec:: fromString( *$2 );2014 linkage = LinkageSpec::linkageCheck( $2 ); 2008 2015 } 2009 2016 '{' external_definition_list_opt '}' // C++-style linkage specifier
Note: See TracChangeset
for help on using the changeset viewer.