OmniSciDB  4201147b46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
import_export::anonymous_namespace{ExpressionParser.cpp} Namespace Reference

Classes

class  Function_substr
 
class  Function_regex_match
 
class  Function_split_part
 
class  Function_int
 
class  Function_float
 
class  Function_double
 
class  Function_str
 
class  Function_bool
 
class  Operator_not
 

Functions

std::string ms_to_ss (const mup::string_type &s)
 
mup::string_type ss_to_ms (const std::string &s)
 
mup::Value evaluate (mup::ParserX *parser)
 

Function Documentation

mup::Value import_export::anonymous_namespace{ExpressionParser.cpp}::evaluate ( mup::ParserX *  parser)

Definition at line 339 of file ExpressionParser.cpp.

References ms_to_ss(), and run_benchmark_import::result.

Referenced by import_export::ExpressionParser::evalAsBool(), import_export::ExpressionParser::evalAsDouble(), import_export::ExpressionParser::evalAsInt(), and import_export::ExpressionParser::evalAsString().

339  {
340  mup::Value result;
341  try {
342  result = parser->Eval();
343  } catch (mup::ParserError& err) {
344  throw std::runtime_error("Parser Error: " + ms_to_ss(err.GetMsg()));
345  } catch (std::exception& err) {
346  throw std::runtime_error("Unexpected muparserx Error: " + std::string(err.what()));
347  }
348  return result;
349 }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string import_export::anonymous_namespace{ExpressionParser.cpp}::ms_to_ss ( const mup::string_type &  s)

Definition at line 44 of file ExpressionParser.cpp.

Referenced by import_export::anonymous_namespace{ExpressionParser.cpp}::Function_regex_match::Eval(), import_export::anonymous_namespace{ExpressionParser.cpp}::Function_split_part::Eval(), import_export::anonymous_namespace{ExpressionParser.cpp}::Function_int::Eval(), import_export::anonymous_namespace{ExpressionParser.cpp}::Function_float::Eval(), import_export::anonymous_namespace{ExpressionParser.cpp}::Function_double::Eval(), import_export::anonymous_namespace{ExpressionParser.cpp}::Function_bool::Eval(), import_export::ExpressionParser::evalAsString(), and evaluate().

44  {
45 #if defined(_MSC_VER)
46  std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t> converter;
47  return converter.to_bytes(s);
48 #else
49  return s;
50 #endif
51 }

+ Here is the caller graph for this function:

mup::string_type import_export::anonymous_namespace{ExpressionParser.cpp}::ss_to_ms ( const std::string &  s)

Definition at line 53 of file ExpressionParser.cpp.

Referenced by import_export::anonymous_namespace{ExpressionParser.cpp}::Function_regex_match::Eval(), import_export::anonymous_namespace{ExpressionParser.cpp}::Function_split_part::Eval(), import_export::anonymous_namespace{ExpressionParser.cpp}::Function_str::Eval(), import_export::ExpressionParser::setExpression(), import_export::ExpressionParser::setIntConstant(), and import_export::ExpressionParser::setStringConstant().

53  {
54 #if defined(_MSC_VER)
55  std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t> converter;
56  return converter.from_bytes(s);
57 #else
58  return s;
59 #endif
60 }

+ Here is the caller graph for this function: