Develop a simple script interpreter / engine with IF THEN ELSE END IF AND OR + - * / < > <= >= = <> in VBA
€18-36 EUR / hour
Fechado
Publicado há aproximadamente 2 anos
€18-36 EUR / hour
Develop a simple script interpreter / engine with IF THEN ELSE END IF AND OR + - * / < > <= >= = <> SELECT CASE ... in VBA
I need to be able to interpret scripts similar to the following one with Eval(byval script as string) as variant:
IF a = b or d = e THEN
IF d = e AND f > g AND (h < i OR j <> k) THEN
X = 10
ELSE
END IF
ELSEIF c = 1 THEN
X = 5
END IF
The script interpreter must be written in Excel VBA. Each keyword should be interpreted with its own function, so it is easy to extend the code. The script language must be VBA (IF THEN ELSE etc.). No VB-Script-Engine must be used, but the interpreter must really be programmed in VBA. The following keywords should be supported: IF THEN ELSE ELSEIF "END IF" "SELECT CASE" CASE "CASE ELSE" "END CASE" LIKE. As operands + - * / < > <= >= <> = should be possible, furthermore parentheses ( ) must be supported. The interpreter must be able to handle variables and allow variable assignments accordingly (IF a = 5 then b = 10). Variables may be of type string, double, long, boolean. The interpreter should evaluate the script with Eval(Script). The script can set the return value of Eval with Eval=XXX. The interpreter should be able to include additional variables in a variable stack, which can then be written to by the script. Before Eval AddVariable(byval varname as string, byval type as integer, byval value as variant) can be used to add variables that are recognised in the script when Eval runs. The variables are to be stored in the interpreter in a collection, so that they can be processed again after the execution of Eval. The variables of the collection are a class with the members m_VarName as string, m_VarType as integer, m_VarValue as Variant.
Hi dude
We are a team of experts and as the head of the team, I believe we can complete this project for you.
we will be glad to complete your task, waiting to hear from you!