summaryrefslogtreecommitdiffstats
path: root/parsing/syntaxerr.ml
diff options
context:
space:
mode:
authorPierre Weis <Pierre.Weis@inria.fr>2000-02-08 20:00:06 +0000
committerPierre Weis <Pierre.Weis@inria.fr>2000-02-08 20:00:06 +0000
commit39553e99728ed01708c4004d59d00e1dd73243f5 (patch)
tree2c767f5a867592b98e3d8e64081b0e22d681ea10 /parsing/syntaxerr.ml
parent02969bf3de46371bee8d9468b84d6bb40454794b (diff)
Révision de l'impression à l'aide de format: utilisation de printf
pour condenser les programmes et aussi préparer une future (éventuelle) internationalisation d'Objective Caml. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2796 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'parsing/syntaxerr.ml')
-rw-r--r--parsing/syntaxerr.ml18
1 files changed, 5 insertions, 13 deletions
diff --git a/parsing/syntaxerr.ml b/parsing/syntaxerr.ml
index 011938519..e03cd77b2 100644
--- a/parsing/syntaxerr.ml
+++ b/parsing/syntaxerr.ml
@@ -27,21 +27,13 @@ let report_error = function
Unclosed(opening_loc, opening, closing_loc, closing) ->
if String.length !Location.input_name = 0
&& Location.highlight_locations opening_loc closing_loc
- then begin
- print_string "Syntax error: '";
- print_string closing;
- print_string "' expected, the highlighted '";
- print_string opening;
- print_string "' might be unmatched"
- end else begin
+ then printf "Syntax error: '%s' expected, \
+ the highlighted '%s' might be unmatched" closing opening
+ else begin
Location.print closing_loc;
- print_string "Syntax error: '";
- print_string closing;
- print_string "' expected"; force_newline();
+ printf "Syntax error: '%s' expected@?" closing;
Location.print opening_loc;
- print_string "This '";
- print_string opening;
- print_string "' might be unmatched"
+ printf "This '%s' might be unmatched" opening
end
| Other loc ->
Location.print loc;