carl  24.04
Computer ARithmetic Library
carl::io::parser::ExpressionParser< Pol > Struct Template Reference

#include <ExpressionParser.h>

Inheritance diagram for carl::io::parser::ExpressionParser< Pol >:
Collaboration diagram for carl::io::parser::ExpressionParser< Pol >:

Data Structures

class  perform_addition
 
class  perform_division
 
class  perform_multiplication
 
class  perform_negate
 
class  perform_power
 
class  perform_subtraction
 
class  print_expr_type
 

Public Types

typedef Pol::CoeffType CoeffType
 
using expr_type = ExpressionType< Pol >
 

Public Member Functions

 ExpressionParser ()
 
void addVariable (Variable::Arg v)
 

Private Types

enum  Operation {
  ADD , SUB , MUL , DIV ,
  POW , NEG
}
 

Private Member Functions

Variable newVariable (const std::string &s)
 
expr_type makeBool (bool value)
 
expr_type booleanBinaryExpr (const expr_type &first, const std::vector< boost::fusion::vector2< carl::FormulaType, expr_type >> &ops)
 
expr_type booleanUnaryExpr (const std::vector< carl::FormulaType > &ops, const expr_type &first)
 
expr_type arithmeticExpr (const expr_type &first, const std::vector< boost::fusion::vector2< Operation, expr_type >> &ops)
 
expr_type powExpr (const expr_type &first, const std::vector< boost::fusion::vector2< Operation, exponent >> &ops)
 
expr_type signExpr (const std::vector< Operation > &ops, const expr_type &first)
 

Private Attributes

qi::symbols< char, carl::FormulaTypeoperationNot
 
qi::symbols< char, carl::FormulaTypeoperationImp
 
qi::symbols< char, carl::FormulaTypeoperationIff
 
qi::symbols< char, carl::FormulaTypeoperationAnd
 
qi::symbols< char, OperationoperationShift
 
qi::symbols< char, OperationoperationScale
 
qi::symbols< char, OperationoperationPow
 
qi::symbols< char, OperationoperationSign
 
qi::symbols< char, Variablevarmap
 
qi::rule< Iterator, std::string(), Skippervarname
 
qi::uint_parser< exponent, 10, 1,-1 > exponentVal
 
qi::real_parser< CoeffType, RationalPolicies< CoeffType > > coeff
 
qi::rule< Iterator, Variable(), Skippervariable
 
qi::rule< Iterator, Operation(), SkipperoperationScaleLA
 
qi::rule< Iterator, expr_type(), Skipperboolean
 
qi::rule< Iterator, expr_type(), Skippermonomial
 
qi::rule< Iterator, expr_type(), Skipperatom
 
qi::rule< Iterator, expr_type(), Skipperexpr
 
qi::rule< Iterator, expr_type(), Skipperexpr_sign
 
qi::rule< Iterator, expr_type(), Skipperexpr_product
 
qi::rule< Iterator, expr_type(), Skipperexpr_power
 
qi::rule< Iterator, expr_type(), Skipperexpr_sum
 
qi::rule< Iterator, expr_type(), Skippermain
 

Detailed Description

template<typename Pol>
struct carl::io::parser::ExpressionParser< Pol >

Definition at line 83 of file ExpressionParser.h.

Member Typedef Documentation

◆ CoeffType

template<typename Pol >
typedef Pol::CoeffType carl::io::parser::ExpressionParser< Pol >::CoeffType

Definition at line 84 of file ExpressionParser.h.

◆ expr_type

template<typename Pol >
using carl::io::parser::ExpressionParser< Pol >::expr_type = ExpressionType<Pol>

Definition at line 85 of file ExpressionParser.h.

Member Enumeration Documentation

◆ Operation

template<typename Pol >
enum carl::io::parser::ExpressionParser::Operation
private
Enumerator
ADD 
SUB 
MUL 
DIV 
POW 
NEG 

Definition at line 399 of file ExpressionParser.h.

Constructor & Destructor Documentation

◆ ExpressionParser()

template<typename Pol >
carl::io::parser::ExpressionParser< Pol >::ExpressionParser ( )
inline

Tokens

Rules

Definition at line 353 of file ExpressionParser.h.

Member Function Documentation

◆ addVariable()

template<typename Pol >
void carl::io::parser::ExpressionParser< Pol >::addVariable ( Variable::Arg  v)
inline

Definition at line 393 of file ExpressionParser.h.

Here is the call graph for this function:

◆ arithmeticExpr()

template<typename Pol >
expr_type carl::io::parser::ExpressionParser< Pol >::arithmeticExpr ( const expr_type first,
const std::vector< boost::fusion::vector2< Operation, expr_type >> &  ops 
)
inlineprivate

Definition at line 463 of file ExpressionParser.h.

◆ booleanBinaryExpr()

template<typename Pol >
expr_type carl::io::parser::ExpressionParser< Pol >::booleanBinaryExpr ( const expr_type first,
const std::vector< boost::fusion::vector2< carl::FormulaType, expr_type >> &  ops 
)
inlineprivate

Definition at line 425 of file ExpressionParser.h.

◆ booleanUnaryExpr()

template<typename Pol >
expr_type carl::io::parser::ExpressionParser< Pol >::booleanUnaryExpr ( const std::vector< carl::FormulaType > &  ops,
const expr_type first 
)
inlineprivate

Definition at line 450 of file ExpressionParser.h.

◆ makeBool()

template<typename Pol >
expr_type carl::io::parser::ExpressionParser< Pol >::makeBool ( bool  value)
inlineprivate

Definition at line 417 of file ExpressionParser.h.

◆ newVariable()

