diff options
| -rw-r--r-- | lib/analyzer.ml | 2 | ||||
| -rw-r--r-- | lib/analyzer.mli | 12 | 
2 files changed, 13 insertions, 1 deletions
| diff --git a/lib/analyzer.ml b/lib/analyzer.ml index 1a9b17b..f0f8ca5 100644 --- a/lib/analyzer.ml +++ b/lib/analyzer.ml @@ -26,7 +26,7 @@ let parse :      Lexing.lexbuf ->      ('a, error) Result.t =   fun (type a) (module S : Qsp_syntax.S.Analyzer with type Location.repr = a) -> -  let module Parser = Parser.Make (Qsp_syntax.Tree) in +  let module Parser = Parser.Make (S) in    let module IncrementalParser =      Interpreter.Interpreter (Parser.MenhirInterpreter) in    fun lexbuf -> diff --git a/lib/analyzer.mli b/lib/analyzer.mli new file mode 100644 index 0000000..3032375 --- /dev/null +++ b/lib/analyzer.mli @@ -0,0 +1,12 @@ +type error = { +  message : string; +  start_pos : Lexing.position; +  end_pos : Lexing.position; +} + +val format_error : Format.formatter -> error -> unit + +val parse : +  (module Qsp_syntax.S.Analyzer with type Location.repr = 'a) -> +  Lexing.lexbuf -> +  ('a, error) Result.t | 
