Namespaces | |
actions | |
builtins | |
gamestate | |
tokenizer | |
Enumerations | |
enum | FORMULA_ACCESS_TYPE { FORMULA_READ_ONLY, FORMULA_WRITE_ONLY, FORMULA_READ_WRITE } |
Functions | |
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. More... | |
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, expr_table_ptr res, function_symbol_table *symbols) |
static value_base_ptr | null_value (new variant_value_base) |
static std::string | variant_type_to_string (VARIANT_TYPE type) |
static std::string | was_expecting (const std::string &message, const variant &v) |
MAKE_ENUM (VARIANT_TYPE,(TYPE_NULL, "null")(TYPE_INT, "int")(TYPE_DECIMAL, "decimal")(TYPE_CALLABLE, "object")(TYPE_LIST, "list")(TYPE_STRING, "string")(TYPE_MAP, "map")) | |
The various types the variant class is designed to handle. More... | |
template<typename T > | |
static std::shared_ptr< T > | value_cast (value_base_ptr ptr) |
Casts a variant_value_base shared pointer to a new derived type. More... | |
template<typename T > | |
static T & | value_ref_cast (variant_value_base &ptr) |
Casts a variant_value_base reference to a new derived type. More... | |
Variables | |
static std::deque< std::string > | call_stack |
typedef std::shared_ptr<base_breakpoint> wfl::breakpoint_ptr |
Definition at line 36 of file debugger_fwd.hpp.
typedef std::map< std::string, const_formula_ptr > wfl::candidate_action_filters |
Definition at line 33 of file candidates.hpp.
typedef std::shared_ptr<base_candidate_action> wfl::candidate_action_ptr |
Definition at line 36 of file candidates.hpp.
using wfl::const_formula_callable_ptr = typedef std::shared_ptr<const formula_callable> |
Definition at line 43 of file callable_fwd.hpp.
typedef std::shared_ptr<const formula> wfl::const_formula_ptr |
Definition at line 23 of file formula_fwd.hpp.
using wfl::const_map_formula_callable_ptr = typedef std::shared_ptr<const map_formula_callable> |
Definition at line 306 of file callable.hpp.
using wfl::expr_table = typedef std::map<std::string, expression_ptr> |
Definition at line 59 of file formula.cpp.
using wfl::expr_table_evaluated = typedef std::map<std::string, variant> |
Definition at line 60 of file formula.cpp.
using wfl::expr_table_ptr = typedef std::shared_ptr<expr_table> |
Definition at line 61 of file formula.cpp.
typedef std::shared_ptr< formula_expression > wfl::expression_ptr |
Definition at line 28 of file formula.hpp.
using wfl::formula_callable_ptr = typedef std::shared_ptr<formula_callable> |
Definition at line 42 of file callable_fwd.hpp.
typedef std::shared_ptr<formula_function> wfl::formula_function_ptr |
Definition at line 224 of file function.hpp.
using wfl::formula_input_vector = typedef std::vector<formula_input> |
Definition at line 41 of file callable_fwd.hpp.
typedef std::shared_ptr<formula> wfl::formula_ptr |
Definition at line 21 of file formula_fwd.hpp.
using wfl::formula_seen_stack = typedef std::vector<const_formula_callable_ptr> |
Definition at line 44 of file callable_fwd.hpp.
typedef std::shared_ptr<function_expression> wfl::function_expression_ptr |
Definition at line 167 of file function.hpp.
typedef std::map<std::string, formula_function_ptr> wfl::functions_map |
Definition at line 225 of file function.hpp.
using wfl::map_formula_callable_ptr = typedef std::shared_ptr<map_formula_callable> |
Definition at line 305 of file callable.hpp.
typedef std::pair< unit_map::unit_iterator, int> wfl::unit_formula_pair |
typedef std::multiset< unit_formula_pair, unit_formula_compare > wfl::unit_formula_set |
using wfl::value_base_ptr = typedef std::shared_ptr<variant_value_base> |
Definition at line 50 of file variant_value.hpp.
using wfl::variant_map_raw = typedef std::map<variant, variant> |
Definition at line 49 of file variant_value.hpp.
using wfl::variant_vector = typedef std::vector<variant> |
Definition at line 48 of file variant_value.hpp.
Enumerator | |
---|---|
FORMULA_READ_ONLY | |
FORMULA_WRITE_ONLY | |
FORMULA_READ_WRITE |
Definition at line 31 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 26 of file debugger_fwd.cpp.
References wfl::formula_debugger::add_debug_info().
Referenced by wfl::gamestate::DEFINE_WFL_FUNCTION(), wfl::builtins::DEFINE_WFL_FUNCTION(), wfl::actions::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().
variant wfl::evaluate_arg_callback | ( | formula_debugger & | fdb, |
const formula_expression & | expression, | ||
const formula_callable & | variables | ||
) |
Definition at line 36 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, | ||
const formula_callable & | variables | ||
) |
Definition at line 42 of file debugger_fwd.cpp.
References wfl::formula_debugger::evaluate_formula_callback().
Referenced by wfl::formula::evaluate().
variant wfl::evaluate_formula_callback | ( | formula_debugger & | fdb, |
const formula & | f | ||
) |
Definition at line 48 of file debugger_fwd.cpp.
References wfl::formula_debugger::evaluate_formula_callback().
wfl::MAKE_ENUM | ( | VARIANT_TYPE | , |
(TYPE_NULL, "null")(TYPE_INT, "int")(TYPE_DECIMAL, "decimal")(TYPE_CALLABLE, "object")(TYPE_LIST, "list")(TYPE_STRING, "string")(TYPE_MAP, "map") | |||
) |
The various types the variant class is designed to handle.
|
static |
Definition at line 109 of file debugger.cpp.
References wfl::debug_info::counter(), DBG_FDB, wfl::debug_info::name(), and wfl::debug_info::str().
Referenced by display_chat_manager::add_chat_message(), wesnothd::server::adminmsg_handler(), gui2::build(), gui2::builder_grid::builder_grid(), events::menu_handler::can_recruit(), spirit_po::catalog< hashmap_type, pf_compiler >::catalog(), ng::depcheck::manager::change_era(), events::chat_handler::change_logging(), ng::depcheck::manager::change_scenario(), checkrepeated(), gui2::chatbox::close_window(), closegoto(), addons_client::connect(), help::convert_to_wml(), mapgen_lua_kernel::create_map(), lua_map_generator::create_map(), mapgen_lua_kernel::create_scenario(), lua_map_generator::create_scenario(), db_traceback(), deprecated_message(), gui2::dialogs::mp_create_game::dialog_exit_hook(), set_scontext_synced::do_final_checkup(), events::menu_handler::do_search(), errorlimit(), wfl::formula_debugger::evaluate_arg_callback(), wfl::formula_debugger::evaluate_formula_callback(), game_events::wml_event_pump::fill_wml_messages_map(), findloader(), gui2::event::dispatcher::fire(), GCTM(), help::generate_contents(), spirit_po::catalog< hashmap_type, pf_compiler >::get(), display::get_builder(), editor::terrain_palette::get_help_string(), config::get_old_attribute(), ai::readonly_context_impl::get_readonly_context(), gui2::dialogs::get_title_suffix(), help::help_browser::handle_event(), play_controller::handle_generic_event(), wesnothd::server::handle_message(), help::help_text_area::handle_ref_cfg(), campaignd::server::handle_upload(), wesnothd::server::handle_whisper(), config::has_old_attribute(), config::insert(), intf_deprecated_message(), intf_find_path(), lua_map_location::intf_get_direction(), game_lua_kernel::intf_log(), intf_log(), spirit_po::po_message::is_plural(), editor::context_manager::load_map(), application_lua_kernel::load_script_from_string(), lua_kernel_base::load_string(), ai_testing::log_turn(), lua_map_generator::lua_map_generator(), luaG_runerror(), luaO_pushfstring(), luaW_getglobal(), luaW_type_error(), game_lua_kernel::my_name(), gui2::parse_linked_group_definitions(), help::parse_text(), wesnothd::game::perform_controller_tweaks(), wesnothd::server::pm_handler(), wesnothd::server::process_command(), wesnothd::game::process_message(), play_controller::process_oos(), wesnothd::game::process_turn(), wesnothd::game::process_whiteboard(), lua_kernel_base::protected_call(), gui2::dialogs::addon_manager::publish_addon(), read_long_string(), events::menu_handler::recall(), events::menu_handler::save_map(), editor::map_context::save_map(), editor::map_context::save_scenario(), events::menu_handler::search(), searchpath(), wesnothd::server::send_server_message(), wesnothd::game::send_server_message(), campaignd::server::server_info(), lua_kernel_base::set_external_log(), help::help_text_area::set_items(), gui2::show_error_message(), help::show_help(), lua_gui2::show_popup_dialog(), preferences::show_wesnothd_server_search(), game_events::wml_event_pump::show_wml_messages(), wesnothd::game::start_game(), help::help_text_area::str_to_align(), wesnothd::game::transfer_side_control(), typeerror(), undefgoto(), lua_map_generator::user_config(), vgettext_impl(), vngettext_impl(), display_chat_manager::whisperers(), editor::wrap_exc(), gui2::dialogs::lua_interpreter::lua_model::~lua_model(), and ai::readonly_context::~readonly_context().
|
static |
|
static |
Functions to handle the actual parsing of WFL.
Definition at line 1073 of file formula.cpp.
References wfl::tokenizer::token::begin, wfl::tokenizer::token::end, and n.
Referenced by parse_expression().
|
static |
Definition at line 1139 of file formula.cpp.
References parse_expression(), wfl::tokenizer::TOKEN_COMMA, wfl::tokenizer::TOKEN_LPARENS, wfl::tokenizer::TOKEN_LSQUARE, wfl::tokenizer::TOKEN_RPARENS, wfl::tokenizer::TOKEN_RSQUARE, 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 1263 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::formula_error::formula_error(), wfl::function_symbol_table::get_builtins(), i, wfl::tokenizer::token::line_number, n, operator_precedence(), parse_args(), parse_function_args(), parse_set_args(), parse_where_clauses(), wfl::tokenizer::TOKEN_DECIMAL, wfl::tokenizer::TOKEN_IDENTIFIER, wfl::tokenizer::TOKEN_INTEGER, wfl::tokenizer::TOKEN_KEYWORD, wfl::tokenizer::TOKEN_LPARENS, wfl::tokenizer::TOKEN_LSQUARE, wfl::tokenizer::TOKEN_OPERATOR, wfl::tokenizer::TOKEN_POINTER, wfl::tokenizer::TOKEN_RPARENS, wfl::tokenizer::TOKEN_RSQUARE, wfl::tokenizer::TOKEN_SEMICOLON, wfl::tokenizer::TOKEN_STRING_LITERAL, tokens_to_string(), wfl::tokenizer::token::type, and wfl::formula_error::type.
Referenced by wfl::null_expression::execute(), wfl::formula::formula(), parse_args(), parse_set_args(), and parse_where_clauses().
|
static |
Definition at line 1105 of file formula.cpp.
References wfl::tokenizer::token::begin, wfl::tokenizer::token::end, wfl::tokenizer::token::filename, wfl::formula_error::formula_error(), wfl::tokenizer::token::line_number, wfl::tokenizer::TOKEN_COMMA, wfl::tokenizer::TOKEN_IDENTIFIER, wfl::tokenizer::TOKEN_LPARENS, wfl::tokenizer::TOKEN_RPARENS, tokens_to_string(), wfl::tokenizer::token::type, and wfl::formula_error::type.
Referenced by parse_expression().
|
static |
Definition at line 1163 of file formula.cpp.
References wfl::tokenizer::token::filename, wfl::formula_error::formula_error(), wfl::tokenizer::token::line_number, parse_expression(), wfl::tokenizer::TOKEN_COMMA, wfl::tokenizer::TOKEN_LPARENS, wfl::tokenizer::TOKEN_LSQUARE, wfl::tokenizer::TOKEN_POINTER, wfl::tokenizer::TOKEN_RPARENS, wfl::tokenizer::TOKEN_RSQUARE, tokens_to_string(), and wfl::tokenizer::token::type.
Referenced by parse_expression().
|
static |
Definition at line 1202 of file formula.cpp.
References wfl::tokenizer::token::begin, wfl::tokenizer::token::end, wfl::tokenizer::token::filename, wfl::formula_error::formula_error(), wfl::tokenizer::token::line_number, parse_expression(), wfl::tokenizer::TOKEN_COMMA, wfl::tokenizer::TOKEN_IDENTIFIER, wfl::tokenizer::TOKEN_LPARENS, wfl::tokenizer::TOKEN_LSQUARE, wfl::tokenizer::TOKEN_OPERATOR, wfl::tokenizer::TOKEN_RPARENS, wfl::tokenizer::TOKEN_RSQUARE, tokens_to_string(), and wfl::tokenizer::token::type.
Referenced by parse_expression().
Definition at line 65 of file formula.cpp.
References wfl::tokenizer::token::begin, wfl::tokenizer::token::end, and expr().
Referenced by wfl::formula::formula(), parse_expression(), parse_function_args(), parse_set_args(), and parse_where_clauses().
|
static |
Casts a variant_value_base shared pointer to a new derived type.
Definition at line 59 of file variant_value.hpp.
References wfl::type_error::type_error().
Referenced by wfl::variant_list::list_op(), and wfl::variant::value_cast().
|
static |
Casts a variant_value_base reference to a new derived type.
Definition at line 71 of file variant_value.hpp.
References wfl::type_error::type_error().
Referenced by wfl::variant_numeric::equals(), wfl::variant_callable::equals(), wfl::variant_string::equals(), wfl::variant_list::equals(), wfl::variant_map::equals(), wfl::variant_callable::less_than(), wfl::variant_list::less_than(), and wfl::variant_map::less_than().
|
static |
Definition at line 42 of file variant.cpp.
Referenced by wfl::variant::must_be(), and wfl::variant::must_both_be().
|
static |
Definition at line 48 of file variant.cpp.
References wfl::variant::to_debug_string(), and wfl::variant::type_string().
Referenced by wfl::variant::as_decimal(), wfl::variant::concatenate(), wfl::variant::contains(), wfl::variant::must_be(), wfl::variant::num_elements(), and wfl::variant::operator[]().
|
static |
Definition at line 39 of file function.cpp.
Referenced by gui2::grid::can_mouse_focus(), gui2::viewport::child_populate_dirty_list(), gui2::pane::child_populate_dirty_list(), gui2::container_base::child_populate_dirty_list(), gui2::matrix::child_populate_dirty_list(), gui2::listbox::child_populate_dirty_list(), gui2::grid::child_populate_dirty_list(), gui2::generator< minimum_selection, maximum_selection, my_placement, select_action >::child_populate_dirty_list(), gui2::window::draw(), gui2::scrollbar_container::finalize_subclass(), gui2::tree_view::get_root_node(), gui2::widget::impl_draw_foreground(), gui2::tree_view_node::impl_populate_dirty_list(), 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 gui2::listbox::select_last_row().