summaryrefslogtreecommitdiff
path: root/ocamldoc
diff options
context:
space:
mode:
Diffstat (limited to 'ocamldoc')
-rw-r--r--ocamldoc/Makefile14
-rw-r--r--ocamldoc/Makefile.unprefix5
-rw-r--r--ocamldoc/odoc_ast.ml6
-rw-r--r--ocamldoc/odoc_man.ml4
-rw-r--r--ocamldoc/odoc_sig.ml2
-rw-r--r--ocamldoc/odoc_text_parser.mly6
-rw-r--r--ocamldoc/stdlib_non_prefixed/Makefile2
7 files changed, 22 insertions, 17 deletions
diff --git a/ocamldoc/Makefile b/ocamldoc/Makefile
index afab6eaba8..2fe3c698dd 100644
--- a/ocamldoc/Makefile
+++ b/ocamldoc/Makefile
@@ -224,10 +224,10 @@ $(OCAMLDOC_LIBCMXA): $(LIBCMXFILES)
$(OCAMLOPT) -a -o $@ $(LINKFLAGS) $^
.PHONY: manpages
-manpages: stdlib_man/Stdlib.3o
+manpages: stdlib_man/Pervasives.3o
.PHONY: html_doc
-html_doc: stdlib_html/Stdlib.html
+html_doc: stdlib_html/Pervasives.html
.PHONY: dot
dot: ocamldoc.dot
@@ -273,10 +273,10 @@ odoc_see_lexer.ml: odoc_see_lexer.mll
$(OCAMLLEX) $<
.mly.ml:
- $(OCAMLYACC) -v $<
+ $(OCAMLYACC) --strict -v $<
.mly.mli:
- $(OCAMLYACC) -v $<
+ $(OCAMLYACC) --strict -v $<
# Installation targets
######################
@@ -388,13 +388,15 @@ test_texi:
SRC=$(ROOTDIR)
include Makefile.unprefix
-stdlib_man/Stdlib.3o: $(OCAMLDOC) $(STDLIB_MLIS) $(STDLIB_CMIS)
+stdlib_man/Pervasives.3o: $(OCAMLDOC) $(STDLIB_MLIS)
+ $(MAKE) unprefix_stdlib_for_ocamldoc
$(MKDIR) stdlib_man
$(OCAMLDOC_RUN) -man -d stdlib_man -nostdlib -I stdlib_non_prefixed \
-t "OCaml library" -man-mini $(STDLIB_MLIS) \
-initially-opened-module Pervasives
-stdlib_html/Stdlib.html: $(OCAMLDOC) $(STDLIB_MLIS) $(STDLIB_CMIS)
+stdlib_html/Pervasives.html: $(OCAMLDOC) $(STDLIB_MLIS)
+ $(MAKE) unprefix_stdlib_for_ocamldoc
$(MKDIR) stdlib_html
$(OCAMLDOC_RUN) -d stdlib_html -html -nostdlib -I stdlib_non_prefixed \
-t "OCaml library" $(STDLIB_MLIS) \
diff --git a/ocamldoc/Makefile.unprefix b/ocamldoc/Makefile.unprefix
index 1b036773ec..15a384f7b9 100644
--- a/ocamldoc/Makefile.unprefix
+++ b/ocamldoc/Makefile.unprefix
@@ -98,5 +98,6 @@ $(STDLIB_UNPREFIXED)/pervasives.mli: $(SRC)/stdlib/stdlib.mli $(STDLIB_UNPREFIXE
$(AWK) -f $(STDLIB_UNPREFIXED)/extract_pervasives.awk $< > $@
# Build cmis file inside the STDLIB_UNPREFIXED directories
-$(STDLIB_CMIS): $(STDLIB_DEPS)
- cd $(STDLIB_UNPREFIXED); $(MAKE) $(notdir $(STDLIB_CMIS))
+.PHONY: unprefix_stdlib_for_ocamldoc
+unprefix_stdlib_for_ocamldoc: $(STDLIB_MLIS) $(STDLIB_DEPS)
+ @$(MAKE) -C $(STDLIB_UNPREFIXED) $(notdir $(STDLIB_CMIS))
diff --git a/ocamldoc/odoc_ast.ml b/ocamldoc/odoc_ast.ml
index a6a5e55c4c..7ac5d761d3 100644
--- a/ocamldoc/odoc_ast.ml
+++ b/ocamldoc/odoc_ast.ml
@@ -77,7 +77,7 @@ module Typedtree_search =
| ext :: _ -> Hashtbl.add table (X (Name.from_ident ext.ext_id)) tt
end
| Typedtree.Tstr_exception ext ->
- Hashtbl.add table (E (Name.from_ident ext.ext_id)) tt
+ Hashtbl.add table (E (Name.from_ident ext.tyexn_constructor.ext_id)) tt
| Typedtree.Tstr_type (rf, ident_type_decl_list) ->
List.iter
(fun td ->
@@ -1344,7 +1344,7 @@ module Analyser =
(maybe_more, new_env, [ Element_type_extension new_te ])
| Parsetree.Pstr_exception ext ->
- let name = ext.Parsetree.pext_name in
+ let name = ext.Parsetree.ptyexn_constructor.Parsetree.pext_name in
(* a new exception is defined *)
let complete_name = Name.concat current_module_name name.txt in
(* we get the exception declaration in the typed tree *)
@@ -1355,7 +1355,7 @@ module Analyser =
in
let new_env = Odoc_env.add_extension env complete_name in
let new_ext =
- match tt_ext.ext_kind with
+ match tt_ext.Typedtree.tyexn_constructor.ext_kind with
Text_decl(tt_args, tt_ret_type) ->
let loc_start = loc.Location.loc_start.Lexing.pos_cnum in
let loc_end = loc.Location.loc_end.Lexing.pos_cnum in
diff --git a/ocamldoc/odoc_man.ml b/ocamldoc/odoc_man.ml
index 9a4d3f1ca1..04e66e70aa 100644
--- a/ocamldoc/odoc_man.ml
+++ b/ocamldoc/odoc_man.ml
@@ -329,9 +329,9 @@ class man =
self#man_of_text_element b
(Odoc_info.Code (Odoc_info.use_hidden_modules name))
| Odoc_info.Superscript t ->
- bs b "^{"; self#man_of_text2 b t
+ bs b "^"; self#man_of_text2 b t
| Odoc_info.Subscript t ->
- bs b "_{"; self#man_of_text2 b t
+ bs b "_"; self#man_of_text2 b t
| Odoc_info.Module_list _ ->
()
| Odoc_info.Index_list ->
diff --git a/ocamldoc/odoc_sig.ml b/ocamldoc/odoc_sig.ml
index 9f9396f682..7f61e6ec54 100644
--- a/ocamldoc/odoc_sig.ml
+++ b/ocamldoc/odoc_sig.ml
@@ -863,7 +863,7 @@ module Analyser =
(maybe_more + maybe_more2, new_env, [ Element_type_extension new_te ])
| Parsetree.Psig_exception ext ->
- let name = ext.Parsetree.pext_name in
+ let name = ext.Parsetree.ptyexn_constructor.Parsetree.pext_name in
let types_ext =
try Signature_search.search_extension table name.txt
with Not_found ->
diff --git a/ocamldoc/odoc_text_parser.mly b/ocamldoc/odoc_text_parser.mly
index f71ab3777c..3d590d45c4 100644
--- a/ocamldoc/odoc_text_parser.mly
+++ b/ocamldoc/odoc_text_parser.mly
@@ -82,6 +82,9 @@ let print_DEBUG s = print_string s; print_newline ()
%token EOF
%token <string> Char
+%nonassoc below_Char
+%nonassoc Char
+
/* Start Symbols */
%start main located_element_list
%type <Odoc_types.text> main
@@ -177,7 +180,6 @@ text_element:
list:
| string { [] (* TODO: a test to check that there is only space characters *) }
| string list { $2 }
-| list string { $1 }
| item { [ $1 ] }
| item list { $1 :: $2 }
@@ -207,7 +209,7 @@ shortcut_enum2:
string:
- Char { $1 }
+ Char %prec below_Char { $1 }
| Char string { $1^$2 }
;
diff --git a/ocamldoc/stdlib_non_prefixed/Makefile b/ocamldoc/stdlib_non_prefixed/Makefile
index 801007efc1..1ce1b71565 100644
--- a/ocamldoc/stdlib_non_prefixed/Makefile
+++ b/ocamldoc/stdlib_non_prefixed/Makefile
@@ -4,7 +4,7 @@ include $(TOPDIR)/Makefile.tools
.SUFFIXES:
OCAMLDEP= $(OCAMLRUN) $(TOPDIR)/tools/ocamldep -slash
-OCAMLC_SNP= $(OCAMLRUN) $(TOPDIR)/ocamlc -nostdlib -nopervasives -I $(HERE)
+OCAMLC_SNP= $(OCAMLRUN) $(TOPDIR)/ocamlc -nostdlib -nopervasives
pervasives.cmi: pervasives.mli camlinternalFormatBasics.cmi
$(OCAMLC_SNP) -c $<