- In my C++ embedded program, I have certain predefined variables such as int Var_A, Var_B, Var_C, Var_D....
- I have to define logical expression in external text file (As logical expressions are configurable in external text file called config file), later this file is read in micro controller's File System.
- The variables in config file are same as variables in embedded program.
- The file contains logical expression in following predefined format,
(Operand 1) (Operator) (Operator 2)
Example :
Var_A AND Var_B
- The variables do change (in embedded program) during runtime.
- Later the result of this logical expression is used to execute certain subroutine program.
- We can not use interrupts for same operation as we have 100s of such variables.
I thought to use interpreter to resolve this problem, but that too I'm not much familiar with interpreter and just heard interpreter can be used in this case.
Please suggest logical solution for same.