aboutsummaryrefslogtreecommitdiffstats
path: root/lib/syntax_tools/doc/overview.edoc
blob: 7be96f1a5591dd0dba367ca64ff55d8439b0f043 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
			-*- html -*-

	Syntax Tools overview page

@author Richard Carlsson <[email protected]>
@copyright 1997-2014 Richard Carlsson
@version {@version}
@title Erlang Syntax and Metaprogramming tools

@doc This package contains modules for handling abstract syntax trees (ASTs)
in Erlang, in a way that is compatible with the "abstract format" parse
trees of the stdlib module `erl_parse', together with utilities for reading
source files, {@link erl_prettypr. pretty-printing syntax trees}, {@link
igor. merging and renaming modules}, {@link erl_tidy. cleaning up obsolete
constructs}, and doing {@link merl. metaprogramming} in Erlang.

The abstract layer (defined in {@link erl_syntax}) is nicely
structured and the node types are context-independent. The layer makes
it possible to transparently attach source-code comments and user
annotations to nodes of the tree. Using the abstract layer makes
applications less sensitive to changes in the {@link //stdlib/erl_parse}
data structures, only requiring the `erl_syntax' module to be up-to-date.

The pretty printer {@link erl_prettypr} is implemented on top of the
library module {@link prettypr}: this is a powerful and flexible generic
pretty printing library, which is also distributed separately.

For a short demonstration of parsing and pretty-printing, simply
compile the included module <a href="demo.erl">`demo.erl'</a>,
and execute `demo:run()' from the Erlang shell. It will compile the
remaining modules and give you further instructions.

Also try the {@link erl_tidy} module, as follows:
```erl_tidy:dir("any-erlang-source-dir", [test, old_guard_tests]).'''
(the `test' option assures that no files are modified).