diff options
Diffstat (limited to 'Source/Parser/wp_parser_y.c')
-rw-r--r-- | Source/Parser/wp_parser_y.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/Source/Parser/wp_parser_y.c b/Source/Parser/wp_parser_y.c index 402c4e67b..46cb199db 100644 --- a/Source/Parser/wp_parser_y.c +++ b/Source/Parser/wp_parser_y.c @@ -185,6 +185,18 @@ wp_call_f2 (enum wp_f2_t type, double a, double b) return (a > b) ? 1.0 : 0.0; case WP_LT: return (a < b) ? 1.0 : 0.0; + case WP_GEQ: + return (a >= b) ? 1.0 : 0.0; + case WP_LEQ: + return (a <= b) ? 1.0 : 0.0; + case WP_EQ: + return (a == b) ? 1.0 : 0.0; + case WP_NEQ: + return (a != b) ? 1.0 : 0.0; + case WP_AND: + return (a && b) ? 1.0 : 0.0; + case WP_OR: + return (a || b) ? 1.0 : 0.0; case WP_HEAVISIDE: return (a < 0.0) ? 0.0 : ((a > 0.0) ? 1.0 : b); case WP_MIN: @@ -805,6 +817,24 @@ wp_ast_print_f2 (struct wp_f2* f2) case WP_LT: printf("LT\n"); break; + case WP_GEQ: + printf("GEQ\n"); + break; + case WP_LEQ: + printf("LEQ\n"); + break; + case WP_EQ: + printf("EQ\n"); + break; + case WP_NEQ: + printf("NEQ\n"); + break; + case WP_AND: + printf("AND\n"); + break; + case WP_OR: + printf("OR\n"); + break; case WP_HEAVISIDE: printf("HEAVISIDE\n"); break; @@ -1015,4 +1045,3 @@ wp_parser_setconst (struct wp_parser* parser, char const* name, double c) wp_ast_setconst(parser->ast, name, c); wp_ast_optimize(parser->ast); } - |