EMath++
Classes for mathematical concepts
|
Class that wraps a std::string and parses it as a number or as a operation. More...
Public Member Functions | |
Parser (const std::string &input) noexcept | |
Standalone constructor for the Parser class. | |
const int | parse_number () noexcept |
Function for parsing a plus, minus and number Tokens as a positive or negative int. | |
const emth::Polynomial | parse_operation (const ::std::vector< emth::Polynomial > &ps) |
Function for parsing std::string as a mathematical operation consisting of Polynomials represented as integers. | |
~Parser () noexcept=default | |
Default destructor. | |
Class that wraps a std::string and parses it as a number or as a operation.
The class consists of two public functions, one for parsing the entire input as a number and the other for it as a operation.
Definition at line 753 of file interface.cpp.
|
inlinenoexcept |
Standalone constructor for the Parser class.
input | A const reference to the std::string to parse when needed. |
Definition at line 764 of file interface.cpp.
|
inlinenoexcept |
Function for parsing a plus, minus and number Tokens as a positive or negative int.
Definition at line 769 of file interface.cpp.
References efc::Lexer::next(), efc::Token::type, and efc::Token::value.
|
inline |
Function for parsing std::string as a mathematical operation consisting of Polynomials represented as integers.
ps | A std::vector of Polynomials, the integers representing the Polynomials map to this std::vector indexes |
Definition at line 786 of file interface.cpp.
References efc::Lexer::next(), efc::Token::type, and efc::Token::value.