The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Namespaces | Typedefs | Functions
formula.cpp File Reference
#include "formula/formula.hpp"
#include "formula/callable.hpp"
#include "formula/function.hpp"
#include "random.hpp"
#include "serialization/string_utils.hpp"
#include <cassert>
#include <set>
#include <sstream>
Include dependency graph for formula.cpp:

Go to the source code of this file.

Classes

class  wfl::null_expression
 
class  wfl::function_list_expression
 Classes that encapsulate and handle the various formula functions. More...
 
class  wfl::list_expression
 
class  wfl::map_expression
 
class  wfl::unary_operator_expression
 
class  wfl::string_callable
 
class  wfl::list_callable
 
class  wfl::map_callable
 
class  wfl::dot_callable
 
class  wfl::dot_expression
 
class  wfl::square_bracket_expression
 
class  wfl::operator_expression
 
class  wfl::where_variables
 
class  wfl::where_expression
 
class  wfl::identifier_expression
 
class  wfl::integer_expression
 
class  wfl::decimal_expression
 
class  wfl::string_expression
 
struct  wfl::string_expression::substitution
 

Namespaces

 wfl
 

Typedefs

using wfl::expr_table = std::map< std::string, expression_ptr >
 
using wfl::expr_table_evaluated = std::map< std::string, variant >
 
using wfl::expr_table_ptr = std::shared_ptr< expr_table >
 

Functions

static std::string wfl::tokens_to_string (const tk::token *i1, const tk::token *i2)
 
expression_ptr wfl::parse_expression (const tk::token *i1, const tk::token *i2, function_symbol_table *symbols)
 
static int wfl::operator_precedence (const tk::token &t)
 Functions to handle the actual parsing of WFL. More...
 
static void wfl::parse_function_args (const tk::token *&i1, const tk::token *i2, std::vector< std::string > *res)
 
static void wfl::parse_args (const tk::token *i1, const tk::token *i2, std::vector< expression_ptr > *res, function_symbol_table *symbols)
 
static void wfl::parse_set_args (const tk::token *i1, const tk::token *i2, std::vector< expression_ptr > *res, function_symbol_table *symbols)
 
static void wfl::parse_where_clauses (const tk::token *i1, const tk::token *i2, expr_table_ptr res, function_symbol_table *symbols)