Hugintrunk
0.1
|
functions to parse expressions from strings More...
#include <exception>
#include <stack>
#include <queue>
#include <map>
#include <functional>
#include <cmath>
#include "ParseExp.h"
#include "hugin_utils/utils.h"
#include <panodata/ImageVariableTranslate.h>
#include "panodata/image_variables.h"
Go to the source code of this file.
Namespaces | |
Parser | |
Parser::ShuntingYard | |
Parser::ShuntingYard::RPNTokens | |
classes for parsed tokens in rpn queue | |
Parser::ShuntingYard::Operators | |
classes for operators on shunting yards operator stack | |
Macros | |
#define | _USE_MATH_DEFINES |
Typedefs | |
typedef std::map< std::string, double > | Parser::ConstantMap |
Functions | |
void | Parser::ShuntingYard::ClearQueue (std::queue< RPNTokens::TokenBase * > &input) |
clear the queue More... | |
std::string | Parser::ShuntingYard::RemoveWhiteSpaces (const std::string &text) |
remove all whitespaces and convert to lowercase More... | |
void | Parser::ShuntingYard::InitParser () |
initialize some internal variables More... | |
void | Parser::ShuntingYard::CleanUpParser () |
clean up some internal static variables More... | |
std::string | Parser::ShuntingYard::FindOperator (const std::string &searchString) |
compare the first characters in string with supportedBinaryOperations, return longest match More... | |
bool | Parser::ShuntingYard::ConvertToRPN (const std::string &expression, const ConstantMap &constants, std::queue< RPNTokens::TokenBase * > &rpn) |
convert expression to RPN * More... | |
bool | Parser::ShuntingYard::EvaluateRPN (std::queue< RPNTokens::TokenBase * > &input, double &result) |
evaluate RPN in input More... | |
bool | Parser::ParseExpression (const std::string &expression, double &result, const ConstantMap &constants, std::string &error) |
parse complete expression in 2 steps More... | |
void | Parser::ParseSingleVar (ParseVarVec &varVec, const std::string &s, std::ostream &errorStream) |
void | Parser::ParseVariableString (ParseVarVec &parseVec, const std::string &input, std::ostream &errorStream, void(*func)(ParseVarVec &, const std::string &, std::ostream &)) |
parse complete variables string More... | |
bool | Parser::UpdateSingleVar (HuginBase::Panorama &pano, const Parser::ParseVar &parseVar, const Parser::ConstantMap &constants, size_t imgNr, std::ostream &statusStream, std::ostream &errorStream) |
bool | Parser::CalculateConstant (HuginBase::Panorama &pano, const Parser::ParseVar &parseVar, Parser::ConstantMap &constants, std::ostream &statusStream, std::ostream &errorStream) |
Variables | |
static std::map< std::string, Operators::OperatorBase * > | Parser::ShuntingYard::supportedBinaryOperations |
static Operators::OperatorBase * | Parser::ShuntingYard::parenthesesOperator = nullptr |
static Operators::OperatorBase * | Parser::ShuntingYard::ifOperator = nullptr |
static Operators::OperatorBase * | Parser::ShuntingYard::ifOperatorClose = nullptr |
static std::map< std::string, Operators::FunctionOperator * > | Parser::ShuntingYard::supportedFunctions |
functions to parse expressions from strings
Definition in file ParseExp.cpp.
#define _USE_MATH_DEFINES |
Definition at line 33 of file ParseExp.cpp.