29 #ifndef MU_PARSER_TOKEN_READER_H
30 #define MU_PARSER_TOKEN_READER_H
66 void SetVarCreator(
facfun_type a_pFactory,
void* pUserData);
76 return m_pFactory !=
nullptr;
84 void IgnoreUndefVar(
bool bIgnore);
86 token_type ReadNextToken();
112 sfSTART_OF_LINE = noOPT | noBC | noPOSTOP | noASSIGN | noIF | noELSE | noARG_SEP,
116 ParserTokenReader(
const ParserTokenReader& a_Reader);
117 ParserTokenReader& operator=(
const ParserTokenReader& a_Reader);
118 void Assign(
const ParserTokenReader& a_Reader);
120 void SetParent(ParserBase* a_pParent);
121 int ExtractToken(
const char_type* a_szCharSet,
string_type& a_strTok, std::size_t a_iPos)
const;
122 int ExtractOperatorToken(
string_type& a_sTok, std::size_t a_iPos)
const;
124 bool IsBuiltIn(token_type& a_Tok);
125 bool IsArgSep(token_type& a_Tok);
126 bool IsEOF(token_type& a_Tok);
127 bool IsInfixOpTok(token_type& a_Tok);
128 bool IsFunTok(token_type& a_Tok);
129 bool IsPostOpTok(token_type& a_Tok);
130 bool IsOprt(token_type& a_Tok);
131 bool IsValTok(token_type& a_Tok);
132 bool IsVarTok(token_type& a_Tok);
133 bool IsStrVarTok(token_type& a_Tok);
134 bool IsUndefVarTok(token_type& a_Tok);
135 bool IsString(token_type& a_Tok);
138 token_type& SaveBeforeReturn(
const token_type& tok);
140 ParserBase* m_pParser;
144 bool m_bIgnoreUndefVar;
155 void* m_pFactoryData;
156 std::list<identfun_type> m_vIdentFun;
160 std::stack<int> m_bracketStack;
162 token_type m_lastTok;
value_type *(* facfun_type)(const char_type *, void *)
Callback used for variable creation factory functions.
std::map< string_type, std::size_t > strmap_type
Type for assigning a string name to an index in the internal string table.
std::map< string_type, value_type * > varmap_type
Type used for storing variables.
bool HasVarCreator() const
Check whether a variable factory is installed.
std::map< string_type, ParserCallback > funmap_type
Container for Callback objects.
std::map< string_type, value_type > valmap_type
Type used for storing constants.
MUP_BASETYPE value_type
The numeric datatype used by the parser.
Namespace for mathematical applications.
int(* identfun_type)(const char_type *sExpr, int *nPos, value_type *fVal)
Callback used for functions that identify values in a string.
string_type::value_type char_type
The character type used by the parser.
Token reader for the ParserBase class.
MUP_STRING_TYPE string_type
The stringtype used by the parser.
This file contains the parser token definition.
Mathematical expressions parser (base parser engine).
This file contains standard definitions used by the parser.