This is a dBASE language parser with support of functions, variables, evaluation and
processing of mistakes. The parser was was written by me and is contained in the
The process of calculation is broken on two stages:
- syntactic analysis and filling of structures necessary for calculation,
- execution of the prepared script.
It has allowed a reduction in execution time when using the parser in the big cycles.
These methods are necessary to get the results of analysis of expression.
void Parse(LPCSTR lpszExpression);
These methods are intended for definition of variables or change of values.
BOOL AddVariable(LPCSTR szName, VARIANT& varValue);
BOOL DelVariable(LPCSTR szName);
void DelUnusedVariables(LPCSTR szName);
BOOL SetVariableValue(LPCSTR szName, VARIANT& varValue);
BOOL SetVariableValue(VARIANT& varValue);
BOOL GetVariableValue(LPCSTR szName, VARIANT& varValue);
BOOL GetVariableValue(VARIANT& varValue);
Example of use.
VARIANT* pvarResult = NULL;
pvarResult = m_Parser.Execute();
for(int i = 0; i < e->GetErrorCount(); i++)
Year of birth - 1974.
Eeducation - was ended by Kaliningrad State University in 1997.
Now I work as the engineer-programmer in Kaliningrad (RUSSIA).