aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc/src/erl_pp.xml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stdlib/doc/src/erl_pp.xml')
-rw-r--r--lib/stdlib/doc/src/erl_pp.xml129
1 files changed, 69 insertions, 60 deletions
diff --git a/lib/stdlib/doc/src/erl_pp.xml b/lib/stdlib/doc/src/erl_pp.xml
index e96fd576ec..77a7f1e8d1 100644
--- a/lib/stdlib/doc/src/erl_pp.xml
+++ b/lib/stdlib/doc/src/erl_pp.xml
@@ -7,7 +7,7 @@
<year>1996</year>
<year>2016</year>
<holder>Ericsson AB, All Rights Reserved</holder>
- </copyright>
+ </copyright>
<legalnotice>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -30,38 +30,37 @@
<docno>1</docno>
<approved>Bjarne D&auml;cker</approved>
<checked></checked>
- <date>97-01-24</date>
+ <date>1997-01-24</date>
<rev>B</rev>
- <file>erl_pp.sgml</file>
+ <file>erl_pp.xml</file>
</header>
<module>erl_pp</module>
- <modulesummary>The Erlang Pretty Printer</modulesummary>
+ <modulesummary>The Erlang pretty printer.</modulesummary>
<description>
<p>The functions in this module are used to generate
aesthetically attractive representations of abstract
- forms, which are suitable for printing. All functions return (possibly deep)
+ forms, which are suitable for printing.
+ All functions return (possibly deep)
lists of characters and generate an error if the form is wrong.</p>
- <p>All functions can have an optional argument which specifies a hook
+
+ <p>All functions can have an optional argument, which specifies a hook
that is called if an attempt is made to print an unknown form.</p>
</description>
+
<datatypes>
<datatype>
<name name="hook_function"/>
<desc>
- <p>The optional argument <marker id="hook_function"/>
- <c>HookFunction</c>, shown in the functions described below,
- defines a function which is called when an unknown form occurs where there
- should be a valid expression.</p>
-
- <p>If <c>HookFunction</c> is equal to <c>none</c> there is no hook
- function.</p>
-
- <p>The called hook function should return a (possibly deep) list
- of characters. <seealso marker="#expr/4"><c>expr/4</c></seealso>
- is useful in a hook.
- </p>
- <p>If <c><anno>CurrentIndentation</anno></c> is negative, there will be no line
- breaks and only a space is used as a separator.</p>
+ <p>Optional argument <marker id="hook_function"/><c>HookFunction</c>,
+ shown in the functions described in this module, defines a function
+ that is called when an unknown form occurs where there
+ is to be a valid expression. If <c>HookFunction</c> is equal to
+ <c>none</c>, there is no hook function.</p>
+ <p>The called hook function is to return a (possibly deep) list of
+ characters. Function <seealso marker="#expr/4"><c>expr/4</c></seealso>
+ is useful in a hook.</p>
+ <p>If <c><anno>CurrentIndentation</anno></c> is negative, there are no
+ line breaks and only a space is used as a separator.</p>
</desc>
</datatype>
<datatype>
@@ -71,78 +70,88 @@
<name name="options"/>
</datatype>
</datatypes>
+
<funcs>
<func>
- <name name="form" arity="1"/>
- <name name="form" arity="2"/>
- <fsummary>Pretty print a form</fsummary>
+ <name name="attribute" arity="1"/>
+ <name name="attribute" arity="2"/>
+ <fsummary>Pretty print an attribute.</fsummary>
<desc>
- <p>Pretty prints a
- <c><anno>Form</anno></c> which is an abstract form of a type which is
- returned by <seealso marker="erl_parse#parse_form/1">
- <c>erl_parse:parse_form/1</c></seealso>.</p>
+ <p>Same as <seealso marker="#form/1"><c>form/1,2</c></seealso>,
+ but only for attribute <c><anno>Attribute</anno></c>.</p>
</desc>
</func>
+
<func>
- <name name="attribute" arity="1"/>
- <name name="attribute" arity="2"/>
- <fsummary>Pretty print an attribute</fsummary>
+ <name name="expr" arity="1"/>
+ <name name="expr" arity="2"/>
+ <name name="expr" arity="3"/>
+ <name name="expr" arity="4"/>
+ <fsummary>Pretty print one <c>Expression</c>.</fsummary>
<desc>
- <p>The same as <c>form</c>, but only for the attribute
- <c><anno>Attribute</anno></c>.</p>
+ <p>Prints one expression. It is useful for implementing hooks (see
+ section
+ <seealso marker="#knownlimitations">Known Limitations</seealso>).</p>
</desc>
</func>
+
<func>
- <name name="function" arity="1"/>
- <name name="function" arity="2"/>
- <fsummary>Pretty print a function</fsummary>
+ <name name="exprs" arity="1"/>
+ <name name="exprs" arity="2"/>
+ <name name="exprs" arity="3"/>
+ <fsummary>Pretty print <c>Expressions</c>.</fsummary>
<desc>
- <p>The same as <c>form</c>, but only for the function
- <c><anno>Function</anno></c>.</p>
+ <p>Same as <seealso marker="#form/1"><c>form/1,2</c></seealso>,
+ but only for the sequence of
+ expressions in <c><anno>Expressions</anno></c>.</p>
</desc>
</func>
+
<func>
- <name name="guard" arity="1"/>
- <name name="guard" arity="2"/>
- <fsummary>Pretty print a guard</fsummary>
+ <name name="form" arity="1"/>
+ <name name="form" arity="2"/>
+ <fsummary>Pretty print a form.</fsummary>
<desc>
- <p>The same as <c>form</c>, but only for the guard test
- <c><anno>Guard</anno></c>.</p>
+ <p>Pretty prints a
+ <c><anno>Form</anno></c>, which is an abstract form of a type that is
+ returned by <seealso marker="erl_parse#parse_form/1">
+ <c>erl_parse:parse_form/1</c></seealso>.</p>
</desc>
</func>
+
<func>
- <name name="exprs" arity="1"/>
- <name name="exprs" arity="2"/>
- <name name="exprs" arity="3"/>
- <fsummary>Pretty print <c>Expressions</c></fsummary>
+ <name name="function" arity="1"/>
+ <name name="function" arity="2"/>
+ <fsummary>Pretty print a function.</fsummary>
<desc>
- <p>The same as <c>form</c>, but only for the sequence of
- expressions in <c><anno>Expressions</anno></c>.</p>
+ <p>Same as <seealso marker="#form/1"><c>form/1,2</c></seealso>,
+ but only for function <c><anno>Function</anno></c>.</p>
</desc>
</func>
+
<func>
- <name name="expr" arity="1"/>
- <name name="expr" arity="2"/>
- <name name="expr" arity="3"/>
- <name name="expr" arity="4"/>
- <fsummary>Pretty print one <c>Expression</c></fsummary>
+ <name name="guard" arity="1"/>
+ <name name="guard" arity="2"/>
+ <fsummary>Pretty print a guard.</fsummary>
<desc>
- <p>This function prints one expression. It is useful for implementing hooks (see below).</p>
+ <p>Same as <seealso marker="#form/1"><c>form/1,2</c></seealso>,
+ but only for the guard test <c><anno>Guard</anno></c>.</p>
</desc>
</func>
</funcs>
<section>
- <title>Bugs</title>
- <p>It should be possible to have hook functions for unknown forms
- at places other than expressions.</p>
+ <marker id="knownlimitations"/>
+ <title>Known Limitations</title>
+ <p>It is not possible to have hook functions for unknown forms
+ at other places than expressions.</p>
</section>
<section>
<title>See Also</title>
- <p><seealso marker="io">io(3)</seealso>,
- <seealso marker="erl_parse">erl_parse(3)</seealso>,
- <seealso marker="erl_eval">erl_eval(3)</seealso></p>
+ <p><seealso marker="erl_eval"><c>erl_eval(3)</c></seealso>,
+ <seealso marker="erl_parse"><c>erl_parse(3)</c></seealso>,
+ <seealso marker="io"><c>io(3)</c></seealso></p>
</section>
</erlref>