diff options
author | Chimrod <> | 2024-12-09 10:13:50 +0100 |
---|---|---|
committer | Chimrod <> | 2024-12-09 10:13:50 +0100 |
commit | 65164f2ebe61a566d96119c2cde23eee6771007b (patch) | |
tree | 35ce714acce0da7bf172c8d7161b1be953af6f72 /lib/syntax/S.ml | |
parent | 53c02501935b3cb2db78e79deb4d38c997505a95 (diff) |
Splitted the code and declare the test catalog in it’s own module
Diffstat (limited to 'lib/syntax/S.ml')
-rw-r--r-- | lib/syntax/S.ml | 27 |
1 files changed, 12 insertions, 15 deletions
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 *) |