<html><head>
<title>pt_introduction - Parser Tools</title>
<style type="text/css"><!--
HTML {
background: #FFFFFF;
color: black;
}
BODY {
background: #FFFFFF;
color: black;
}
DIV.doctools {
margin-left: 10%;
margin-right: 10%;
}
DIV.doctools H1,DIV.doctools H2 {
margin-left: -5%;
}
H1, H2, H3, H4 {
margin-top: 1em;
font-family: sans-serif;
font-size: large;
color: #005A9C;
background: transparent;
text-align: left;
}
H1.title {
text-align: center;
}
UL,OL {
margin-right: 0em;
margin-top: 3pt;
margin-bottom: 3pt;
}
UL LI {
list-style: disc;
}
OL LI {
list-style: decimal;
}
DT {
padding-top: 1ex;
}
UL.toc,UL.toc UL, UL.toc UL UL {
font: normal 12pt/14pt sans-serif;
list-style: none;
}
LI.section, LI.subsection {
list-style: none;
margin-left: 0em;
text-indent: 0em;
padding: 0em;
}
PRE {
display: block;
font-family: monospace;
white-space: pre;
margin: 0%;
padding-top: 0.5ex;
padding-bottom: 0.5ex;
padding-left: 1ex;
padding-right: 1ex;
width: 100%;
}
PRE.example {
color: black;
background: #f5dcb3;
border: 1px solid black;
}
UL.requirements LI, UL.syntax LI {
list-style: none;
margin-left: 0em;
text-indent: 0em;
padding: 0em;
}
DIV.synopsis {
color: black;
background: #80ffff;
border: 1px solid black;
font-family: serif;
margin-top: 1em;
margin-bottom: 1em;
}
UL.syntax {
margin-top: 1em;
border-top: 1px solid black;
}
UL.requirements {
margin-bottom: 1em;
border-bottom: 1px solid black;
}
--></style>
</head>
<! -- Generated from file 'pt_introduction.man' by tcllib/doctools with format 'html'
-->
<! -- Copyright © 2009 Andreas Kupries <[email protected]>
-->
<! -- CVS: $Id$ pt_introduction.n
-->
<body><div class="doctools">
<hr> [
<a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
] <hr>
<h1 class="title">pt_introduction(n) 1 tcllib "Parser Tools"</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>pt_introduction - Introduction to Parser Tools</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">Parser Tools Architecture</a>
<ul>
<li class="subsection"><a href="#subsection1">User Packages</a></li>
<li class="subsection"><a href="#subsection2">Core Packages</a></li>
<li class="subsection"><a href="#subsection3">Support Packages</a></li>
</ul>
</li>
<li class="section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="section"><a href="#keywords">Keywords</a></li>
<li class="section"><a href="#category">Category</a></li>
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
</ul>
</div>
</div>
<div id="section1" class="section"><h2><a name="section1">Description</a></h2>
<p>Welcome to the Parser Tools, a system for the creation and
manipulation of parsers and the grammars driving them.</p>
<p>What are your goals which drove you here ?</p>
<ol class="enumerated">
<li><p>Do you simply wish to create a parser for some language ?</p>
<p>In that case have a look at our parser generator application,
<b class="cmd"><a href="../../apps/pt.html">pt</a></b>, or, for a slightly deeper access, the package underneath it,
<b class="package"><a href="pt_pgen.html">pt::pgen</a></b>.</p></li>
<li><p>Do you wish to know more about the architecture of the system ?</p>
<p>This is described in the section
<span class="sectref"><a href="#section2">Parser Tools Architecture</a></span>, below</p></li>
<li><p>Is your interest in the theoretical background upon which the packages
and tools are build ?</p>
<p>See the <i class="term"><a href="pt_peg_introduction.html">Introduction to Parsing Expression Grammars</a></i>.</p></li>
</ol>
</div>
<div id="section2" class="section"><h2><a name="section2">Parser Tools Architecture</a></h2>
<p>The system can be split into roughly three layers, as seen in the
figure below</p>
<p><img alt="architecture" src="../../../../image/architecture.png"></p>
<p>These layers are, from high to low:</p>
<ol class="enumerated">
<li><p>At the top we have the application and the packages using the packages
of the layer below to implement common usecases. One example is the
aforementioned <b class="package"><a href="pt_pgen.html">pt::pgen</a></b> which provides a parser generator.</p>
<p>The list of packages belonging to this layer can be found in section
<span class="sectref"><a href="#subsection1">User Packages</a></span></p></li>
<li><p>In this layer we have the packages which provide the core of the
functionality for the whole system. They are, in essence, a set of
blocks which can be combined in myriad ways, like Lego (tm). The
packages in the previous level are 'just' pre-fabricated combinations
to cover the most important use cases.</p>
<p>The list of packages belonging to this layer can be found in section
<span class="sectref"><a href="#subsection2">Core Packages</a></span></p></li>
<li><p>Last, but not least is the layer containing support packages providing
generic functionality which not necessarily belong into the module.</p>
<p>The list of packages belonging to this layer can be found in section
<span class="sectref"><a href="#subsection3">Support Packages</a></span></p></li>
</ol>
<div id="subsection1" class="subsection"><h3><a name="subsection1">User Packages</a></h3>
<dl class="definitions">
<dt><b class="package"><a href="pt_pgen.html">pt::pgen</a></b></dt>
<dd></dd>
</dl>
</div>
<div id="subsection2" class="subsection"><h3><a name="subsection2">Core Packages</a></h3>
<p>This layer is further split into six sections handling the storage,
import, export, transformation, and execution of grammars, plus
grammar specific support packages.</p>
<dl class="definitions">
<dt>Storage</dt>
<dd><dl class="definitions">
<dt><b class="package"><a href="pt_peg_container.html">pt::peg::container</a></b></dt>
<dd></dd>
</dl></dd>
<dt>Export</dt>
<dd><dl class="definitions">
<dt><b class="package"><a href="pt_peg_export.html">pt::peg::export</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_export_container.html">pt::peg::export::container</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_export_json.html">pt::peg::export::json</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_export_peg.html">pt::peg::export::peg</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_to_container.html">pt::peg::to::container</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_to_json.html">pt::peg::to::json</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_to_peg.html">pt::peg::to::peg</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_to_param.html">pt::peg::to::param</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_to_cparam.html">pt::peg::to::cparam</a></b></dt>
<dd></dd>
</dl></dd>
<dt>Import</dt>
<dd><dl class="definitions">
<dt><b class="package"><a href="pt_peg_import.html">pt::peg::import</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_import_container.html">pt::peg::import::container</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_import_json.html">pt::peg::import::json</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_import_peg.html">pt::peg::import::peg</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_from_container.html">pt::peg::from::container</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_from_json.html">pt::peg::from::json</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_from_peg.html">pt::peg::from::peg</a></b></dt>
<dd></dd>
</dl></dd>
<dt>Transformation</dt>
<dd></dd>
<dt>Execution</dt>
<dd><dl class="definitions">
<dt><b class="package"><a href="pt_peg_interp.html">pt::peg::interp</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_rdengine.html">pt::rde</a></b></dt>
<dd></dd>
</dl></dd>
<dt>Support</dt>
<dd><dl class="definitions">
<dt><b class="package"><a href="pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_astree.html">pt::ast</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_pexpression.html">pt::pe</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_pegrammar.html">pt::peg</a></b></dt>
<dd></dd>
</dl></dd>
</dl>
</div>
<div id="subsection3" class="subsection"><h3><a name="subsection3">Support Packages</a></h3>
<dl class="definitions">
<dt><b class="package"><a href="pt_peg_container_peg.html">pt::peg::container::peg</a></b></dt>
<dd></dd>
<dt><b class="package">text::write</b></dt>
<dd></dd>
<dt><b class="package">configuration</b></dt>
<dd></dd>
<dt><b class="package">paths</b></dt>
<dd></dd>
<dt><b class="package">char</b></dt>
<dd></dd>
</dl>
</div>
</div>
<div id="section3" class="section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright © 2009 Andreas Kupries <[email protected]></p>
</div>
</div></body></html>