aboutsummaryrefslogtreecommitdiff
path: root/lib/syntax/S.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/syntax/S.ml')
-rw-r--r--lib/syntax/S.ml14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/syntax/S.ml b/lib/syntax/S.ml
index 4a6b3e2..108dac9 100644
--- a/lib/syntax/S.ml
+++ b/lib/syntax/S.ml
@@ -6,15 +6,13 @@
- Expression : the finest part of the QSP syntax.
- Instruction : if/act block,
- Location
-
- All the elements of the syntax are represented with a dedicated function
- (instead of a big sum type). The module [Tree] provide an implementation
- which build the AST.
-
*)
+(** {1 Generic types used in the module } *)
+
type pos = Lexing.position * Lexing.position
-(** Starting and ending position for the given location *)
+(** The type pos is used to track the starting and ending position for the
+ given location. *)
type ('a, 'b) variable = { pos : 'a; name : string; index : 'b option }
(** Describe a variable, using the name in capitalized text, and an optionnal
@@ -24,6 +22,8 @@ type ('a, 'b) variable = { pos : 'a; name : string; index : 'b option }
type ('a, 'b) clause = pos * 'a * 'b list
+(** {1 Checker Signature} *)
+
(** Represent the evaluation over an expression *)
module type Expression = sig
type t
@@ -99,6 +99,8 @@ module type Location = sig
val location : pos -> instruction list -> t * Report.t list
end
+(** {1 Unified module used by the parser } *)
+
module type Analyzer = sig
module Expression : Expression
module Instruction : Instruction with type expression = Expression.t'