template<typename Pol >
Variable carl::io::parser::ExpressionParser< Pol >::newVariable ( const std::string &  s)
inlineprivate

Definition at line 401 of file ExpressionParser.h.

Here is the call graph for this function:

◆ powExpr()

template<typename Pol >
expr_type carl::io::parser::ExpressionParser< Pol >::powExpr ( const expr_type first,
const std::vector< boost::fusion::vector2< Operation, exponent >> &  ops 
)
inlineprivate

Definition at line 488 of file ExpressionParser.h.

◆ signExpr()

template<typename Pol >
expr_type carl::io::parser::ExpressionParser< Pol >::signExpr ( const std::vector< Operation > &  ops,
const expr_type first 
)
inlineprivate

Definition at line 501 of file ExpressionParser.h.

Field Documentation

◆ atom

template<typename Pol >
qi::rule<Iterator, expr_type(), Skipper> carl::io::parser::ExpressionParser< Pol >::atom
private

Definition at line 535 of file ExpressionParser.h.

◆ boolean

template<typename Pol >
qi::rule<Iterator, expr_type(), Skipper> carl::io::parser::ExpressionParser< Pol >::boolean
private

Definition at line 533 of file ExpressionParser.h.

◆ coeff

template<typename Pol >
qi::real_parser<CoeffType,RationalPolicies<CoeffType> > carl::io::parser::ExpressionParser< Pol >::coeff
private

Definition at line 528 of file ExpressionParser.h.

◆ exponentVal

template<typename Pol >
qi::uint_parser<exponent,10,1,-1> carl::io::parser::ExpressionParser< Pol >::exponentVal
private

Definition at line 527 of file ExpressionParser.h.

◆ expr

template<typename Pol >
qi::rule<Iterator, expr_type(), Skipper> carl::io::parser::ExpressionParser< Pol >::expr
private

Definition at line 537 of file ExpressionParser.h.

◆ expr_power

template<typename Pol >
qi::rule<Iterator, expr_type(), Skipper> carl::io::parser::ExpressionParser< Pol >::expr_power
private

Definition at line 540 of file ExpressionParser.h.

◆ expr_product

template<typename Pol >
qi::rule<Iterator, expr_type(), Skipper> carl::io::parser::ExpressionParser< Pol >::expr_product
private

Definition at line 539 of file ExpressionParser.h.

◆ expr_sign

template<typename Pol >
qi::rule<Iterator, expr_type(), Skipper> carl::io::parser::ExpressionParser< Pol >::expr_sign
private

Definition at line 538 of file ExpressionParser.h.

◆ expr_sum

template<typename Pol >
qi::rule<Iterator, expr_type(), Skipper> carl::io::parser::ExpressionParser< Pol >::expr_sum
private

Definition at line 541 of file ExpressionParser.h.

◆ main

template<typename Pol >
qi::rule<Iterator, expr_type(), Skipper> carl::io::parser::ExpressionParser< Pol >::main
private

Definition at line 542 of file ExpressionParser.h.

◆ monomial

template<typename Pol >
qi::rule<Iterator, expr_type(), Skipper> carl::io::parser::ExpressionParser< Pol >::monomial
private

Definition at line 534 of file ExpressionParser.h.

◆ operationAnd

template<typename Pol >
qi::symbols<char, carl::FormulaType> carl::io::parser::ExpressionParser< Pol >::operationAnd
private

Definition at line 519 of file ExpressionParser.h.

◆ operationIff

template<typename Pol >
qi::symbols<char, carl::FormulaType> carl::io::parser::ExpressionParser< Pol >::operationIff
private

Definition at line 518 of file ExpressionParser.h.

◆ operationImp

template<typename Pol >
qi::symbols<char, carl::FormulaType> carl::io::parser::ExpressionParser< Pol >::operationImp
private

Definition at line 517 of file ExpressionParser.h.

◆ operationNot

template<typename Pol >
qi::symbols<char, carl::FormulaType> carl::io::parser::ExpressionParser< Pol >::operationNot
private

Definition at line 516 of file ExpressionParser.h.

◆ operationPow

template<typename Pol >
qi::symbols<char, Operation> carl::io::parser::ExpressionParser< Pol >::operationPow
private

Definition at line 522 of file ExpressionParser.h.

◆ operationScale

template<typename Pol >
qi::symbols<char, Operation> carl::io::parser::ExpressionParser< Pol >::operationScale
private

Definition at line 521 of file ExpressionParser.h.

◆ operationScaleLA

template<typename Pol >
qi::rule<Iterator, Operation(), Skipper> carl::io::parser::ExpressionParser< Pol >::operationScaleLA
private

Definition at line 531 of file ExpressionParser.h.

◆ operationShift

template<typename Pol >
qi::symbols<char, Operation> carl::io::parser::ExpressionParser< Pol >::operationShift
private

Definition at line 520 of file ExpressionParser.h.

◆ operationSign

template<typename Pol >
qi::symbols<char, Operation> carl::io::parser::ExpressionParser< Pol >::operationSign
private

Definition at line 523 of file ExpressionParser.h.

◆ variable

template<typename Pol >
qi::rule<Iterator, Variable(), Skipper> carl::io::parser::ExpressionParser< Pol >::variable
private

Definition at line 529 of file ExpressionParser.h.

◆ varmap

template<typename Pol >
qi::symbols<char, Variable> carl::io::parser::ExpressionParser< Pol >::varmap
private

Definition at line 524 of file ExpressionParser.h.

◆ varname

template<typename Pol >
qi::rule<Iterator, std::string(), Skipper> carl::io::parser::ExpressionParser< Pol >::varname
private

Definition at line 526 of file ExpressionParser.h.


The documentation for this struct was generated from the following file: