File: ast.html

package info (click to toggle)
synopsis 0.8.0-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 10,112 kB
  • ctags: 12,996
  • sloc: cpp: 34,254; ansic: 33,620; python: 10,975; sh: 7,261; xml: 6,369; makefile: 773; asm: 445
file content (11 lines) | stat: -rw-r--r-- 2,676 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>The AST</title><link rel="stylesheet" href="synopsis.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="Synopsis Tutorial"><link rel="up" href="scripting.html" title="Chapter3.Scripting and extending synopsis"><link rel="previous" href="scripting.html" title="Chapter3.Scripting and extending synopsis"><link rel="next" href="processor.html" title="The Processor class"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The AST</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="scripting.html">Prev</a></td><th width="60%" align="center">Chapter3.Scripting and extending synopsis</th><td width="20%" align="right"><a accesskey="n" href="processor.html">Next</a></td></tr></table></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="ast"></a>The AST</h2></div></div><div></div></div><p>At the core of synopsis is a representation of
        the source code to be analyzed called an abstract syntax
        tree (AST). Language specific syntax gets translated into
        and abstract tree of statements, annotated with all the necessary
        metadata to recover the important details during further processing.</p><p>At this time only one particular type of statements is translated
        into an AST: declarations. This can be declarations of types, functions,
        variables, etc. Attached to a declaration is a set of comments that was
        found in the source code before the declaration. It is thus possible
        to provide other metadata (such as code documentation) as part of these
        comments. A variety of comment processors exist to extract such metadata
        from comments.</p><div class="mediaobject"><img src="images/ast.png"></div></div><div class="navfooter"><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="scripting.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="scripting.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="processor.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter3.Scripting and extending synopsis</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">The Processor class</td></tr></table></div></body></html>