Lines Matching defs:statement

1062    of an assignment-statement are compatible, or that a function is
1085 impossible, in the general case, to tell whether a statement is an
1086 expression or declaration without scanning the entire statement.
1341 whether a statement is an expression-statement or a
1342 declaration-statement we parse it tentatively as a
1343 declaration-statement. If that fails, we then reparse the same
1344 token stream as an expression-statement. */
1391 /* Set to IN_ITERATION_STMT if parsing an iteration-statement,
1393 IN_OMP_FOR if parsing OpenMP loop. If parsing a switch statement,
1395 iteration-statement, OpenMP block or loop within that switch. */
1402 /* TRUE if we are presently parsing the body of a switch statement.
1405 "case not in switch" vs "break statement used with OpenMP...". */
2381 /* Consume tokens until we reach the end of the current statement.
2403 statement. */
2448 /* This function is called at the end of a statement or declaration.
2459 the statement. */
2653 /* We are not in an iteration statement. */
2656 /* We are not in a switch statement. */
2903 ( compound-statement )
2969 /* The end of a statement. */
3013 a GNU statement-expression. */
3028 error ("statement-expressions are allowed only inside functions");
3029 /* Start the statement-expression. */
3031 /* Parse the compound-statement. */
6229 /* Parse a statement.
6231 statement:
6232 labeled-statement
6233 expression-statement
6234 compound-statement
6235 selection-statement
6236 iteration-statement
6237 jump-statement
6238 declaration-statement
6241 IN_COMPOUND is true when the statement is nested inside a
6244 If IF_P is not NULL, *IF_P is set to indicate whether the statement
6245 is a (possibly labeled) if statement which is not enclosed in braces
6252 tree statement;
6259 /* There is no statement yet. */
6260 statement = NULL_TREE;
6263 /* Remember the location of the first token in the statement. */
6266 statement we have. */
6275 /* Looks like a labeled-statement with a case label.
6277 the statement. */
6283 statement = cp_parser_selection_statement (parser, if_p);
6289 statement = cp_parser_iteration_statement (parser);
6296 statement = cp_parser_jump_statement (parser);
6305 statement = cp_parser_objc_statement (parser);
6309 statement = cp_parser_try_block (parser);
6314 declaration-statement. */
6321 labeled-statement. */
6325 /* Looks like a labeled-statement with an ordinary label.
6327 the statement. */
6332 /* Anything that starts with a `{' must be a compound-statement. */
6334 statement = cp_parser_compound_statement (parser, NULL, false);
6336 a statement all its own. */
6341 the context of a compound, accept the pragma as a "statement" and
6343 require a real statement and must go back and read one. */
6352 cp_parser_error (parser, "expected statement");
6356 /* Everything else must be a declaration-statement or an
6357 expression-statement. Try for the declaration-statement
6359 we have an expression-statement. */
6360 if (!statement)
6365 /* Try to parse the declaration-statement. */
6371 /* Look for an expression-statement instead. */
6372 statement = cp_parser_expression_statement (parser, in_statement_expr);
6375 /* Set the line number for the statement. */
6376 if (statement && STATEMENT_CODE_P (TREE_CODE (statement)))
6377 SET_EXPR_LOCATION (statement, statement_location);
6380 /* Parse the label for a labeled-statement, i.e.
6387 case constant-expression ... constant-expression : statement
6403 cp_parser_error (parser, "expected labeled-statement");
6439 error ("case label %qE not within a switch statement", expr);
6450 error ("case label not within a switch statement");
6463 /* Parse an expression-statement.
6465 expression-statement:
6469 statement consists of nothing more than an `;'. IN_STATEMENT_EXPR_P
6470 indicates whether this expression-statement is part of an
6471 expression statement. */
6476 tree statement = NULL_TREE;
6479 statement. */
6481 statement = cp_parser_expression (parser, /*cast_p=*/false);
6488 /* This is the final expression statement of a statement
6490 statement = finish_stmt_expr_expr (statement, in_statement_expr);
6491 else if (statement)
6492 statement = finish_expr_stmt (statement);
6496 return statement;
6499 /* Parse a compound-statement.
6501 compound-statement:
6502 { statement-seq [opt] }
6504 Returns a tree representing the statement. */
6515 /* Begin the compound-statement. */
6517 /* Parse an (optional) statement-seq. */
6519 /* Finish the compound-statement. */
6527 /* Parse an (optional) statement-seq.
6529 statement-seq:
6530 statement
6531 statement-seq [opt] statement */
6547 /* Parse the statement. */
6552 /* Parse a selection-statement.
6554 selection-statement:
6555 if ( condition ) statement
6556 if ( condition ) statement else statement
6557 switch ( condition ) statement
6561 If IF_P is not NULL, *IF_P is set to indicate whether the statement
6562 is a (possibly labeled) if statement which is not enclosed in
6576 token = cp_parser_require (parser, CPP_KEYWORD, "selection-statement");
6585 tree statement;
6595 /* Begin the selection-statement. */
6597 statement = begin_if_stmt ();
6599 statement = begin_switch_stmt ();
6613 finish_if_stmt_cond (condition, statement);
6617 finish_then_clause (statement);
6625 begin_else_clause (statement);
6628 finish_else_clause (statement);
6632 indicate that this if statement has an else clause.
6634 when we get back up to the parent if statement. */
6640 /* This if statement does not have an else clause. If
6642 statement which does have an else clause. We warn
6648 EXPR_LOCUS (statement));
6651 /* Now we're all done with the if-statement. */
6652 finish_if_stmt (statement);
6660 finish_switch_cond (condition, statement);
6662 /* Parse the body of the switch-statement. */
6671 /* Now we're all done with the switch-statement. */
6672 finish_switch_stmt (statement);
6675 return statement;
6680 cp_parser_error (parser, "expected selection-statement");
6784 /* Parse an iteration-statement.
6786 iteration-statement:
6787 while ( condition ) statement
6788 do statement while ( expression ) ;
6789 for ( for-init-statement condition [opt] ; expression [opt] )
6790 statement
6795 while attributes [opt] ( condition ) statement
6796 do attributes [opt] statement while ( expression ) ;
6798 ( for-init-statement condition [opt] ; expression [opt] )
6799 statement
6810 tree statement, attributes;
6817 token = cp_parser_require (parser, CPP_KEYWORD, "iteration-statement");
6822 statement. */
6838 /* Begin the while-statement. */
6840 statement = begin_while_stmt (attributes);
6846 finish_while_stmt_cond (condition, statement);
6849 /* Parse the dependent statement. */
6853 /* We're done with the while-statement. */
6854 finish_while_stmt (statement);
6862 /* Begin the do-statement. */
6864 statement = begin_do_stmt (attributes);
6866 /* Parse the body of the do-statement. */
6870 finish_do_body (statement);
6877 /* We're done with the do-statement. */
6878 finish_do_stmt (expression, statement);
6891 /* Begin the for-statement. */
6893 statement = begin_for_stmt (attributes);
6899 finish_for_init_stmt (statement);
6904 finish_for_cond (condition, statement);
6911 finish_for_expr (expression, statement);
6915 /* Parse the body of the for-statement. */
6920 /* We're done with the for-statement. */
6921 finish_for_stmt (statement);
6926 cp_parser_error (parser, "expected iteration-statement");
6927 statement = error_mark_node;
6931 return statement;
6934 /* Parse a for-init-statement.
6936 for-init-statement:
6937 expression-statement
6944 expression-statement. Grammatically, this is also a
6958 expression-statement. */
6966 /* Parse a jump-statement.
6968 jump-statement:
6976 jump-statement:
6984 tree statement = error_mark_node;
6989 token = cp_parser_require (parser, CPP_KEYWORD, "jump-statement");
7001 error ("break statement not within loop or switch");
7006 statement = finish_break_stmt ();
7012 error ("break statement used with OpenMP for loop");
7022 error ("continue statement not within a loop");
7026 statement = finish_continue_stmt ();
7047 /* Build the return-statement. */
7048 statement = finish_return_stmt (expr);
7055 /* Create the goto-statement. */
7073 cp_parser_error (parser, "expected jump-statement");
7077 return statement;
7080 /* Parse a declaration-statement.
7082 declaration-statement:
7099 /* Finish off the statement. */
7103 /* Some dependent statements (like `if (cond) statement'), are
7104 implicitly in their own scope. In other words, if the statement is
7105 a single statement (as opposed to a compound-statement), it is
7107 declarations appearing in the dependent statement are out of scope
7108 after control passes that point. This function parses a statement,
7110 compound-statement.
7112 If IF_P is not NULL, *IF_P is set to indicate whether the statement
7113 is a (possibly labeled) if statement which is not enclosed in
7117 Returns the new statement. */
7122 tree statement;
7131 statement = add_stmt (build_empty_stmt ());
7133 /* if a compound is opened, we simply parse the statement directly. */
7135 statement = cp_parser_compound_statement (parser, NULL, false);
7139 /* Create a compound-statement. */
7140 statement = begin_compound_stmt (0);
7141 /* Parse the dependent-statement. */
7143 /* Finish the dummy compound-statement. */
7144 finish_compound_stmt (statement);
7147 /* Return the statement. */
7148 return statement;
7151 /* For some dependent statements (like `while (cond) statement'), we
7153 statement is a compound-statement, we do not want to create another
7355 part of a declaration-statement. */
7525 statement is treated as a declaration-statement until proven
7563 /* Skip tokens until we reach the end of the statement. */
14049 /* Skip to the end of the statement. */
14535 try compound-statement handler-seq */
14607 catch ( exception-declaration ) compound-statement */
16300 statement expression extension) encounter more classes. We want
18016 /* Parse an Objective-C try-catch-finally statement.
18019 @try compound-statement objc-catch-clause-seq [opt]
18026 @catch ( exception-declaration ) compound-statement
18029 @finally compound-statement
18078 /* Parse an Objective-C synchronized statement.
18081 @synchronized ( expression ) compound-statement
18105 /* Parse an Objective-C throw statement.
18110 Returns a constructed '@throw' statement. */
18126 /* Parse an Objective-C statement. */
18715 statement
18717 In practice, we're also interested in adding the statement to an
18914 cp_parser_error (parser, "for statement expected");
19292 /* Main entry point to OpenMP statement pragmas. */