Changeset 174845e for src/Parser/parser.yy
- Timestamp:
- Jun 5, 2018, 3:35:49 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:
- beefc34c
- Parents:
- 41770ed1 (diff), dafdbe7 (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
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r41770ed1 r174845e 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jun 1 17:59:57201813 // Update Count : 34 7612 // Last Modified On : Mon Jun 4 22:22:04 2018 13 // Update Count : 3492 14 14 // 15 15 … … 1050 1050 1051 1051 iteration_statement: 1052 WHILE '(' comma_expression ')' statement1053 { $$ = new StatementNode( build_while( $ 3, $5) ); }1052 WHILE '(' push if_control_expression ')' statement pop 1053 { $$ = new StatementNode( build_while( $4, $6 ) ); } 1054 1054 | DO statement WHILE '(' comma_expression ')' ';' 1055 { $$ = new StatementNode( build_ while( $5, $2, true) ); }1055 { $$ = new StatementNode( build_do_while( $5, $2 ) ); } 1056 1056 | FOR '(' push for_control_expression ')' statement pop 1057 1057 { $$ = new StatementNode( build_for( $4, $6 ) ); } … … 1331 1331 c_declaration ';' 1332 1332 | cfa_declaration ';' // CFA 1333 | static_assert 1333 | static_assert // C11 1334 1334 ; 1335 1335 … … 1337 1337 STATICASSERT '(' constant_expression ',' string_literal ')' ';' // C11 1338 1338 { $$ = DeclarationNode::newStaticAssert( $3, $5 ); } 1339 | STATICASSERT '(' constant_expression ')' ';' // CFA 1340 { $$ = DeclarationNode::newStaticAssert( $3, build_constantStr( *new string( "\"\"" ) ) ); } 1339 1341 1340 1342 // C declaration syntax is notoriously confusing and error prone. Cforall provides its own type, variable and function … … 1881 1883 1882 1884 field_declaration: 1883 cfa_field_declaring_list ';' // CFA, new style field declaration 1885 type_specifier field_declaring_list ';' 1886 { $$ = distAttr( $1, $2 ); } 1887 | EXTENSION type_specifier field_declaring_list ';' // GCC 1888 { distExt( $3 ); $$ = distAttr( $2, $3 ); } // mark all fields in list 1889 | typedef_declaration ';' // CFA 1890 { SemanticError( yylloc, "Typedef in aggregate is currently unimplemented." ); $$ = nullptr; } 1891 | cfa_field_declaring_list ';' // CFA, new style field declaration 1884 1892 | EXTENSION cfa_field_declaring_list ';' // GCC 1885 { 1886 distExt( $2 ); // mark all fields in list 1887 $$ = $2; 1888 } 1889 | type_specifier field_declaring_list ';' 1890 { 1891 $$ = distAttr( $1, $2 ); } 1892 | EXTENSION type_specifier field_declaring_list ';' // GCC 1893 { 1894 distExt( $3 ); // mark all fields in list 1895 $$ = distAttr( $2, $3 ); 1896 } 1897 | static_assert 1893 { distExt( $2 ); $$ = $2; } // mark all fields in list 1894 | cfa_typedef_declaration ';' // CFA 1895 { SemanticError( yylloc, "Typedef in aggregate is currently unimplemented." ); $$ = nullptr; } 1896 | static_assert // C11 1898 1897 ; 1899 1898
Note: See TracChangeset
for help on using the changeset viewer.