summaryrefslogtreecommitdiff
path: root/parsing
diff options
context:
space:
mode:
authorGravatar Stephane Glondu <steph@glondu.net>2014-01-19 15:09:23 +0100
committerGravatar Stephane Glondu <steph@glondu.net>2014-01-19 15:09:23 +0100
commitd2c5c5e616a6e118291fe1ce9965c731adac03a8 (patch)
tree7b000ad50dcc45ff1c63768a983cded1e23a07ca /parsing
parentdb38bb4ad9aff74576d3b7f00028d48f0447d5bd (diff)
Imported Upstream version 8.4pl3dfsgupstream/8.4pl3dfsg
Diffstat (limited to 'parsing')
-rw-r--r--parsing/lexer.ml42
-rw-r--r--parsing/printer.ml4
2 files changed, 3 insertions, 3 deletions
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)