From 65164f2ebe61a566d96119c2cde23eee6771007b Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Mon, 9 Dec 2024 10:13:50 +0100 Subject: Splitted the code and declare the test catalog in it’s own module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/syntax/S.ml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'lib/syntax/S.ml') diff --git a/lib/syntax/S.ml b/lib/syntax/S.ml index b467863..918d8e6 100644 --- a/lib/syntax/S.ml +++ b/lib/syntax/S.ml @@ -1,18 +1,16 @@ -(** - This module describe the type an analyzer must implement in order to be - used with the parser. +(** This module describe the type an analyzer must implement in order to be used + with the parser. The module is divided in three modules : - - Expression : the finest part of the QSP syntax. - - Instruction : if/act block, - - Location - *) + - Expression : the finest part of the QSP syntax. + - Instruction : if/act block, + - Location *) -(** {1 Generic types used in the module } *) +(** {1 Generic types used in the module} *) type pos = Lexing.position * Lexing.position -(** The type pos is used to track the 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 @@ -101,7 +99,7 @@ module type Location = sig val location : context -> pos -> instruction list -> t end -(** {1 Unified module used by the parser } *) +(** {1 Unified module used by the parser} *) module type Analyzer = sig val identifier : string @@ -115,7 +113,7 @@ module type Analyzer = sig val is_global : bool (** Declare the checker as global. It requires to run over the whole file and - will be disabled if the application only check a single location. + will be disabled if the application only check a single location. Also, the test will be disabled if a syntax error is reported during the parsing, because this tell that I haven’t been able to analyse the whole @@ -137,11 +135,10 @@ module type Analyzer = sig end (** Helper module used in order to convert elements from the differents - representation levels. + representation levels. Thoses functions are intended to be used in the menhir parser, in order to - limit the code in the mly file. -*) + limit the code in the mly file. *) module Helper (E : sig type t (** Internal type used in the evaluation *) -- cgit v1.2.3