|
const cpp_token * | next () |
|
const cpp_token * | peek (unsigned=1) |
|
const cpp_token * | peek_ident (const char *=NULL, unsigned=1) |
|
const cpp_token * | expect (enum cpp_ttype) |
|
const cpp_token * | eat_token (enum cpp_ttype) |
|
const char * | get_string () |
|
const char * | get_ident () |
|
const cpp_token * | eat_ident (const char *) |
|
const char * | get_number () |
|
unsigned | get_internal_capture_id () |
|
id_base * | parse_operation (unsigned char &) |
|
operand * | parse_capture (operand *, bool) |
|
operand * | parse_expr () |
|
c_expr * | parse_c_expr (cpp_ttype) |
|
operand * | parse_op () |
|
void | record_operlist (location_t, user_id *) |
|
void | parse_pattern () |
|
operand * | parse_result (operand *, predicate_id *) |
|
void | push_simplify (simplify::simplify_kind, vec< simplify * > &, operand *, operand *) |
|
void | parse_simplify (simplify::simplify_kind, vec< simplify * > &, predicate_id *, operand *) |
|
void | parse_for (location_t) |
|
void | parse_if (location_t) |
|
void | parse_predicates (location_t) |
|
void | parse_operator_list (location_t) |
|
void | finish_match_operand (operand *) |
|
◆ parser()
parser::parser |
( |
cpp_reader * | r_, |
|
|
bool | gimple_ ) |
◆ eat_ident()
const cpp_token * parser::eat_ident |
( |
const char * | s | ) |
|
|
private |
◆ eat_token()
const cpp_token * parser::eat_token |
( |
enum cpp_ttype | tk | ) |
|
|
private |
Consume the next token from R and assert it is of type TK.
◆ expect()
const cpp_token * parser::expect |
( |
enum cpp_ttype | tk | ) |
|
|
private |
Read the next token from R and assert it is of type TK.
References fatal_at(), and token().
◆ finish_match_operand()
void parser::finish_match_operand |
( |
operand * | op | ) |
|
|
private |
Finish up OP which is a match operand.
References c_expr::capture_ids, hash_map< KeyId, Value, Traits >::elements(), fatal_at(), i, operand::location, NULL, walk_captures(), capture::what, and capture::where.
◆ get_ident()
const char * parser::get_ident |
( |
| ) |
|
|
private |
Read the next token from R and assert it is of type CPP_NAME and
return its value.
◆ get_internal_capture_id()
unsigned parser::get_internal_capture_id |
( |
| ) |
|
|
private |
◆ get_number()
const char * parser::get_number |
( |
| ) |
|
|
private |
Read the next token from R and assert it is of type CPP_NUMBER and
return its value.
◆ get_string()
const char * parser::get_string |
( |
| ) |
|
|
private |
Read the next token from R and assert it is of type CPP_STRING and
return its value.
◆ next()
const cpp_token * parser::next |
( |
| ) |
|
|
private |
Lexing helpers.
Read the next non-whitespace token from R.
References c_expr::r, and token().
◆ parse_c_expr()
c_expr * parser::parse_c_expr |
( |
cpp_ttype | start | ) |
|
|
private |
Lex native C code delimited by START recording the preprocessing tokens
for later processing.
c_expr = ('{'|'(') <pp token>... ('}'|')')
References c_expr::c_expr(), c_expr::capture_ids, c_expr::code, end(), fatal_at(), gcc_unreachable, get_operator(), c_expr::nr_stmts, c_expr::r, token(), and vNULL.
◆ parse_capture()
◆ parse_expr()
class operand * parser::parse_expr |
( |
| ) |
|
|
private |
Parse an expression
expr = '(' <operation>[capture][flag][type] <operand>... ')'
References expr::append_op(), commutative_op(), expr, expr::expr_type, fatal_at(), expr::force_leaf, expr::force_single_use, id_base::id, expr::is_commutative, expr::match_phi, id_base::nargs, NULL, expr::operation, expr::ops, and expr::opt_grp.
◆ parse_for()
void parser::parse_for |
( |
location_t | | ) |
|
|
private |
Parsing of the outer control structures.
Parse a for expression
for = '(' 'for' <subst>... <pattern> ')'
subst = <ident> '(' <ident>... ')'
References dyn_cast(), fatal_at(), get_operator(), id_base::hashval, i, user_id::is_oper_list, id_base::nargs, NULL, operators, user_id::substitutes, token(), vNULL, and warning_at().
◆ parse_if()
void parser::parse_if |
( |
location_t | | ) |
|
|
private |
Parse an outer if expression.
if = '(' 'if' '(' <c-expr> ')' <pattern> ')'
References fatal_at().
◆ parse_op()
class operand * parser::parse_op |
( |
| ) |
|
|
private |
◆ parse_operation()
id_base * parser::parse_operation |
( |
unsigned char & | opt_grp | ) |
|
|
private |
◆ parse_operator_list()
void parser::parse_operator_list |
( |
location_t | | ) |
|
|
private |
◆ parse_pattern()
void parser::parse_pattern |
( |
| ) |
|
|
private |
Parse outer control structures.
pattern = <preds>|<for>|<if>|<simplify>|<match>
References add_predicate(), expr::append_op(), c_expr::capture_ids, dyn_cast(), expr, fatal_at(), get_operator(), simplify::MATCH, predicate_id::matchers, id_base::nargs, NULL, expr::ops, and simplify::SIMPLIFY.
◆ parse_predicates()
void parser::parse_predicates |
( |
location_t | | ) |
|
|
private |
Parse a list of predefined predicate identifiers.
preds = '(' 'define_predicates' <ident>... ')'
References add_predicate().
◆ parse_result()
◆ parse_simplify()
Parse
simplify = 'simplify' <expr> <result-op>
or
match = 'match' <ident> <expr> [<result-op>]
and fill SIMPLIFIERS with the results.
References as_a(), c_expr::capture_ids, if_expr::cond, fatal_at(), i, is_a(), operand::location, NULL, operand::OP_CAPTURE, operand::OP_EXPR, if_expr::trueexpr, operand::type, and vNULL.
◆ peek()
const cpp_token * parser::peek |
( |
unsigned | num = 1 | ) |
|
|
private |
◆ peek_ident()
const cpp_token * parser::peek_ident |
( |
const char * | id = NULL, |
|
|
unsigned | num = 1 ) |
|
private |
Peek at the next identifier token (or return NULL if the next
token is not an identifier or equal to ID if supplied).
References token().
◆ push_simplify()
Create a new simplify from the current parsing state and MATCH,
MATCH_LOC, RESULT and RESULT_LOC and push it to SIMPLIFIERS.
References c_expr::capture_ids, and last_id.
◆ record_operlist()
void parser::record_operlist |
( |
location_t | loc, |
|
|
user_id * | p ) |
|
private |
◆ active_fors
◆ active_ifs
◆ capture_ids
◆ gimple
◆ last_id
◆ oper_lists
◆ oper_lists_set
◆ parsing_match_operand
bool parser::parsing_match_operand |
◆ simplifiers
◆ user_predicates
The documentation for this class was generated from the following files: