diff options
Diffstat (limited to 'lib/qparser/lexer.ml')
-rw-r--r-- | lib/qparser/lexer.ml | 17 |
1 files changed, 3 insertions, 14 deletions
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 = |