diff options
author | Chimrod <> | 2023-12-07 18:40:48 +0100 |
---|---|---|
committer | Chimrod <> | 2023-12-07 18:40:48 +0100 |
commit | 07cb010ccd29a586c992ab76c81934979ba1a755 (patch) | |
tree | e5b2e35f372e9c9bebdfeec26f48f871a9af91ce /lib/qparser | |
parent | 0f7d55c4bccbe49be8a538a36363078d40f1ef1f (diff) |
Removed debug messages
Diffstat (limited to 'lib/qparser')
-rw-r--r-- | lib/qparser/lex_state.ml | 9 | ||||
-rw-r--r-- | lib/qparser/lexer.ml | 17 |
2 files changed, 4 insertions, 22 deletions
diff --git a/lib/qparser/lex_state.ml b/lib/qparser/lex_state.ml index 3cf757d..4b102b8 100644 --- a/lib/qparser/lex_state.ml +++ b/lib/qparser/lex_state.ml @@ -4,11 +4,6 @@ exception Out_of_context -let pr_err buffer = - let location, _ = Lexbuf.positions buffer in - let line = location.Lexing.pos_lnum and file = location.Lexing.pos_fname in - Format.eprintf "Error found at : %s:%d\n" file line - let space = [%sedlex.regexp? ' ' | '\t'] let spaces = [%sedlex.regexp? Plus space] let single_quote = [%sedlex.regexp? '\''] @@ -108,9 +103,7 @@ and quotedStringWraper : Lexbuf.stringWraper = | single_quote -> Lexbuf.leave_state buffer; TEXT_MARKER - | _ -> - pr_err buffer; - raise Not_found); + | _ -> raise Not_found); } and dQuotedStringWraper : Lexbuf.stringWraper = diff --git a/lib/qparser/lexer.ml b/lib/qparser/lexer.ml index b133a8e..a1dbba1 100644 --- a/lib/qparser/lexer.ml +++ b/lib/qparser/lexer.ml @@ -9,11 +9,6 @@ exception UnclosedQuote exception LexError of string exception EOF -let pr_err buffer = - let location, _ = Lexbuf.positions buffer in - let line = location.Lexing.pos_lnum and file = location.Lexing.pos_fname in - Format.eprintf "read_quoted_string : %s:%d\n" file line - (* Extract the location name from the pattern *) let location_name = Str.regexp {|.* \(.*\)|} @@ -109,9 +104,7 @@ let rec read_long_string ?(nested = false) level buf buffer = | any -> Buffer.add_string buf (Lexbuf.content buffer); read_long_string ~nested level buf buffer - | _ -> - pr_err buffer; - raise Not_found + | _ -> raise Not_found (** Read the text inside a ['] *) let rec read_quoted_string : Lexbuf.stringWraper -> Lexbuf.buffer_builder = @@ -135,9 +128,7 @@ let rec read_quoted_string : Lexbuf.stringWraper -> Lexbuf.buffer_builder = | eol | any -> Buffer.add_string buf (Lexbuf.content buffer); (f.wrap (read_quoted_string f)) buf buffer - | _ -> - pr_err buffer; - raise Not_found + | _ -> raise Not_found let rec skip_comment buffer = (* Simplified way to skip the content of a string until the end marker. @@ -177,9 +168,7 @@ let rec skip_comment buffer = Lexbuf.rollback buffer; COMMENT | any -> skip_comment buffer - | _ -> - pr_err buffer; - raise Not_found + | _ -> raise Not_found (** Main lexer *) let rec parse_token : Lexbuf.t -> token = |