Rosetta
|
Classes | |
class | AbsoluteValueExpression |
class | AddExpression |
class | AndExpression |
class | ArithmeticASTExpression |
class | ArithmeticASTFactor |
class | ArithmeticASTFunction |
class | ArithmeticASTNode |
Base class for Abstract Syntax Tree (AST) for the simple Arithmetic language defined here. More... | |
class | ArithmeticASTRestExpression |
class | ArithmeticASTRestTerm |
class | ArithmeticASTTerm |
class | ArithmeticASTValue |
either a variable or a literal. More... | |
class | ArithmeticScanner |
class | ASTPrinter |
Traverse the AST and print it to standard out. More... | |
class | ASTVisitor |
Double-dispatch visitor pattern for abstract syntax tree. More... | |
class | BinaryExpression |
class | BooleanExpressionCreator |
class | BooleanExpressionScanner |
class | DivideExpression |
class | EqualsExpression |
class | Expression |
Pure virtual base class to define arbitrary expressions for scripting arithmetic operations (e.g. addition and multipliction). More... | |
class | ExpressionCreator |
Class to traverse the abstract syntax tree produced by the parsing of a properly-formed string in the Arithmetic expression language. Produces an Expression tree capable of performing arithmetic. Connects the "variable" nodes in this tree to the owning WrapperOptEMultifunc so that their values can be retrieved during expression evaluation inside the WrapperOptEMultifunc functor. More... | |
class | FunctionToken |
class | GT_Expression |
Greater Than. More... | |
class | GTE_Expression |
Greater Than or Equal To. More... | |
class | ITEExpression |
class | LiteralExpression |
class | LiteralToken |
class | LT_Expression |
Less Than. More... | |
class | LTE_Expression |
Less Than or Equal To. More... | |
class | MaxExpression |
class | MetaMaxExpression |
Evaluates ee1 when e1 is larger than e2; evaluates ee2 otherwise. More... | |
class | MetaMinExpression |
Evaluates ee1 when e1 is less than e2; evaluates ee2 otherwise. More... | |
class | MinExpression |
class | MultiplyExpression |
class | NaryExpression |
class | NotExpression |
class | OrExpression |
class | SimpleExpressionCreator |
class | SimpleToken |
class | SquarerootExpression |
class | SubtractExpression |
class | Token |
class | TokenSet |
class | UnaryExpression |
class | VariableExpression |
class | VariableToken |
Enumerations | |
enum | TokenType { INVALID_TOKEN_TYPE, LITERAL, VARIABLE, FUNCTION, COMMA, LEFT_PAREN, RIGHT_PAREN, PLUS_SYMBOL, SUBTRACT_SYMBOL, MULTIPLY_SYMBOL, DIVIDE_SYMBOL } |
Functions | |
std::string | token_type_name (TokenType tt) |
bool | is_numeral (char c) |
bool | is_letter (char c) |
ExpressionCOP | parse_string_to_expression (std::string const &input_string) |
ExpressionCOP | parse_string_to_boolean_expression (std::string const &input_string) |
typedef utility::pointer::shared_ptr< AddExpression const > numeric::expression_parser::AddExpressionCOP |
Definition at line 133 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< AddExpression > numeric::expression_parser::AddExpressionOP |
Definition at line 131 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ArithmeticASTExpression const > numeric::expression_parser::ArithmeticASTExpressionCOP |
Definition at line 67 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ArithmeticASTExpression > numeric::expression_parser::ArithmeticASTExpressionOP |
Definition at line 65 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ArithmeticASTFactor const > numeric::expression_parser::ArithmeticASTFactorCOP |
Definition at line 79 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ArithmeticASTFactor > numeric::expression_parser::ArithmeticASTFactorOP |
Definition at line 77 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ArithmeticASTFunction const > numeric::expression_parser::ArithmeticASTFunctionCOP |
Definition at line 71 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ArithmeticASTFunction > numeric::expression_parser::ArithmeticASTFunctionOP |
Definition at line 69 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ArithmeticASTNode const > numeric::expression_parser::ArithmeticASTNodeCOP |
Definition at line 63 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ArithmeticASTNode > numeric::expression_parser::ArithmeticASTNodeOP |
Definition at line 61 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ArithmeticASTRestExpression const > numeric::expression_parser::ArithmeticASTRestExpressionCOP |
Definition at line 91 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ArithmeticASTRestExpression > numeric::expression_parser::ArithmeticASTRestExpressionOP |
Definition at line 89 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ArithmeticASTRestTerm const > numeric::expression_parser::ArithmeticASTRestTermCOP |
Definition at line 87 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ArithmeticASTRestTerm > numeric::expression_parser::ArithmeticASTRestTermOP |
Definition at line 85 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ArithmeticASTTerm const > numeric::expression_parser::ArithmeticASTTermCOP |
Definition at line 75 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ArithmeticASTTerm > numeric::expression_parser::ArithmeticASTTermOP |
Definition at line 73 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ArithmeticASTValue const > numeric::expression_parser::ArithmeticASTValueCOP |
Definition at line 83 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ArithmeticASTValue > numeric::expression_parser::ArithmeticASTValueOP |
Definition at line 81 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ArithmeticScanner const > numeric::expression_parser::ArithmeticScannerCOP |
Definition at line 56 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ArithmeticScanner > numeric::expression_parser::ArithmeticScannerOP |
Definition at line 54 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ASTPrinter const > numeric::expression_parser::ASTPrinterCOP |
Definition at line 102 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ASTPrinter > numeric::expression_parser::ASTPrinterOP |
Definition at line 100 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ASTVisitor const > numeric::expression_parser::ASTVisitorCOP |
Definition at line 98 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< ASTVisitor > numeric::expression_parser::ASTVisitorOP |
Definition at line 96 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< BinaryExpression const > numeric::expression_parser::BinaryExpressionCOP |
Definition at line 125 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< BinaryExpression > numeric::expression_parser::BinaryExpressionOP |
Definition at line 123 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< DivideExpression const > numeric::expression_parser::DivideExpressionCOP |
Definition at line 145 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< DivideExpression > numeric::expression_parser::DivideExpressionOP |
Definition at line 143 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< Expression const > numeric::expression_parser::ExpressionCOP |
Definition at line 109 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< Expression > numeric::expression_parser::ExpressionOP |
Definition at line 107 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< FunctionToken const > numeric::expression_parser::FunctionTokenCOP |
Definition at line 38 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< FunctionToken > numeric::expression_parser::FunctionTokenOP |
Definition at line 36 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< LiteralExpression const > numeric::expression_parser::LiteralExpressionCOP |
Definition at line 113 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< LiteralExpression > numeric::expression_parser::LiteralExpressionOP |
Definition at line 111 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< LiteralToken const > numeric::expression_parser::LiteralTokenCOP |
Definition at line 30 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< LiteralToken > numeric::expression_parser::LiteralTokenOP |
Definition at line 28 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< MaxExpression const > numeric::expression_parser::MaxExpressionCOP |
Definition at line 149 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< MaxExpression > numeric::expression_parser::MaxExpressionOP |
Definition at line 147 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< MetaMaxExpression const > numeric::expression_parser::MetaMaxExpressionCOP |
Definition at line 157 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< MetaMaxExpression > numeric::expression_parser::MetaMaxExpressionOP |
Definition at line 155 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< MetaMinExpression const > numeric::expression_parser::MetaMinExpressionCOP |
Definition at line 161 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< MetaMinExpression > numeric::expression_parser::MetaMinExpressionOP |
Definition at line 159 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< MinExpression const > numeric::expression_parser::MinExpressionCOP |
Definition at line 153 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< MinExpression > numeric::expression_parser::MinExpressionOP |
Definition at line 151 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< MultiplyExpression const > numeric::expression_parser::MultiplyExpressionCOP |
Definition at line 141 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< MultiplyExpression > numeric::expression_parser::MultiplyExpressionOP |
Definition at line 139 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< SimpleToken const > numeric::expression_parser::SimpleTokenCOP |
Definition at line 42 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< SimpleToken > numeric::expression_parser::SimpleTokenOP |
Definition at line 40 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< SquarerootExpression const > numeric::expression_parser::SquarerootExpressionCOP |
Definition at line 129 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< SquarerootExpression > numeric::expression_parser::SquarerootExpressionOP |
Definition at line 127 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< SubtractExpression const > numeric::expression_parser::SubtractExpressionCOP |
Definition at line 137 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< SubtractExpression > numeric::expression_parser::SubtractExpressionOP |
Definition at line 135 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< Token const > numeric::expression_parser::TokenCOP |
Definition at line 26 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< Token > numeric::expression_parser::TokenOP |
Definition at line 24 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< TokenSet const > numeric::expression_parser::TokenSetCOP |
Definition at line 49 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< TokenSet > numeric::expression_parser::TokenSetOP |
Definition at line 47 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< UnaryExpression const > numeric::expression_parser::UnaryExpressionCOP |
Definition at line 121 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< UnaryExpression > numeric::expression_parser::UnaryExpressionOP |
Definition at line 119 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< VariableExpression const > numeric::expression_parser::VariableExpressionCOP |
Definition at line 117 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< VariableExpression > numeric::expression_parser::VariableExpressionOP |
Definition at line 115 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< VariableToken const > numeric::expression_parser::VariableTokenCOP |
Definition at line 34 of file Arithmetic.fwd.hh.
typedef utility::pointer::shared_ptr< VariableToken > numeric::expression_parser::VariableTokenOP |
Definition at line 32 of file Arithmetic.fwd.hh.
Enumerator | |
---|---|
INVALID_TOKEN_TYPE | |
LITERAL | |
VARIABLE | |
FUNCTION | |
COMMA | |
LEFT_PAREN | |
RIGHT_PAREN | |
PLUS_SYMBOL | |
SUBTRACT_SYMBOL | |
MULTIPLY_SYMBOL | |
DIVIDE_SYMBOL |
Definition at line 37 of file Arithmetic.hh.
bool numeric::expression_parser::is_letter | ( | char | c | ) |
Definition at line 92 of file Arithmetic.cc.
Referenced by numeric::expression_parser::ArithmeticScanner::scan(), and numeric::expression_parser::ArithmeticScanner::scan_identifier().
bool numeric::expression_parser::is_numeral | ( | char | c | ) |
Definition at line 87 of file Arithmetic.cc.
Referenced by numeric::expression_parser::ArithmeticScanner::add_function(), numeric::expression_parser::ArithmeticScanner::add_variable(), numeric::expression_parser::ArithmeticScanner::scan(), numeric::expression_parser::ArithmeticScanner::scan_identifier(), and numeric::expression_parser::ArithmeticScanner::scan_literal().
ExpressionCOP numeric::expression_parser::parse_string_to_boolean_expression | ( | std::string const & | input_string | ) |
ExpressionCOP numeric::expression_parser::parse_string_to_expression | ( | std::string const & | input_string | ) |
std::string numeric::expression_parser::token_type_name | ( | TokenType | tt | ) |
Definition at line 54 of file Arithmetic.cc.
References COMMA, DIVIDE_SYMBOL, FUNCTION, INVALID_TOKEN_TYPE, LEFT_PAREN, LITERAL, MULTIPLY_SYMBOL, PLUS_SYMBOL, RIGHT_PAREN, SUBTRACT_SYMBOL, and VARIABLE.
Referenced by numeric::expression_parser::ArithmeticASTFactor::parse(), numeric::expression_parser::ArithmeticASTValue::parse(), numeric::expression_parser::SimpleToken::to_string(), numeric::expression_parser::ASTPrinter::visit(), and numeric::expression_parser::ExpressionCreator::visit().