summaryrefslogtreecommitdiff
path: root/frontend/ast.ml
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/ast.ml')
-rw-r--r--frontend/ast.ml17
1 files changed, 7 insertions, 10 deletions
diff --git a/frontend/ast.ml b/frontend/ast.ml
index cf04166..8392bc6 100644
--- a/frontend/ast.ml
+++ b/frontend/ast.ml
@@ -1,10 +1,6 @@
open Lexing
+open Util
-type position = Lexing.position
-let position_unknown = Lexing.dummy_pos
-
-type extent = position * position
-let extent_unknown = (position_unknown, position_unknown)
type 'a ext = 'a * extent
@@ -44,6 +40,7 @@ type bin_bool_op =
type expr =
| AST_identifier of id ext
+ | AST_idconst of id ext
(* on numerical values *)
| AST_int_const of string ext
| AST_real_const of string ext
@@ -74,13 +71,13 @@ and state = {
and transition = (expr ext) * (id ext) * bool (* bool : does it reset ? *)
and activate_block = {
- id : id;
- locals : var_def list;
- body : eqn ext list;
+ id : id;
+ locals : var_def list;
+ body : eqn ext list;
}
and activate_if =
- | AST_activate_body of activate_block
- | AST_activate_if of expr ext * activate_if * activate_if
+ | AST_activate_body of activate_block
+ | AST_activate_if of expr ext * activate_if * activate_if
and activate = activate_if * id list
and eqn =