1 #ifndef EXPR_Tokenizer_H
2 #define EXPR_Tokenizer_H
5 #include "EXPR_Object.h"
19 std::stringstream mTokens;
40 static inline CORE_UniquePointer<EXPR_Tokenizer>
New() {
70 tBoolean
readUntil(
const tChar& expected);
75 tBoolean readToken(tString& token);
99 virtual tString
toString()
const override;
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
This class is the base class of all the parser package.
Definition: EXPR_Object.h:27
This class manages the string manipulation.
Definition: EXPR_Tokenizer.h:16
tBoolean readUntil(const tChar &expected)
read the tokens utile the char expected is found ]return tre if the expected char has been found
Definition: EXPR_Tokenizer.cpp:43
virtual tString toString() const override
return the string representation of the class
Definition: EXPR_Tokenizer.cpp:143
EXPR_Tokenizer()
create the class
Definition: EXPR_Tokenizer.cpp:3
virtual ~EXPR_Tokenizer()
delete the class
Definition: EXPR_Tokenizer.cpp:6
void returnToPosition(const tInt &pos)
rreturn the position of the cursor to pos
Definition: EXPR_Tokenizer.cpp:9
void skipWhiteSpace()
read all the white characters
Definition: EXPR_Tokenizer.cpp:32
tInt getCurrentPosition()
get the current position of the token
Definition: EXPR_Tokenizer.cpp:18
tBoolean isAtEnd() const
test if all the tokens has been reads
Definition: EXPR_Tokenizer.cpp:26
tBoolean readArguments(std::vector< tString > &args)
read the arguement of the form "[x,y,z,t]"
Definition: EXPR_Tokenizer.cpp:68
void setTokens(const tString &tokens)
set the tokens
Definition: EXPR_Tokenizer.h:48
tBoolean readRealValue(tReal &x)
read the next value
Definition: EXPR_Tokenizer.cpp:132
static CORE_UniquePointer< EXPR_Tokenizer > New()
crete the new instance of this
Definition: EXPR_Tokenizer.h:40