diff options
author | Nicolás Ojeda Bär <n.oje.bar@gmail.com> | 2019-09-28 05:17:42 +0200 |
---|---|---|
committer | Nicolás Ojeda Bär <n.oje.bar@gmail.com> | 2019-09-28 18:03:59 +0200 |
commit | 3ea1411ee367f72f9ebe89afb3007168838d751d (patch) | |
tree | b5709fa2aa89601bc3f5cd26cc9f96fea19da61b /ocamltest/tsl_lexer.mll | |
parent | afb90bdf7476a92c024eee2e5745ed85200c654b (diff) | |
download | ocaml-3ea1411ee367f72f9ebe89afb3007168838d751d.tar.gz |
Add ocamltest -find-test-dirs and -list-tests options
Diffstat (limited to 'ocamltest/tsl_lexer.mll')
-rw-r--r-- | ocamltest/tsl_lexer.mll | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ocamltest/tsl_lexer.mll b/ocamltest/tsl_lexer.mll index 90a3083646..19ef10eec7 100644 --- a/ocamltest/tsl_lexer.mll +++ b/ocamltest/tsl_lexer.mll @@ -22,9 +22,7 @@ open Tsl_parser let comment_start_pos = ref [] let lexer_error message = - Printf.eprintf "%s\n%!" message; - exit 2 - + failwith (Printf.sprintf "Tsl lexer: %s" message) } let newline = ('\013'* '\010') @@ -67,6 +65,8 @@ rule token = parse file line column (Lexing.lexeme lexbuf) in lexer_error message } + | eof + { lexer_error "unexpected eof" } (* Backslashes are ignored in strings except at the end of lines where they cause the newline to be ignored. After an escaped newline, any blank characters at the start of the line are ignored and optionally one blank |