Namespaces | |
| namespace | actions |
| namespace | builtins |
| namespace | gamestate |
| namespace | implementation |
| namespace | tokenizer |
Enumerations | |
| enum class | formula_access { read_only , write_only , read_write } |
Functions | |
| template<typename T , typename... Args> | |
| variant | make_callable (Args &&... args) |
| template<typename T > | |
| auto | callable_cast (const variant &v) -> std::enable_if_t< std::is_pointer_v< T >, std::shared_ptr< const std::remove_pointer_t< T > > > |
| static void | msg (const char *act, debug_info &i, const char *to="", const char *result="") |
| formula_debugger * | add_debug_info (formula_debugger *fdb, int arg_number, const std::string &f_name) |
| variant | evaluate_arg_callback (formula_debugger &fdb, const formula_expression &expression, const formula_callable &variables) |
| variant | evaluate_formula_callback (formula_debugger &fdb, const formula &f, const formula_callable &variables) |
| variant | evaluate_formula_callback (formula_debugger &fdb, const formula &f) |
| static std::string | tokens_to_string (const tk::token *i1, const tk::token *i2) |
| expression_ptr | parse_expression (const tk::token *i1, const tk::token *i2, function_symbol_table *symbols) |
| static int | operator_precedence (const tk::token &t) |
| Functions to handle the actual parsing of WFL. | |
| static void | parse_function_args (const tk::token *&i1, const tk::token *i2, std::vector< std::string > *res) |
| static void | parse_args (const tk::token *i1, const tk::token *i2, std::vector< expression_ptr > *res, function_symbol_table *symbols) |
| static void | parse_set_args (const tk::token *i1, const tk::token *i2, std::vector< expression_ptr > *res, function_symbol_table *symbols) |
| static void | parse_where_clauses (const tk::token *i1, const tk::token *i2, const expr_table_ptr &res, function_symbol_table *symbols) |
| template<typename T > | |
| std::shared_ptr< T > | value_cast (const variant &v) |
| variant | execute_actions (const variant &execute, const variant &context) |
| Executes all action_callables in execute using the provided context. | |
Variables | |
| static thread_local std::deque< std::string > | call_stack |
| For printing error messages when WFL parsing or evaluation fails, this contains the names of the WFL functions being evaluated. | |
| typedef std::shared_ptr<base_breakpoint> wfl::breakpoint_ptr |
Definition at line 38 of file debugger_fwd.hpp.
| using wfl::const_formula_callable_ptr = typedef std::shared_ptr<const formula_callable> |
Definition at line 44 of file callable_fwd.hpp.
| typedef std::shared_ptr<const formula> wfl::const_formula_ptr |
Definition at line 24 of file formula_fwd.hpp.
| using wfl::const_map_formula_callable_ptr = typedef std::shared_ptr<const map_formula_callable> |
Definition at line 309 of file callable.hpp.
| using wfl::expr_table = typedef std::map<std::string, expression_ptr> |
Definition at line 61 of file formula.cpp.
| using wfl::expr_table_evaluated = typedef std::map<std::string, variant> |
Definition at line 62 of file formula.cpp.
| using wfl::expr_table_ptr = typedef std::shared_ptr<expr_table> |
Definition at line 63 of file formula.cpp.
| typedef std::shared_ptr< formula_expression > wfl::expression_ptr |
Definition at line 29 of file formula.hpp.
| using wfl::formula_callable_ptr = typedef std::shared_ptr<formula_callable> |
Definition at line 43 of file callable_fwd.hpp.
| typedef std::shared_ptr<formula_function> wfl::formula_function_ptr |
Definition at line 230 of file function.hpp.
| using wfl::formula_input_vector = typedef std::vector<formula_input> |
Definition at line 42 of file callable_fwd.hpp.
| typedef std::shared_ptr<formula> wfl::formula_ptr |
Definition at line 23 of file formula_fwd.hpp.
| using wfl::formula_seen_stack = typedef std::vector<const_formula_callable_ptr> |
Definition at line 45 of file callable_fwd.hpp.
| using wfl::formula_variant = typedef string_enums::enum_base<formula_variant_defines> |
Definition at line 34 of file formula_variant.hpp.
| typedef std::shared_ptr<function_expression> wfl::function_expression_ptr |
Definition at line 173 of file function.hpp.
| typedef std::map<std::string, formula_function_ptr> wfl::functions_map |
Definition at line 231 of file function.hpp.
| using wfl::map_formula_callable_ptr = typedef std::shared_ptr<map_formula_callable> |
Definition at line 308 of file callable.hpp.
|
strong |
| Enumerator | |
|---|---|
| read_only | |
| write_only | |
| read_write | |
Definition at line 32 of file callable_fwd.hpp.
| formula_debugger * wfl::add_debug_info | ( | formula_debugger * | fdb, |
| int | arg_number, | ||
| const std::string & | f_name | ||
| ) |
Definition at line 27 of file debugger_fwd.cpp.
References wfl::formula_debugger::add_debug_info().
Referenced by wfl::builtins::DEFINE_WFL_FUNCTION(), wfl::gamestate::DEFINE_WFL_FUNCTION(), wfl::builtins::DEFINE_WFL_FUNCTION(), wfl::gamestate::DEFINE_WFL_FUNCTION(), wfl::gamestate::DEFINE_WFL_FUNCTION(), wfl::builtins::DEFINE_WFL_FUNCTION(), wfl::gamestate::DEFINE_WFL_FUNCTION(), wfl::builtins::DEFINE_WFL_FUNCTION(), wfl::builtins::DEFINE_WFL_FUNCTION(), wfl::gamestate::DEFINE_WFL_FUNCTION(), wfl::gamestate::DEFINE_WFL_FUNCTION(), wfl::gamestate::DEFINE_WFL_FUNCTION(), wfl::builtins::DEFINE_WFL_FUNCTION(), wfl::builtins::DEFINE_WFL_FUNCTION(), wfl::gamestate::DEFINE_WFL_FUNCTION(), wfl::builtins::DEFINE_WFL_FUNCTION(), wfl::builtins::DEFINE_WFL_FUNCTION(), wfl::builtins::DEFINE_WFL_FUNCTION(), wfl::gamestate::DEFINE_WFL_FUNCTION(), wfl::builtins::DEFINE_WFL_FUNCTION(), wfl::gamestate::DEFINE_WFL_FUNCTION(), wfl::actions::DEFINE_WFL_FUNCTION(), wfl::gamestate::DEFINE_WFL_FUNCTION(), wfl::gamestate::DEFINE_WFL_FUNCTION(), wfl::gamestate::DEFINE_WFL_FUNCTION(), wfl::gamestate::DEFINE_WFL_FUNCTION(), wfl::list_expression::execute(), wfl::map_expression::execute(), wfl::unary_operator_expression::execute(), wfl::dot_expression::execute(), wfl::square_bracket_expression::execute(), wfl::operator_expression::execute(), wfl::where_expression::execute(), wfl::string_expression::execute(), and wfl::where_variables::get_value().
| auto wfl::callable_cast | ( | const variant & | v | ) | -> std::enable_if_t<std::is_pointer_v<T>, std::shared_ptr<const std::remove_pointer_t<T>>> |
Definition at line 323 of file callable.hpp.
| variant wfl::evaluate_arg_callback | ( | formula_debugger & | fdb, |
| const formula_expression & | expression, | ||
| const formula_callable & | variables | ||
| ) |
Definition at line 37 of file debugger_fwd.cpp.
References wfl::formula_debugger::evaluate_arg_callback().
Referenced by wfl::formula_expression::evaluate().
| variant wfl::evaluate_formula_callback | ( | formula_debugger & | fdb, |
| const formula & | f | ||
| ) |
Definition at line 49 of file debugger_fwd.cpp.
References wfl::formula_debugger::evaluate_formula_callback(), and f.
| variant wfl::evaluate_formula_callback | ( | formula_debugger & | fdb, |
| const formula & | f, | ||
| const formula_callable & | variables | ||
| ) |
Definition at line 43 of file debugger_fwd.cpp.
References wfl::formula_debugger::evaluate_formula_callback(), and f.
Referenced by wfl::formula::evaluate(), and wfl::formula::evaluate().
Executes all action_callables in execute using the provided context.
Definition at line 696 of file variant.cpp.
References wfl::variant::as_list(), wfl::variant::is_list(), and WRN_SF.
Referenced by gui2::image_shape::draw(), gui2::text_shape::draw(), and wfl::safe_call_callable::execute_self().
| variant wfl::make_callable | ( | Args &&... | args | ) |
Definition at line 312 of file callable.hpp.
|
static |
Definition at line 109 of file debugger.cpp.
Referenced by wfl::formula_debugger::evaluate_arg_callback(), wfl::formula_debugger::evaluate_formula_callback(), and wfl::formula_debugger::evaluate_formula_callback().
|
static |
Functions to handle the actual parsing of WFL.
Definition at line 1054 of file formula.cpp.
Referenced by parse_expression().
|
static |
Definition at line 1120 of file formula.cpp.
References parse_expression(), and wfl::tokenizer::token::type.
Referenced by parse_expression().
| expression_ptr wfl::parse_expression | ( | const tk::token * | i1, |
| const tk::token * | i2, | ||
| function_symbol_table * | symbols | ||
| ) |
Definition at line 1242 of file formula.cpp.
References wfl::function_symbol_table::add_function(), wfl::tokenizer::token::begin, wfl::function_symbol_table::create_function(), wfl::formula::create_optional_formula(), e, wfl::tokenizer::token::end, f, wfl::tokenizer::token::filename, wfl::function_symbol_table::get_builtins(), i, wfl::tokenizer::token::line_number, n, operator_precedence(), parse_args(), parse_expression(), parse_function_args(), parse_set_args(), parse_where_clauses(), tokens_to_string(), and wfl::tokenizer::token::type.
Referenced by wfl::formula::formula(), wfl::formula::formula(), parse_args(), parse_expression(), parse_set_args(), and parse_where_clauses().
|
static |
Definition at line 1086 of file formula.cpp.
References wfl::tokenizer::token::begin, wfl::tokenizer::token::end, wfl::tokenizer::token::filename, wfl::tokenizer::token::line_number, tokens_to_string(), and wfl::tokenizer::token::type.
Referenced by parse_expression().
|
static |
Definition at line 1143 of file formula.cpp.
References wfl::tokenizer::token::filename, wfl::tokenizer::token::line_number, parse_expression(), tokens_to_string(), and wfl::tokenizer::token::type.
Referenced by parse_expression().
|
static |
Definition at line 1181 of file formula.cpp.
References wfl::tokenizer::token::begin, wfl::tokenizer::token::end, wfl::tokenizer::token::filename, wfl::tokenizer::token::line_number, parse_expression(), tokens_to_string(), and wfl::tokenizer::token::type.
Referenced by parse_expression().
Definition at line 67 of file formula.cpp.
References wfl::tokenizer::token::begin, and wfl::tokenizer::token::end.
Referenced by wfl::formula::formula(), parse_expression(), parse_function_args(), parse_set_args(), and parse_where_clauses().
| std::shared_ptr< T > wfl::value_cast | ( | const variant & | v | ) |
Definition at line 77 of file variant.cpp.
|
static |
For printing error messages when WFL parsing or evaluation fails, this contains the names of the WFL functions being evaluated.
Two C++ threads might be evaluating WFL at the same; declaring this thread_local is a quick bugfix which should probably be replaced by having a context-object for each WFL evaluation.
Definition at line 51 of file function.cpp.
Referenced by wfl::call_stack_manager::call_stack_manager(), wfl::call_stack_manager::get(), wfl::end_breakpoint::is_break_now(), wfl::step_in_breakpoint::is_break_now(), wfl::step_out_breakpoint::is_break_now(), wfl::next_breakpoint::is_break_now(), and wfl::call_stack_manager::~call_stack_manager().