#include "ctrump/ast/ast.h"
#include "ctrump/common/abort.h"
Go to the source code of this file.
Enumerations | |
enum | { PREC_ASSIGN, PREC_CONDITIONAL, PREC_LOR, PREC_LAND, PREC_BOR, PREC_BXOR, PREC_BAND, PREC_EQ, PREC_REL, PREC_SHIFT, PREC_ADDITIVE, PREC_MULTIPLICATIVE, PREC_CAST, PREC_UNARY, PREC_POSTFIX, PREC_PRIMARY, PREC_PAREN, PREC_MAX } |
Functions | |
struct ctrump_location | ctrump_get_stmt_loc (const struct ctrump_stmt *s) |
文の開始位置取得 | |
int | ctrump_expr_occur_var (const struct ctrump_expr *e, const struct ctrump_var *v) |
check occurrence of v in expr | |
Variables | |
int | ctrump_expr_prec_table [] |
式の優先順位 expr_code -> int 絶対値に意味は無い。値が大きいほど優先順位が高い |
Definition in file ast.c.
anonymous enum |
int ctrump_expr_occur_var | ( | const struct ctrump_expr * | expr, | |
const struct ctrump_var * | v | |||
) |
check occurrence of v in expr
Definition at line 197 of file ast.c.
References ctrump_call_expr::args, ctrump_expr::arr_ref, ctrump_arr_ref_expr::array, ctrump_expr::binary, ctrump_expr::call, ctrump_expr::cast, ctrump_expr::code, ctrump_cond_expr::cond, ctrump_expr::cond, CTRUMP_CASE_ALL_BIN_EXPR, CTRUMP_CASE_ALL_UNARY_EXPR, CTRUMP_CASE_CONSTANT_TERM, CTRUMP_EXPR_ARRREF, CTRUMP_EXPR_CALL, CTRUMP_EXPR_CAST, CTRUMP_EXPR_CONDITIONAL, CTRUMP_EXPR_EMPTY, CTRUMP_EXPR_IMPLICIT_CAST, CTRUMP_EXPR_INITIALIZER, CTRUMP_EXPR_IVTMP, CTRUMP_EXPR_MACRO_EXPAND, CTRUMP_EXPR_MEMBER_REF, ctrump_expr_occur_var(), CTRUMP_EXPR_PAREN, CTRUMP_EXPR_PTR_MEMBER_REF, CTRUMP_EXPR_TEXT, CTRUMP_EXPR_VARREF, ctrump_fixme, ctrump_unreachable, ctrump_cond_expr::else_, ctrump_macro_expand_expr::expanded, ctrump_unary_expr::expr, ctrump_paren_expr::expr, ctrump_cast_expr::expr, ctrump_call_expr::func_expr, ctrump_expr::ivtmp, ctrump_binary_expr::lhs, ctrump_expr::macro_expand, ctrump_expr::member_ref, ctrump_call_expr::num_args, ctrump_member_ref::obj_expr, ctrump_ivtmp::original_expr, ctrump_expr::paren, ctrump_binary_expr::rhs, ctrump_arr_ref_expr::subscript, ctrump_cond_expr::then_, ctrump_expr::u, ctrump_expr::unary, ctrump_varref_expr::var, and ctrump_expr::varref.
Referenced by ctrump_expr_occur_var(), and recog_reductive().
struct ctrump_location ctrump_get_stmt_loc | ( | const struct ctrump_stmt * | s | ) | [read] |
文の開始位置取得
Definition at line 133 of file ast.c.
References ctrump_fixme, CTRUMP_STMT_ASM, CTRUMP_STMT_BREAK, CTRUMP_STMT_CASE, CTRUMP_STMT_COMPOUND, CTRUMP_STMT_CONTINUE, CTRUMP_STMT_DECL, CTRUMP_STMT_DEFAULT, CTRUMP_STMT_DEFINE, CTRUMP_STMT_DO_WHILE, CTRUMP_STMT_EMPTY, CTRUMP_STMT_EXPR, CTRUMP_STMT_FOR, CTRUMP_STMT_FOR_DECL, CTRUMP_STMT_GOTO, CTRUMP_STMT_IF, CTRUMP_STMT_IF_ELSE, CTRUMP_STMT_IFDEF, CTRUMP_STMT_LABELED, CTRUMP_STMT_LIST, CTRUMP_STMT_NEWLINE, CTRUMP_STMT_PRAGMA, CTRUMP_STMT_RETURN, CTRUMP_STMT_RETURN_EXPR, CTRUMP_STMT_SLAAST_COMMENT, CTRUMP_STMT_SLASLA_COMMENT, CTRUMP_STMT_SWITCH, CTRUMP_STMT_UNDEF, CTRUMP_STMT_WHILE, and LOCATION_GENERATED.
Referenced by error_get_lineno(), error_get_path(), and get_stmt_loc().
int ctrump_expr_prec_table[] |
式の優先順位 expr_code -> int 絶対値に意味は無い。値が大きいほど優先順位が高い
Definition at line 60 of file ast.c.
Referenced by expr_prec().