diff options
author | Costa Tsaousis <costa@tsaousis.gr> | 2016-08-11 16:36:12 +0300 |
---|---|---|
committer | Costa Tsaousis <costa@tsaousis.gr> | 2016-08-11 16:36:12 +0300 |
commit | 1864746e20a8695ca86bf105dc037709730240d0 (patch) | |
tree | 3d604992045d2b1a5ed9ebd51c4ab2d41a3948b6 /src/eval.h | |
parent | ac6925def2988f29fd21c8226e4b435bc0f34b62 (diff) |
detect excess characters at expression
Diffstat (limited to 'src/eval.h')
-rw-r--r-- | src/eval.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/eval.h b/src/eval.h index 1d1f9e02d7..1ac56bfe04 100644 --- a/src/eval.h +++ b/src/eval.h @@ -35,13 +35,14 @@ typedef struct eval_expression { #define EVAL_ERROR_UNKNOWN_OPERAND 2 #define EVAL_ERROR_MISSING_OPERAND 3 #define EVAL_ERROR_MISSING_OPERATOR 4 +#define EVAL_ERROR_REMAINING_GARBAGE 5 // evaluation errors -#define EVAL_ERROR_INVALID_VALUE 5 -#define EVAL_ERROR_INVALID_NUMBER_OF_OPERANDS 6 -#define EVAL_ERROR_VALUE_IS_NAN 7 -#define EVAL_ERROR_VALUE_IS_INFINITE 8 -#define EVAL_ERROR_UNKNOWN_VARIABLE 9 +#define EVAL_ERROR_INVALID_VALUE 11 +#define EVAL_ERROR_INVALID_NUMBER_OF_OPERANDS 12 +#define EVAL_ERROR_VALUE_IS_NAN 13 +#define EVAL_ERROR_VALUE_IS_INFINITE 14 +#define EVAL_ERROR_UNKNOWN_VARIABLE 15 // parse the given string as an expression and return: // a pointer to an expression if it parsed OK |