From 5dc0c5defdd7ebb152a00e8b2895787b54931779 Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Wed, 27 Sep 2023 15:36:13 +0200 Subject: Allow differents file encoding for the source --- bin/qsp_parser.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bin/qsp_parser.ml') diff --git a/bin/qsp_parser.ml b/bin/qsp_parser.ml index 4ed2ba7..f2b21f9 100644 --- a/bin/qsp_parser.ml +++ b/bin/qsp_parser.ml @@ -45,7 +45,12 @@ let () = let ic = Stdlib.open_in file_name in (*let lexer = Lexing.from_channel ~with_positions:true ic in*) let lexer = Sedlexing.Utf8.from_channel ic in - let result = Qparser.Analyzer.parse (module Qsp_syntax.Type_of) lexer in + let result = + Qparser.Analyzer.parse + (module Qsp_syntax.Type_of) + (module Sedlexing.Utf8) + lexer + in match result with | Ok f -> ( let report = List.fold_left (f []) ~init:[] ~f:(filter_report filters) in -- cgit v1.2.3