C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html
This commit is contained in:
parent
b3b4cee1c5
commit
88acc921e2
38
exprtk.hpp
38
exprtk.hpp
|
@ -16732,7 +16732,7 @@ namespace exprtk
|
|||
return (*this);
|
||||
}
|
||||
|
||||
inline bool operator==(const symbol_table<T>& st)
|
||||
inline bool operator==(const symbol_table<T>& st) const
|
||||
{
|
||||
return (this == &st) || (control_block_ == st.control_block_);
|
||||
}
|
||||
|
@ -17729,7 +17729,7 @@ namespace exprtk
|
|||
return *this;
|
||||
}
|
||||
|
||||
inline bool operator==(const expression<T>& e)
|
||||
inline bool operator==(const expression<T>& e) const
|
||||
{
|
||||
return (this == &e);
|
||||
}
|
||||
|
@ -18516,7 +18516,7 @@ namespace exprtk
|
|||
{
|
||||
parser_.state_.scope_depth++;
|
||||
#ifdef exprtk_enable_debugging
|
||||
std::string depth(2 * parser_.state_.scope_depth,'-');
|
||||
const std::string depth(2 * parser_.state_.scope_depth,'-');
|
||||
exprtk_debug(("%s> Scope Depth: %02d\n",
|
||||
depth.c_str(),
|
||||
static_cast<int>(parser_.state_.scope_depth)));
|
||||
|
@ -18528,7 +18528,7 @@ namespace exprtk
|
|||
parser_.sem_.deactivate(parser_.state_.scope_depth);
|
||||
parser_.state_.scope_depth--;
|
||||
#ifdef exprtk_enable_debugging
|
||||
std::string depth(2 * parser_.state_.scope_depth,'-');
|
||||
const std::string depth(2 * parser_.state_.scope_depth,'-');
|
||||
exprtk_debug(("<%s Scope Depth: %02d\n",
|
||||
depth.c_str(),
|
||||
static_cast<int>(parser_.state_.scope_depth)));
|
||||
|
@ -20278,9 +20278,9 @@ namespace exprtk
|
|||
#ifdef exprtk_enable_debugging
|
||||
inline void next_token()
|
||||
{
|
||||
std::string ct_str = current_token().value;
|
||||
const std::string ct_str = current_token().value;
|
||||
parser_helper::next_token();
|
||||
std::string depth(2 * state_.scope_depth,' ');
|
||||
const std::string depth(2 * state_.scope_depth,' ');
|
||||
exprtk_debug(("%s"
|
||||
"prev[%s] --> curr[%s]\n",
|
||||
depth.c_str(),
|
||||
|
@ -20330,7 +20330,7 @@ namespace exprtk
|
|||
|
||||
end_token = current_token();
|
||||
|
||||
std::string sub_expr = construct_subexpr(begin_token,end_token);
|
||||
const std::string sub_expr = construct_subexpr(begin_token, end_token);
|
||||
|
||||
exprtk_debug(("parse_corpus(%02d) Subexpr: %s\n",
|
||||
static_cast<int>(arg_list.size() - 1),
|
||||
|
@ -20539,7 +20539,7 @@ namespace exprtk
|
|||
else if (current_state.left < precedence)
|
||||
break;
|
||||
|
||||
lexer::token prev_token = current_token();
|
||||
const lexer::token prev_token = current_token();
|
||||
|
||||
next_token();
|
||||
|
||||
|
@ -23955,9 +23955,9 @@ namespace exprtk
|
|||
}
|
||||
|
||||
if (
|
||||
!token_is(token_t::e_rbracket ,prsrhlpr_t::e_hold) &&
|
||||
!token_is(token_t::e_rcrlbracket,prsrhlpr_t::e_hold) &&
|
||||
!token_is(token_t::e_rsqrbracket,prsrhlpr_t::e_hold)
|
||||
!token_is(token_t::e_rbracket , prsrhlpr_t::e_hold) &&
|
||||
!token_is(token_t::e_rcrlbracket, prsrhlpr_t::e_hold) &&
|
||||
!token_is(token_t::e_rsqrbracket, prsrhlpr_t::e_hold)
|
||||
)
|
||||
{
|
||||
if (!token_is(token_t::e_eof))
|
||||
|
@ -24243,9 +24243,9 @@ namespace exprtk
|
|||
}
|
||||
|
||||
if (
|
||||
!token_is(token_t::e_rbracket ,prsrhlpr_t::e_hold) &&
|
||||
!token_is(token_t::e_rcrlbracket,prsrhlpr_t::e_hold) &&
|
||||
!token_is(token_t::e_rsqrbracket,prsrhlpr_t::e_hold)
|
||||
!token_is(token_t::e_rbracket , prsrhlpr_t::e_hold) &&
|
||||
!token_is(token_t::e_rcrlbracket, prsrhlpr_t::e_hold) &&
|
||||
!token_is(token_t::e_rsqrbracket, prsrhlpr_t::e_hold)
|
||||
)
|
||||
{
|
||||
if (!token_is(token_t::e_eof,prsrhlpr_t::e_hold))
|
||||
|
@ -24732,7 +24732,7 @@ namespace exprtk
|
|||
return error_node();
|
||||
}
|
||||
|
||||
lexer::token prev_token = current_token();
|
||||
const lexer::token prev_token = current_token();
|
||||
|
||||
if (token_is(token_t::e_rsqrbracket))
|
||||
{
|
||||
|
@ -29295,7 +29295,7 @@ namespace exprtk
|
|||
typedef details::T0oT1oT2_base_node<Type>* sf3ext_base_ptr;
|
||||
|
||||
sf3ext_base_ptr n = static_cast<sf3ext_base_ptr>(sf3node);
|
||||
std::string id = "t" + expr_gen.to_str(operation) + "(" + n->type_id() + ")";
|
||||
const std::string id = "t" + expr_gen.to_str(operation) + "(" + n->type_id() + ")";
|
||||
|
||||
switch (n->type())
|
||||
{
|
||||
|
@ -29338,7 +29338,7 @@ namespace exprtk
|
|||
|
||||
sf3ext_base_ptr n = static_cast<sf3ext_base_ptr>(sf3node);
|
||||
|
||||
std::string id = "(" + n->type_id() + ")" + expr_gen.to_str(operation) + "t";
|
||||
const std::string id = "(" + n->type_id() + ")" + expr_gen.to_str(operation) + "t";
|
||||
|
||||
switch (n->type())
|
||||
{
|
||||
|
@ -36738,7 +36738,7 @@ namespace exprtk
|
|||
}
|
||||
}
|
||||
|
||||
bool eof()
|
||||
bool eof() const
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
|
@ -36749,7 +36749,7 @@ namespace exprtk
|
|||
}
|
||||
}
|
||||
|
||||
file_mode get_file_mode(const std::string& access)
|
||||
file_mode get_file_mode(const std::string& access) const
|
||||
{
|
||||
if (access.empty() || access.size() > 2)
|
||||
return e_error;
|
||||
|
|
Loading…
Reference in New Issue