<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html xmlns:fn="http://www.w3.org/2005/02/xpath-functions"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css"> <title>Erlang -- Erlang Syntax Tools </title> </head> <body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container"> <script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript"> <!-- function getWinHeight() { var myHeight = 0; if( typeof( window.innerHeight ) == 'number' ) { //Non-IE myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myHeight = document.body.clientHeight; } return myHeight; } function setscrollpos() { var objf=document.getElementById('loadscrollpos'); document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2; } function addEvent(obj, evType, fn){ if (obj.addEventListener){ obj.addEventListener(evType, fn, true); return true; } else if (obj.attachEvent){ var r = obj.attachEvent("on"+evType, fn); return r; } else { return false; } } addEvent(window, 'load', setscrollpos); //--></script><div id="leftnav"><div class="innertube"> <img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/syntax_tools-1.6.9.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>Syntax_Tools</strong><br><strong>User's Guide</strong><br><small>Version 1.6.9</small></p> <br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Chapters</strong></small></p> <ul class="flipMenu" imagepath="../../../../doc/js/flipmenu"><li id="loadscrollpos" title="Erlang Syntax Tools " expanded="true">Erlang Syntax Tools <ul> <li><a href="chapter.html"> Top of chapter </a></li> <li title="Overview"><a href="chapter.html#id57236">Overview</a></li> </ul> </li></ul> </div></div> <div id="content"> <div class="innertube"> <h1>1 Erlang Syntax Tools </h1> <h3><a name="id57236">1.1 Overview</a></h3> <p>This package contains modules for handling abstract Erlang syntax trees, in a way that is compatible with the "parse trees" of the standard library module <span class="code">erl_parse</span>, together with utilities for reading source files in unusual ways and pretty-printing syntax trees. Also included is an amazing module merger and renamer called Igor, as well as an automatic code-cleaner.</p> <p>The abstract layer (defined in <span class="bold_code"><a href="erl_syntax.html">erl_syntax</a></span>) 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 <span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','stdlib','erl_parse.html');">erl_parse(3)</a></span> data structures, only requiring the <span class="bold_code"><a href="erl_syntax.html">erl_syntax</a></span> module to be up-to-date.</p> <p>The pretty printer <span class="bold_code"><a href="erl_prettypr.html">erl_prettypr</a></span> is implemented on top of the library module <span class="bold_code"><a href="prettypr.html">prettypr</a></span>: this is a powerful and flexible generic pretty printing library, which is also distributed separately.</p> <p>For a short demonstration of parsing and pretty-printing, simply compile the included module <span class="bold_code"><a href="../../examples/demo.erl">demo.erl</a></span>, and execute <span class="code">demo:run()</span> from the Erlang shell. It will compile the remaining modules and give you further instructions.</p> <p>Also try the <span class="bold_code"><a href="erl_tidy.html">erl_tidy</a></span> module, as follows: </p> <div class="example"><pre> erl_tidy:dir("any-erlang-source-dir", [test, old_guard_tests]).</pre></div> <p> ("<span class="code">test</span>" assures that no files are modified).</p> <p>News in 1.4: </p> <ul> <li><p>Added support for <span class="bold_code"><a href="erl_syntax.html#cond_expr-1">cond-expressions</a></span>, <span class="bold_code"><a href="erl_syntax.html#try_expr-4">try-expressions</a></span> and <span class="bold_code"><a href="erl_syntax.html#class_qualifier-2">class-qualifier patterns</a></span>.</p></li> <li><p>Added support for parameterized modules.</p></li> <li><p><span class="bold_code"><a href="igor.html">Igor</a></span> is officially included.</p></li> <li><p>Quick-parse functionality added to <span class="bold_code"><a href="epp_dodger.html">epp_dodger</a></span>.</p></li> </ul> <p> </p> <p>News in 1.3: </p> <ul> <li><p>Added support for qualified names (as used by "packages").</p></li> <li><p>Various internal changes.</p></li> </ul> <p> </p> <p>News in 1.2: </p> <ul> <li><p>HTML Documentation (generated with EDoc).</p></li> <li><p>A few bug fixes and some minor interface changes (sorry for any inconvenience).</p></li> </ul> <p> </p> <p>News in 1.1: </p> <ul> <li><p>Module <span class="bold_code"><a href="erl_tidy.html">erl_tidy</a></span>: check or tidy either a single module, or a whole directory tree recursively. Rewrites and reformats the code without losing comments or expanding macros. Safe mode allows generating reports without modifying files.</p></li> <li><p>Module <span class="bold_code"><a href="erl_syntax_lib.html">erl_syntax_lib</a></span>: contains support functions for easier analysis of the source code structure.</p></li> <li><p>Module <span class="bold_code"><a href="epp_dodger.html">epp_dodger</a></span>: Bypasses the Erlang preprocessor - avoids macro expansion, file inclusion, conditional compilation, etc. Allows you to find/modify particular definitions/applications of macros, and other things previously not possible.</p></li> </ul> <p> </p> </div> <div class="footer"> <hr> <p>Copyright © 2006-2012 Ericsson AB. All Rights Reserved.</p> </div> </div> </div></body> </html>