From f4a7c3a1aa4190c277865a345b3766c09a39fb2f Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Wed, 27 Nov 2013 19:02:14 +0100 Subject: Conform to specification --- src/main.ml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/main.ml') diff --git a/src/main.ml b/src/main.ml index 4ebcbb3..c64381c 100644 --- a/src/main.ml +++ b/src/main.ml @@ -17,8 +17,8 @@ let localisation pos = !ifile l (c-1) c let options = [ - "-parse-only", Arg.Set parse_only, "Stops after parsing of the input file."; - "-dump", Arg.Set dump, "Dump the AST after parsing." + "--parse-only", Arg.Set parse_only, "Stops after parsing of the input file."; + "--dump", Arg.Set dump, "Dump the AST after parsing." ] let localisation pos = @@ -52,6 +52,9 @@ let () = eprintf "Lexical analysis error: %s@." s; exit 1 | Parser.Error -> - localisation (Lexing.lexeme_start_p buf); - eprintf "Parsing error.@."; - exit 1 + localisation (Lexing.lexeme_start_p buf); + eprintf "Parsing error.@."; + exit 1 + | _ -> + eprintf "Unexpected error...@."; + exit 2 -- cgit v1.2.3