26 #ifndef MU_PARSER_TOKEN_READER_H
27 #define MU_PARSER_TOKEN_READER_H
108 int ExtractToken(
const char_type *a_szCharSet,
111 bool IsBuiltIn(token_type &a_Tok);
112 bool IsArgSep(token_type &a_Tok);
113 bool IsEOF(token_type &a_Tok);
114 bool IsInfixOpTok(token_type &a_Tok);
115 bool IsFunTok(token_type &a_Tok);
116 bool IsPostOpTok(token_type &a_Tok);
117 bool IsOprt(token_type &a_Tok);
118 bool IsValTok(token_type &a_Tok);
119 bool IsVarTok(token_type &a_Tok);
120 bool IsStrVarTok(token_type &a_Tok);
121 bool IsUndefVarTok(token_type &a_Tok);
122 bool IsString(token_type &a_Tok);
127 token_type& SaveBeforeReturn(
const token_type &tok);
133 bool m_bIgnoreUndefVar;
143 void *m_pFactoryData;
144 std::vector<identfun_type> m_vIdentFun;
148 token_type m_lastTok;
const muChar_t cArgSep
Definition: muParserDLL.h:148
void IgnoreUndefVar(bool bIgnore)
Set Flag that contronls behaviour in case of undefined variables beeing found.
Definition: muParserTokenReader.cpp:223
std::map< string_type, std::size_t > strmap_type
Type for assigning a string name to an index in the internal string table.
Definition: muParserDef.h:256
std::map< string_type, value_type * > varmap_type
Type used for storing variables.
Definition: muParserDef.h:250
void SetVarCreator(facfun_type a_pFactory, void *pUserData)
Definition: muParserTokenReader.cpp:167
int GetPos() const
Return the current position of the token reader in the formula string.
Definition: muParserTokenReader.cpp:179
muFacFun_t a_pFactory
Definition: muParserDLL.h:79
ParserTokenReader(ParserBase *a_pParent)
Constructor.
Definition: muParserTokenReader.cpp:111
std::map< string_type, ParserCallback > funmap_type
Container for Callback objects.
Definition: muParserCallback.h:93
const varmap_type & GetUsedVar() const
Return a map containing the used variables only.
Definition: muParserTokenReader.cpp:197
std::map< string_type, value_type > valmap_type
Type used for storing constants.
Definition: muParserDef.h:253
token_type ReadNextToken()
Read the next token from the string.
Definition: muParserTokenReader.cpp:248
void ReInit()
Reset the token reader to the start of the formula.
Definition: muParserTokenReader.cpp:237
MUP_BASETYPE value_type
The numeric datatype used by the parser.
Definition: muParserDef.h:222
const string_type & GetFormula() const
Return a reference to the formula.
Definition: muParserTokenReader.cpp:190
void SetFormula(const string_type &a_strFormula)
Initialize the token Reader.
Definition: muParserTokenReader.cpp:208
void SetArgSep(char_type cArgSep)
Definition: muParserTokenReader.cpp:834
Namespace for mathematical applications.
Definition: muParser.cpp:47
string_type::value_type char_type
The character type used by the parser.
Definition: muParserDef.h:240
Token reader for the ParserBase class.
Definition: muParserTokenReader.h:53
ParserTokenReader * Clone(ParserBase *a_pParent) const
Create instance of a ParserTokenReader identical with this and return its pointer.
Definition: muParserTokenReader.cpp:146
MUP_STRING_TYPE string_type
The stringtype used by the parser.
Definition: muParserDef.h:228
This file contains the parser token definition.
int(* identfun_type)(const char_type *sExpr, int *nPos, value_type *fVal)
Callback used for functions that identify values in a string.
Definition: muParserDef.h:291
void AddValIdent(identfun_type a_pCallback)
Definition: muParserTokenReader.cpp:161
value_type *(* facfun_type)(const char_type *, void *)
Callback used for variable creation factory functions.
Definition: muParserDef.h:294
muFacFun_t void * pUserData
Definition: muParserDLL.h:79
EErrorCodes
Error codes.
Definition: muParserError.h:46
char_type GetArgSep() const
Definition: muParserTokenReader.cpp:840
Mathematical expressions parser (base parser engine).
Definition: muParserBase.h:63
This file contains standard definitions used by the parser.