From 2f93254d2c929d0563c2ab8152da62ee0a91ea10 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Thu, 8 Jul 2010 13:20:32 +0200 Subject: Prepare erl_docgen for using Dialyzer specs and types Support for using Dialyzer specifications and types has been added. This is an experimental release; changes are expected before the new functionality is used when building the OTP documentation. --- lib/erl_docgen/priv/bin/specs_gen.escript | 129 +++++ lib/erl_docgen/priv/bin/xref_mod_app.escript | 107 ++++ lib/erl_docgen/priv/docbuilder_dtd/common.refs.dtd | 7 +- lib/erl_docgen/priv/docbuilder_dtd/erlref.dtd | 2 +- lib/erl_docgen/priv/xsl/db_html.xsl | 626 ++++++++++++++++----- lib/erl_docgen/priv/xsl/db_man.xsl | 338 ++++++++++- lib/erl_docgen/priv/xsl/db_pdf.xsl | 486 +++++++++++++--- 7 files changed, 1448 insertions(+), 247 deletions(-) create mode 100644 lib/erl_docgen/priv/bin/specs_gen.escript create mode 100755 lib/erl_docgen/priv/bin/xref_mod_app.escript (limited to 'lib/erl_docgen/priv') diff --git a/lib/erl_docgen/priv/bin/specs_gen.escript b/lib/erl_docgen/priv/bin/specs_gen.escript new file mode 100644 index 0000000000..840fed6dd5 --- /dev/null +++ b/lib/erl_docgen/priv/bin/specs_gen.escript @@ -0,0 +1,129 @@ +#!/usr/bin/env escript +%% -*- erlang -*- +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2010. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% + +%%% - +

Glossary

@@ -1478,14 +1836,14 @@ Erlang Documentation -- <xsl:value-of select="header/title"/> - +
- +

Bibliography

@@ -1498,8 +1856,8 @@ - - + + @@ -1529,7 +1887,7 @@ - + @@ -1538,8 +1896,8 @@ - - + + @@ -1554,9 +1912,9 @@ - ( - ) - + ( + ) + @@ -1564,7 +1922,7 @@ { } - + @@ -1572,7 +1930,7 @@ [ ] - + @@ -1584,7 +1942,7 @@ - + @@ -1597,7 +1955,7 @@ - + diff --git a/lib/erl_docgen/priv/xsl/db_man.xsl b/lib/erl_docgen/priv/xsl/db_man.xsl index 71c4a66707..2ed0d95c6d 100644 --- a/lib/erl_docgen/priv/xsl/db_man.xsl +++ b/lib/erl_docgen/priv/xsl/db_man.xsl @@ -1,5 +1,5 @@ - + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + + + + + + + + + + + + + Error : + /: + + + + + + + + + + + + + + + + + unknown spec + + + + + + + Error: did not expect a 'name' tag with name/arity attributes here! + + + + + + + + + + + + + + .br + + + + + + + + + + + + + + + + + + + + + + + + + + + .nf + .B + + .br + .fi + + + + + + .RS + .TP + Types + + + + + .RE + + + + + + + + + + + .br + + + + + + + + + + .br + + + + + .SH DATA TYPES + + + + + + + + + + .nf + .B + + .br + .fi + + + + .RS + + .RE + + + + + + .br + + + + + + + + + + + + + + + + + + + + + + + + + + + unknown type + + + + + + .nf + .B + + .br + .fi + + + + + + + + + + + + cannot find 'name' () + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + unknown annotation + + + + + + + + + + + + + - + - + .SH "" @@ -49,7 +319,7 @@ - + .RS 2 @@ -68,7 +338,7 @@ .RE - + .TP 2 .B @@ -76,7 +346,7 @@ - + @@ -88,10 +358,10 @@ - .RS 2 - .LP .LP + .RS 2 + .LP .LP - .RE + .RE @@ -171,7 +441,7 @@ - + @@ -184,7 +454,7 @@ .TH 3 " " "" "Erlang Module Definition" .SH NAME - \- + \- @@ -199,7 +469,7 @@ .TH 1 " " "" "User Commands" .SH NAME - \- + \- @@ -214,7 +484,7 @@ .TH 3 " " "" "C Library Functions" .SH NAME - \- + \- @@ -229,7 +499,7 @@ .TH 5 " " "" "Files" .SH NAME - \- + \- @@ -244,7 +514,7 @@ .TH 7 " " "" "Erlang Application Definition" .SH NAME - \- + \- @@ -271,10 +541,26 @@ .LP - + + + + + + + + + + + + + + + + + .B .br @@ -296,7 +582,7 @@ .br - + @@ -316,7 +602,7 @@ - + .SH AUTHORS @@ -336,21 +622,11 @@ > - - - - - - - - - - - + diff --git a/lib/erl_docgen/priv/xsl/db_pdf.xsl b/lib/erl_docgen/priv/xsl/db_pdf.xsl index e12b4d219a..1e80c360b8 100644 --- a/lib/erl_docgen/priv/xsl/db_pdf.xsl +++ b/lib/erl_docgen/priv/xsl/db_pdf.xsl @@ -1,5 +1,5 @@ - + + + + + + + + + + + + Error : + /: + + + + + + + + + + + + + + + + + unknown spec + + + + + + + Error: did not expect a 'name' tag with name/arity attributes here! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Types: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Data Types + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + unknown type + + + + + + + + + + + + + + + + + + + + cannot find 'name' () + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + unknown annotation + + + + + + + + +   + + + - + - + - @@ -63,7 +357,7 @@ - - - @@ -166,7 +460,7 @@ - + @@ -189,7 +483,7 @@ - @@ -242,7 +536,7 @@ the License for the specific language governing rights and limitations under the License. - The Initial Developer of the Original Code is + The Initial Developer of the Original Code is --> . @@ -281,22 +575,22 @@ - + User's Guide - + - + - + @@ -341,7 +635,7 @@ starting-state="hide"> Reference Manual - + @@ -387,7 +681,7 @@ - + @@ -396,7 +690,7 @@ () - + @@ -404,60 +698,76 @@ - + - + - + - + - - - - - - - - - - - - - - - - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / - + - + @@ -491,7 +801,7 @@ .   .   - + @@ -567,7 +877,7 @@ - + @@ -692,7 +1002,7 @@ - + @@ -711,7 +1021,7 @@ - + @@ -734,23 +1044,23 @@ - - + +     Reference Manual - + - - + + - + - + @@ -763,7 +1073,7 @@ - + Erlang module @@ -784,7 +1094,7 @@ - + Command @@ -805,7 +1115,7 @@ - + C Library @@ -826,7 +1136,7 @@ - + Name @@ -847,7 +1157,7 @@ - + Application @@ -900,9 +1210,7 @@ - - - + @@ -912,17 +1220,37 @@ + + + + + + + + + + + + + + + + + + + + - - + + - - + + @@ -931,9 +1259,9 @@ - + - Types: + Types: @@ -1001,9 +1329,9 @@ - + - + @@ -1107,7 +1435,7 @@ - + @@ -1116,8 +1444,8 @@ - - + + @@ -1131,9 +1459,9 @@ - ( - ) - + ( + ) + @@ -1141,7 +1469,7 @@ { } - + @@ -1149,7 +1477,7 @@ [ ] - + @@ -1161,7 +1489,7 @@ - + @@ -1174,7 +1502,7 @@ - + -- cgit v1.2.3