summaryrefslogtreecommitdiff
path: root/ocamldoc/odoc_parser.mly
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2010-01-22 12:48:24 +0000
committerDamien Doligez <damien.doligez-inria.fr>2010-01-22 12:48:24 +0000
commit04b1656222698bd7e92f213e9a718b7a4185643a (patch)
tree6186d1ba1e00adb1232908f95cb92c299902a943 /ocamldoc/odoc_parser.mly
parentbdc0fadee2dc9669818955486b4c3497016edda5 (diff)
downloadocaml-04b1656222698bd7e92f213e9a718b7a4185643a.tar.gz
clean up spaces and tabs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9547 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc/odoc_parser.mly')
-rw-r--r--ocamldoc/odoc_parser.mly20
1 files changed, 10 insertions, 10 deletions
diff --git a/ocamldoc/odoc_parser.mly b/ocamldoc/odoc_parser.mly
index 9b99e24f02..0d9d814d29 100644
--- a/ocamldoc/odoc_parser.mly
+++ b/ocamldoc/odoc_parser.mly
@@ -16,7 +16,7 @@ open Odoc_types
open Odoc_comments_global
let uppercase = "[A-Z\192-\214\216-\222]"
-let identchar =
+let identchar =
"[A-Za-z_\192-\214\216-\246\248-\255'0-9]"
let blank = "[ \010\013\009\012]"
@@ -89,7 +89,7 @@ element:
param:
T_PARAM Desc
- {
+ {
(* isolate the identificator *)
(* we only look for simple id, no pattern nor tuples *)
let s = $2 in
@@ -97,7 +97,7 @@ param:
[]
| _ :: [] ->
raise (Failure "usage: @param id description")
- | id :: _ ->
+ | id :: _ ->
print_DEBUG ("Identificator "^id);
let reg = identchar^"+" in
print_DEBUG ("reg="^reg);
@@ -105,7 +105,7 @@ param:
let remain = String.sub s (String.length id) ((String.length s) - (String.length id)) in
print_DEBUG ("T_PARAM Desc remain="^remain);
let remain2 = Str.replace_first (Str.regexp ("^"^blank^"+")) "" remain in
- params := !params @ [(id, remain2)]
+ params := !params @ [(id, remain2)]
else
raise (Failure (id^" is not a valid parameter identificator in \"@param "^s^"\""))
}
@@ -126,25 +126,25 @@ deprecated:
T_DEPRECATED Desc { deprecated := Some $2 }
;
raise_exc:
- T_RAISES Desc
- {
+ T_RAISES Desc
+ {
(* isolate the exception construtor name *)
let s = $2 in
match Str.split (Str.regexp (blank^"+")) s with
[]
| _ :: [] ->
raise (Failure "usage: @raise Exception description")
- | id :: _ ->
+ | id :: _ ->
print_DEBUG ("exception "^id);
let reg = uppercase^identchar^"*"^"\\(\\."^uppercase^identchar^"*\\)*" in
print_DEBUG ("reg="^reg);
if Str.string_match (Str.regexp reg) id 0 then
let remain = String.sub s (String.length id) ((String.length s) - (String.length id)) in
let remain2 = Str.replace_first (Str.regexp ("^"^blank^"+")) "" remain in
- raised_exceptions := !raised_exceptions @ [(id, remain2)]
+ raised_exceptions := !raised_exceptions @ [(id, remain2)]
else
raise (Failure (id^" is not a valid exception constructor in \"@raise "^s^"\""))
- }
+ }
;
return:
T_RETURN Desc { return_value := Some $2 }
@@ -155,4 +155,4 @@ custom:
;
-%%
+%%