From d2c5c5e616a6e118291fe1ce9965c731adac03a8 Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Sun, 19 Jan 2014 15:09:23 +0100 Subject: Imported Upstream version 8.4pl3dfsg --- parsing/lexer.ml4 | 2 +- parsing/printer.ml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'parsing') diff --git a/parsing/lexer.ml4 b/parsing/lexer.ml4 index caea30b2..c8e67f4d 100644 --- a/parsing/lexer.ml4 +++ b/parsing/lexer.ml4 @@ -656,7 +656,7 @@ let strip s = let terminal s = let s = strip s in - if s = "" then failwith "empty token"; + if s = "" then Util.error "empty token."; if is_ident_not_keyword s then IDENT s else if is_number s then INT s else KEYWORD s diff --git a/parsing/printer.ml b/parsing/printer.ml index 29ebe4fa..a5bd30b1 100644 --- a/parsing/printer.ml +++ b/parsing/printer.ml @@ -571,7 +571,7 @@ let pr_prim_rule = function (str"fix " ++ pr_id f ++ str"/" ++ int n) | FixRule (f,n,others,j) -> - if j<>0 then warning "Unsupported printing of \"fix\""; + if j<>0 then msg_warn "Unsupported printing of \"fix\""; let rec print_mut = function | (f,n,ar)::oth -> pr_id f ++ str"/" ++ int n ++ str" : " ++ pr_lconstr ar ++ print_mut oth @@ -583,7 +583,7 @@ let pr_prim_rule = function (str"cofix " ++ pr_id f) | Cofix (f,others,j) -> - if j<>0 then warning "Unsupported printing of \"fix\""; + if j<>0 then msg_warn "Unsupported printing of \"fix\""; let rec print_mut = function | (f,ar)::oth -> (pr_id f ++ str" : " ++ pr_lconstr ar ++ print_mut oth) -- cgit v1.2.3