From fc235a1d2b7f10e6b5b1d7ed4328e2f9f7714171 Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Wed, 25 Oct 2023 22:23:06 +0200 Subject: Updated the documentation --- lib/syntax/S.ml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lib/syntax/S.ml') 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' -- cgit v1.2.3