EMath++
Classes for mathematical concepts
|
Class that works as a token supplier for the Parser class. More...
#include <eparser.h>
Public Member Functions | |
Lexer (const std::string &input) noexcept | |
Standalone constructor for the Lexer class. | |
Lexer & | operator= (const Lexer &ogn) noexcept |
Assigment operator for when called with an lvalue. | |
Token | next () noexcept |
Function that returns the next Token in the input provided in the constructor. | |
void | back () noexcept |
Backtrack function that moves the cursor's position one position backwards. | |
Class that works as a token supplier for the Parser class.
The class consists of two public functions, one for getting the next Token and the other for going back one position.
|
noexcept |
Standalone constructor for the Lexer class.
input | A const reference to the std::string to tokenize. |
Definition at line 14 of file eparser.cpp.
|
noexcept |
Backtrack function that moves the cursor's position one position backwards.
Definition at line 52 of file eparser.cpp.
|
noexcept |
Function that returns the next Token in the input provided in the constructor.
Definition at line 29 of file eparser.cpp.
References next(), emthp::T_EOF, emthp::T_EXPONENT, emthp::T_MINUS, emthp::T_NUMBER, emthp::T_PLUS, and emthp::T_VARIABLE.
|
noexcept |
Assigment operator for when called with an lvalue.
ogn | The lvalue Lexer object. |
Definition at line 20 of file eparser.cpp.