summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ansys.com>2014-06-17 09:48:22 +0200
committerAlex Auvolat <alex.auvolat@ansys.com>2014-06-17 09:48:22 +0200
commit860ad2752ef0544bc6874d895875a78f91db9084 (patch)
tree9f366fe801b9ae145338c5859aa70f0a384c2ea1 /frontend
parentb5fd9598302b3e7ac8ab75c36d5a7290d1ad0d78 (diff)
downloadscade-analyzer-860ad2752ef0544bc6874d895875a78f91db9084.tar.gz
scade-analyzer-860ad2752ef0544bc6874d895875a78f91db9084.zip
Add AST for logical formula.
Diffstat (limited to 'frontend')
-rw-r--r--frontend/ast_printer.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/frontend/ast_printer.ml b/frontend/ast_printer.ml
index 08f4fb4..b6dcdbc 100644
--- a/frontend/ast_printer.ml
+++ b/frontend/ast_printer.ml
@@ -44,6 +44,7 @@ let string_of_binary_bool = function
| AST_OR -> "or"
+let unary_precedence = 99
let binary_op_precedence = function
| AST_MUL| AST_DIV| AST_MOD-> 51
| AST_PLUS | AST_MINUS -> 50
@@ -57,7 +58,7 @@ let arrow_precedence = 20
let if_precedence = 10
let expr_precedence = function
- | AST_unary (_, _) | AST_pre(_, _) | AST_not(_) -> 99
+ | AST_unary (_, _) | AST_pre(_, _) | AST_not(_) -> unary_precedence
| AST_binary(op, _, _) -> binary_op_precedence op
| AST_binary_rel(r, _, _) -> binary_rel_precedence r
| AST_binary_bool(r, _, _) -> binary_bool_precedence r