<?xml version="1.0" encoding="ASCII"?><?xml-stylesheet type="text/xsl" href="../../../mathml/pmathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xml:space="preserve">
   <head>
      <meta http-equiv="Content-Type" content="text/html; utf-8"/>
      <title>Proceedings of Extreme Markup Languages&#174;</title>
      <link rel="stylesheet" href="../../../extreme-proceedings.css" type="text/css"/>
   </head>
   <body>
      <div id="head">
         <div class="inner">
            <img class="right" src="../../../icons/ExtremeNoDates.jpg"/>
            <h2>
               <i>Proceedings of Extreme Markup Languages<sup>&#174;</sup>
               </i>
            </h2>
         </div>
      </div>
      <div id="nav">
         <table width="100%" cellspacing="5">
            <tr height="29">
               <td class="button" width="20%" align="center">
                  <a title="Master Bibliography" href="../../../biblio.html">Master Bibliography</a>
               </td>
               <td class="button" width="20%" align="center">
                  <a title="Author Index" href="../../../authors.html">Author Index</a>
               </td>
               <td class="button" width="20%" align="center">
                  <a title="Topic Index" href="../../../topics.html">Topic Index</a>
               </td>
               <td class="button" width="20%" align="center">
                  <a title="Date Index" href="../../../dates.html">Date Index</a>
               </td>
               <td class="button" width="20%" align="center">
                  <a title="Proceedings Home" href="../../../index.html">Proceedings Home</a>
               </td>
            </tr>
         </table>
      </div>
      <div id="left1">
         <div class="inner">
            <h4>Balanced Context-Free Grammars,
Hedge Grammars and Pushdown Caterpillar Automata</h4>
            <address>Anne Br&#252;ggemann-Klein <br class="br"/>
               <a href="mailto:brueggem@in.tum.de" class="mailto">brueggem@in.tum.de</a>
            </address>
            <address>Derick Wood <br class="br"/>
               <a href="mailto:dwood@cs.ust.hk" class="mailto">dwood@cs.ust.hk</a>
            </address>
            <div class="abstract">
               <h4>Abstract</h4>
               <p class="first">
The XML community generally takes trees and hedges
as the model for XML document instances and element content.
In contrast, Berstel and Boasson have discussed XML documents
in the framework of extended context-free grammar, modeling XML documents
as Dyck strings and schemas as balanced grammars.
How can these two models be brought closer together?
We examine the close relatioship between Dyck strings and hedges,
observing that trees and hedges are higher level abstractions
than are Dyck primes and Dyck strings.
We then argue that hedge grammars are effecively identical to balanced
grammars and that balanced languages are identical to regular hedge
languages, modulo encoding.
&gt;From the close relationship between Dyck strings and hedges,
we obtain a two-phase architecture for the parsing of balanced languages.
We propose caterpillar automata with an additional pushdown stack
as a new computational model for the second phase;
that is, for the validation of XML documents.
</p>
            </div>
            <p class="keywords">
               <b style="font-size:85%">Keywords:</b> 
               <a href="../../../topics/Modeling.html">Modeling</a>; <a href="../../../topics/Trees-Graphs.html">Trees/Graphs</a>
            </p>
            <div class="contents">
               <h4>Table of Contents</h4>
               <dl>
                  <dt>
                     <a href="#SecIntroduction">Introduction</a>
                  </dt>
                  <dt>
                     <a href="#SecStrings">Dyck strings and balanced grammars</a>
                  </dt>
                  <dt>
                     <a href="#SecHedges">Hedges and balanced grammars</a>
                  </dt>
                  <dt>
                     <a href="#SecGrammars">Hedges and hedge grammars</a>
                  </dt>
                  <dt>
                     <a href="#SecCaterpillars">Pushdown caterpillar automata</a>
                  </dt>
               </dl>
            </div>
            <div class="authorBio">
               <h4>Anne Br&#252;ggemann-Klein</h4>
               <p class="first">Professor Br&#252;ggemann-Klein received her PhD degree in 1985
  from the University of M&#252;nster
  and her Habilitation in 1993 from the University of Freiburg.
  In 1994, she joined the Fakult&#228;t f&#252;r Informatik
  at the Technische Universit&#228;t M&#252;nchen.</p>
               <p>Her research interests are hypertext and document engineering,
  with an emphasis on modelling and formal-languages techniques.
  Her work, together with Derick Wood, on unambiguous content models
  is cited in the XML Recommendation.</p>
               <p>Professor Br&#252;ggemann-KLein teaches
  electronic publishing and conducts a lab course on XML technology
  at the TU M&#252;nchen.
  </p>
            </div>
            <div class="authorBio">
               <h4>Derick Wood</h4>
               <p class="first">Professor Wood received his BSc and PhD degrees from the University of Leeds,
England, in 1963 and 1968, respectively.
He was a Postdoctoral Fellow at the Courant Institute, New York
University, from 1968 to 1970 before joining the Unit of Computer
Science at McMaster University in 1970.
He was Chair of Computer Science from 1979 to 1982. From 1982 to 1992 he was a Professor in the Department
of Computer Science, University of Waterloo.</p>
               <p>For three years he served as Director of the Data Structuring Group.
Before joining HKUST in 1995, he was a Professor in the Department
of Computer Science, University of Western Ontario.
He has published widely in a number of research areas
and has written two textbooks,
"Theory of Computation," published by John Wiley, and "Data Structures,
Algorithms, and Performance," published by Addison-Wesley. In addition, he
has recently written, with Eugene Fink,
a research monograph "Restriction-Oriented Convexity,"
published by Springer.</p>
               <p>His current research interests are:
Document engineering; XML, SGML and XHTML; symbolic manipulation of language-theory
objects; algorithms; data structures; and formal language theory.</p>
            </div>
         </div>
      </div>
      <div id="paperLinks">
         <table width="100%" cellspacing="5">
            <tr height="18">
               <td class="button" width="25%" align="center">
                  <a title="XML Source" href="../../../xml/2004/Bruggemann-Klein01/EML2004Bruggemann-Klein01.xml">XML&#160;Source</a>
               </td>
               <td class="button" width="25%" align="center">
                  <a title="PDF Version" href="../../../xslfo-pdf/2004/Bruggemann-Klein01/EML2004Bruggemann-Klein01.pdf">PDF&#160;(for&#160;print)</a>
               </td>
               <td class="button" width="25%" align="center">
                  <a title="Author Package" href="../../../author-pkg/2004/Bruggemann-Klein01/EML2004Bruggemann-Klein01.zip">Author&#160;Package</a>
               </td>
               <td class="nobutton" width="25%" align="center">
                  <span class="nolink">Typeset&#160;PDF</span>
               </td>
            </tr>
         </table>
      </div>
      <div id="right1">
         <div class="inner">
            <div class="front">
               <h1 class="title">Balanced Context-Free Grammars,
Hedge Grammars and Pushdown Caterpillar Automata</h1>
               <address>Anne Br&#252;ggemann-Klein [Technische Universit&#228;t M&#252;nchen, Institut f&#252;r Informatik]</address>
               <address>Derick Wood [Hong Kong University of Science &amp; Technology, Department of Computer Science]</address>
               <h3 class="conference">Extreme Markup Languages 2004&#174; (Montr&#233;al, Qu&#233;bec)</h3>
               <h4>
                  <i>Copyright &#169; 2004 Anne Br&#252;ggemann-Klein and Derick Wood. Reproduced with permission.</i>
               </h4>
            </div>
            <div class="mathml-warning">
               <p>
                  <i>
                     <b>Note:</b>
                  </i> This paper contains <a href="http://www.w3.org/Math/">W3C MathML</a>,
          which is not equally well supported in all browsers. If you have reason to think 
          that mathematical expressions are not displaying properly, consult the 
          <a href="../../../xslfo-pdf/2004/Bruggemann-Klein01/EML2004Bruggemann-Klein01.pdf">PDF version</a> (or try a different browser).</p>
            </div>
            <div class="section">
               <h2>
                  <a name="SecIntroduction"/>Introduction</h2>
               <p>Since as early as 1991, Murata has been building
on the theory of regular tree and hedge languages
as the foundation of research into schema, query
and transformation languages
for structured documents and XML <b>
                     <span style="font-size:85%">
                        <a href="#MurataHedgeManuscript" name="fromMurataHedgeManuscript">[Mur00]</a>
                     </span>
                  </b>.
Most noticably, tree and hedge grammars
as representations of regular tree and hedge languages
form the basis of the XML schema language
Relax&#160;NG (<b>
                     <span style="font-size:85%">
                        <a href="#RelaxOasis" name="fromRelaxOasis">[CM01]</a>
                     </span>
                  </b>).
In the framework of tree and hedge automata,
operational issues have been addressed (<b>
                     <span style="font-size:85%">
                        <a href="#MurataSchemasTR" name="fromMurataSchemasTR">[LMM00]</a>
                     </span>
                  </b>)
and a taxonomy of XML schema languages
has been established (<b>
                     <span style="font-size:85%">
                        <a href="#MurataTaxonomyEML" name="fromMurataTaxonomyEML">[MLM00]</a>
                     </span>
                  </b>).
Other areas of application are
document transformation (<b>
                     <span style="font-size:85%">
                        <a href="#MurataPODP96" name="fromMurataPODP96">[Mur97]</a>
                     </span>
                  </b>),
query languages (<b>
                     <span style="font-size:85%">
                        <a href="#MurataPODDP98" name="fromMurataPODDP98">[Mur98]</a>
                     </span>
                  </b>, <b>
                     <span style="font-size:85%">
                        <a href="#MurataExtendingPaths" name="fromMurataExtendingPaths">[Mur01]</a>
                     </span>
                  </b>)
and the definition and processing
of access policies for XML documents (<b>
                     <span style="font-size:85%">
                        <a href="#MurataXMLAccess" name="fromMurataXMLAccess">[MTKH03]</a>
                     </span>
                  </b>).</p>
               <p>More recently, Berstel and Boasson
<b>
                     <span style="font-size:85%">
                        <a href="#BBXMLGrammars" name="fromBBXMLGrammars">[BB00]</a>
                     </span>
                  </b>, <b>
                     <span style="font-size:85%">
                        <a href="#BBXMLFormalProperties" name="fromBBXMLFormalProperties">[BB02b]</a>
                     </span>
                  </b>, <b>
                     <span style="font-size:85%">
                        <a href="#BBBalancedGrammars" name="fromBBBalancedGrammars">[BB02a]</a>
                     </span>
                  </b>
have investigated formal properties and grammatical characterizations
of XML documents within the general framework 
of extended context-free grammars,
modeling XML documents as Dyck strings
and schemas as balanced grammars.
</p>
               <p>In this work, we establish the equivalence between hedge grammars
for regular hedge languages and balanced grammars for Dyck languages.
This approach unifies the two competing frameworks and makes results
that have been achieved in one framework applicable in a different setting.
</p>
               <p>As an alternative to hedge automata,
we propose a different operational model for validation
of hedges against grammars, namely <b>pushdown caterpillar automata (PCAs)</b>.
PCAs are sequential rather than parallel machines,
hence, their behavior is easier to understand
and to analyse than the behavior of hedge automata.
Furthermore, PCAs deal more homogeneously
with the vertical relationship between ancestors and descendants
and the horizontal relationship between siblings in a hedge.
Hedge automata, however, model the vertical relationship
in detail but hide computational aspects
that arise from the horizontal relationship.
</p>
               <p>The main intent of this paper is to clarify and expand
the conceptual foundations of XML research in a way
that is practically relevant and mathematically sound.
This paper is organized into four further sections:
In Section&#160;<a href="#SecStrings">&#8220;Dyck strings and balanced grammars&#8221;</a>,
we introduce Berstel and Boasson's conceptual framework
of Dyck strings and balanced grammars.
Section&#160;<a href="#SecHedges">&#8220;Hedges and balanced grammars&#8221;</a> builds on the one-to-one
correspondence between Dyck strings and hedges
and presents our view on parsing
that is specifically tailored to Dyck strings
and balanced grammars.
</p>
               <p>After the preparatory Section&#160;<a href="#SecHedges">&#8220;Hedges and balanced grammars&#8221;</a>,
the equivalence between balanced grammars and hedge grammars
is immediately obvious from the definition of hedge grammars
in Section&#160;<a href="#SecGrammars">&#8220;Hedges and hedge grammars&#8221;</a>.
</p>
               <p>In Section&#160;<a href="#SecCaterpillars">&#8220;Pushdown caterpillar automata&#8221;</a>,
we introduce pushdown caterpillar automata (PCAs).
We establish the essential properties of PCAs
that make them an appropriate model for schema validation,
drawing on previous results both for extended context-free grammars
and for hedge automata.
</p>
               <p>This paper is in draft form, providing only proof sketches.
In the full version we demonstrate
how our results apply to the validation problem
for a number of XML schema languages
and how they relate to the schema-languages taxonomy
of Murata, Lee and Mani (<b>
                     <span style="font-size:85%">
                        <a href="#MurataTaxonomyEML" name="fromMurataTaxonomyEML">[MLM00]</a>
                     </span>
                  </b>).
</p>
            </div>
            <div class="section">
               <h2>
                  <a name="SecStrings"/>Dyck strings and balanced grammars</h2>
               <p>Berstel and Boasson <b>
                     <span style="font-size:85%">
                        <a href="#BBXMLGrammars" name="fromBBXMLGrammars">[BB00]</a>
                     </span>
                  </b>, <b>
                     <span style="font-size:85%">
                        <a href="#BBXMLFormalProperties" name="fromBBXMLFormalProperties">[BB02b]</a>
                     </span>
                  </b>, <b>
                     <span style="font-size:85%">
                        <a href="#BBBalancedGrammars" name="fromBBBalancedGrammars">[BB02a]</a>
                     </span>
                  </b>
investigate formal properties and grammatical characterizations
of XML documents within the general framework
of extended context-free grammars,
modeling XML documents as Dyck strings
and schemas as balanced grammars.
</p>
               <p>Symbols in Dyck strings are called <b>brackets</b> that come in pairs:
Each <b>opening bracket</b>&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>a</mml:mi>
                     </mml:math>
                  </span>
from a finite alphabet&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>
has a corresponding <b>closing bracket</b>

                  <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>a</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span> from&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>,
a disjoint copy of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>.
A Dyck string must have a well-formed bracketed structure.
</p>
               <p>

                  <b>Definition</b>
We define the set of <b>Dyck strings</b>
over <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span> and&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>
inductively as follows:</p>
               <ol type="1">
                  <li>The empty string is a Dyck string and is represented by&#160;<span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>&#955;</mml:mi>
                        </mml:math>
                     </span>.
</li>
                  <li>If <span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>w</mml:mi>
                        </mml:math>
                     </span> is a Dyck string and <span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>a</mml:mi>
                           <mml:mo>&#8712;</mml:mo>
                           <mml:mi>&#931;</mml:mi>
                        </mml:math>
                     </span>,
then <span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>a</mml:mi>
                           <mml:mo>&#8290;</mml:mo>
                           <mml:mi>w</mml:mi>
                           <mml:mo>&#8290;</mml:mo>
                           <mml:mover>
                              <mml:mi>a</mml:mi>
                              <mml:mo>&#8213;</mml:mo>
                           </mml:mover>
                        </mml:math>
                     </span> is a Dyck string.
</li>
                  <li>If <span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>w</mml:mi>
                        </mml:math>
                     </span> and&#160;<span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:msup>
                              <mml:mi>w</mml:mi>
                              <mml:mo>&#8242;</mml:mo>
                           </mml:msup>
                        </mml:math>
                     </span> are Dyck strings,
then <span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>w</mml:mi>
                           <mml:mo>&#8290;</mml:mo>
                           <mml:msup>
                              <mml:mi>w</mml:mi>
                              <mml:mo>&#8242;</mml:mo>
                           </mml:msup>
                        </mml:math>
                     </span> is a Dyck string.
</li>
               </ol>
               <p>A Dyck string that is formed using the second inductive rule
is called a <b>Dyck prime</b>.
</p>
               <p>A <b>Dyck language</b> over <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span> and&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span> is a language
that consists solely of Dyck strings over <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span> and&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>.
</p>
               <p>We state without proof that each Dyck string can be
unambiguously factored into a sequence of Dyck primes.
</p>
               <p>Dyck primes form an abstraction of XML document instances
that disregards textual content and attributes,
views element names as symbols and maps element start tags
to symbols in&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span> and element end tags to symbols in&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>,
thus abstracting from the tag syntax.
The brackets in a Dyck prime correspond
to the sequence of start-element and end-element events
that a SAX-compliant XML processor generates
when reading an XML document instance.
In the same vein, general Dyck strings
correspond to sequences of elements
that occur as content of an element in a document instance.
</p>
               <p>

                  <b>Definition</b>
A <b>balanced grammar</b>&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span> over <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span> and&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>
is specified by a tuple of the form <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mfenced>
                           <mml:mi>N</mml:mi>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mover>
                              <mml:mi>&#931;</mml:mi>
                              <mml:mo>&#8213;</mml:mo>
                           </mml:mover>
                           <mml:mi>P</mml:mi>
                           <mml:mi>I</mml:mi>
                        </mml:mfenced>
                     </mml:math>
                  </span>,
where</p>
               <ol type="1">
                  <li>
                     <span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>N</mml:mi>
                        </mml:math>
                     </span> is a nonterminal alphabet.
</li>
                  <li>
                     <span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>&#931;</mml:mi>
                           <mml:mo>&#8746;</mml:mo>
                           <mml:mover>
                              <mml:mi>&#931;</mml:mi>
                              <mml:mo>&#8213;</mml:mo>
                           </mml:mover>
                        </mml:math>
                     </span> is a terminal alphabet disjoint from&#160;<span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>N</mml:mi>
                        </mml:math>
                     </span>,
      with <span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mover>
                              <mml:mi>&#931;</mml:mi>
                              <mml:mo>&#8213;</mml:mo>
                           </mml:mover>
                        </mml:math>
                     </span> being a disjoint copy of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>&#931;</mml:mi>
                        </mml:math>
                     </span>.
</li>
                  <li>
                     <span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>P</mml:mi>
                        </mml:math>
                     </span> is a system of <b>production schemas</b>
      
                     <span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>X</mml:mi>
                           <mml:mo>&#8658;</mml:mo> 
                           <mml:msub>
                              <mml:mi fontstyle="normal">L</mml:mi>
                              <mml:mi>X</mml:mi>
                           </mml:msub>
                        </mml:math>
                     </span>
      (<span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>X</mml:mi>
                           <mml:mo>&#8712;</mml:mo> 
                           <mml:mi>N</mml:mi>
                        </mml:math>
                     </span>)
      such that <span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:msub>
                              <mml:mi fontstyle="normal">L</mml:mi>
                              <mml:mi>X</mml:mi>
                           </mml:msub>
                        </mml:math>
                     </span> is the union of languages
      <span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>a</mml:mi> 
                           <mml:msub>
                              <mml:mi fontstyle="normal">L</mml:mi>
                              <mml:mrow>
                                 <mml:mi>X</mml:mi>
                                 <mml:mo>,</mml:mo>
                                 <mml:mi>a</mml:mi>
                              </mml:mrow>
                           </mml:msub>
                           <mml:mover>
                              <mml:mi>a</mml:mi>
                              <mml:mo>&#8213;</mml:mo>
                           </mml:mover>
                        </mml:math>
                     </span>
      (<span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>a</mml:mi>
                           <mml:mo>&#8712;</mml:mo>
                           <mml:mi>&#931;</mml:mi>
                        </mml:math>
                     </span>),
      each <span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:msub>
                              <mml:mi fontstyle="normal">L</mml:mi>
                              <mml:mrow>
                                 <mml:mi>X</mml:mi>
                                 <mml:mo>,</mml:mo>
                                 <mml:mi>a</mml:mi>
                              </mml:mrow>
                           </mml:msub>
                        </mml:math>
                     </span>
      in turn being a regular language 
      over the alphabet&#160;<span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>N</mml:mi>
                        </mml:math>
                     </span>.
</li>
                  <li>
                     <span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>I</mml:mi>
                        </mml:math>
                     </span> is the set of start strings and forms a regular language
      over the alphabet <span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>N</mml:mi>
                        </mml:math>
                     </span>.
</li>
               </ol>
               <p>Given a production schema <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>X</mml:mi>
                        <mml:mo>&#8658;</mml:mo> 
                        <mml:msub>
                           <mml:mi fontstyle="normal">L</mml:mi>
                           <mml:mi>X</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>
and a string <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>x</mml:mi>
                     </mml:math>
                  </span> in <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi fontstyle="normal">L</mml:mi>
                           <mml:mi>X</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>, we say that
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>X</mml:mi>
                        <mml:mo>&#8658;</mml:mo> 
                        <mml:mi>x</mml:mi>
                     </mml:math>
                  </span> is a <b>production</b>
of <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span>.
We call <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi fontstyle="normal">L</mml:mi>
                           <mml:mi>X</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span> the <b>rhs-language</b>
of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>X</mml:mi>
                     </mml:math>
                  </span>.
</p>
               <p>Balanced grammars are extended context-free grammars
such that each production derives a string of nonterminals,
surrounded by a pair of matching terminal brackets from <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span> and&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>.
Hence, the language <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi fontstyle="normal">L</mml:mi>
                        <mml:mfenced>
                           <mml:mi>G</mml:mi>
                        </mml:mfenced>
                     </mml:math>
                  </span>
of strings over <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                        <mml:mo>&#8746;</mml:mo>
                        <mml:mover>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>
that a balanced grammar derives from any of its start strings
is a Dyck language.
</p>
               <p>The language of <i>all</i> Dyck strings over <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>
and&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>
is a balanced language; that is, it is generated by some
balanced grammar over <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span> and&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>.
More precisely, if <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                        <mml:mo>=</mml:mo>
                        <mml:mfenced open="{" close="}">
                           <mml:mrow>
                              <mml:msub>
                                 <mml:mi>a</mml:mi>
                                 <mml:mn>1</mml:mn>
                              </mml:msub>
                              <mml:mo>,</mml:mo>
                              <mml:mi>&#8230;</mml:mi>
                              <mml:mo>,</mml:mo>
                              <mml:msub>
                                 <mml:mi>a</mml:mi>
                                 <mml:mi>n</mml:mi>
                              </mml:msub>
                           </mml:mrow>
                        </mml:mfenced>
                     </mml:math>
                  </span>,
we introduce distinct symbols
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mrow>
                           <mml:msub>
                              <mml:mi>X</mml:mi>
                              <mml:msub>
                                 <mml:mi>a</mml:mi>
                                 <mml:mn>1</mml:mn>
                              </mml:msub>
                           </mml:msub>
                           <mml:mo>,</mml:mo>
                           <mml:mi>&#8230;</mml:mi>
                           <mml:mo>,</mml:mo>
                           <mml:msub>
                              <mml:mi>X</mml:mi>
                              <mml:msub>
                                 <mml:mi>a</mml:mi>
                                 <mml:mi>n</mml:mi>
                              </mml:msub>
                           </mml:msub>
                        </mml:mrow>
                     </mml:math>
                  </span>
as nonterminals for the balanced grammar <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>G</mml:mi>
                           <mml:mi>D</mml:mi>
                        </mml:msub>
                        <mml:mfenced>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mover>
                              <mml:mi>&#931;</mml:mi>
                              <mml:mo>&#8213;</mml:mo>
                           </mml:mover>
                        </mml:mfenced>
                     </mml:math>
                  </span>
and define the production schemas
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math display="block" overflow="scroll">

                        <mml:mrow>

                           <mml:msub>
                              <mml:mi>X</mml:mi>
                              <mml:msub>
                                 <mml:mi>a</mml:mi>
                                 <mml:mi>i</mml:mi>
                              </mml:msub>
                           </mml:msub>
                           <mml:mo>&#8658;</mml:mo> 
                           <mml:msub>
                              <mml:mi>a</mml:mi>
                              <mml:mi>i</mml:mi>
                           </mml:msub>
                           <mml:mo>&#8290;</mml:mo>

                           <mml:msup>
                              <mml:mfenced>
                                 <mml:mrow>
                                    <mml:msub>
                                       <mml:mi>X</mml:mi>
                                       <mml:msub>
                                          <mml:mi>a</mml:mi>
                                          <mml:mn>1</mml:mn>
                                       </mml:msub>
                                    </mml:msub> 
                                    <mml:mo>|</mml:mo> 
                                    <mml:mi>&#8230;</mml:mi> 
                                    <mml:mo>|</mml:mo>

                                    <mml:msub>
                                       <mml:mi>X</mml:mi>
                                       <mml:msub>
                                          <mml:mi>a</mml:mi>
                                          <mml:mi>n</mml:mi>
                                       </mml:msub>
                                    </mml:msub>
                                 </mml:mrow>
                              </mml:mfenced>
                              <mml:mo>&#9734;</mml:mo>
                           </mml:msup>

                           <mml:mo>&#8290;</mml:mo>
                           <mml:msub>
                              <mml:mover>
                                 <mml:mi>a</mml:mi>
                                 <mml:mo>&#8213;</mml:mo>
                              </mml:mover>
                              <mml:mi>i</mml:mi>
                           </mml:msub>

                           <mml:mtext>&#8195;&#8195;</mml:mtext> 
                           <mml:mfenced>
                              <mml:mrow>
                                 <mml:mn>1</mml:mn>
                                 <mml:mo>&#8804;</mml:mo> 
                                 <mml:mi>i</mml:mi>
                                 <mml:mo>&lt;</mml:mo>
                                 <mml:mi>n</mml:mi>
                              </mml:mrow>
                           </mml:mfenced>
                           <mml:mtext>.</mml:mtext>

                        </mml:mrow>

                     </mml:math>
                  </span>
Finally, we define the language
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msup>
                           <mml:mfenced>
                              <mml:msub>
                                 <mml:mi>X</mml:mi>
                                 <mml:msub>
                                    <mml:mi>a</mml:mi>
                                    <mml:mn>1</mml:mn>
                                 </mml:msub>
                              </mml:msub>
                              <mml:mo>|</mml:mo>
                              <mml:mi>&#8230;</mml:mi>
                              <mml:mo>|</mml:mo>
                              <mml:msub>
                                 <mml:mi>X</mml:mi>
                                 <mml:msub>
                                    <mml:mi>a</mml:mi>
                                    <mml:mi>n</mml:mi>
                                 </mml:msub>
                              </mml:msub>
                           </mml:mfenced>
                           <mml:mo>&#9734;</mml:mo>
                        </mml:msup>
                     </mml:math>
                  </span>
as the set of start sequences for <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>G</mml:mi>
                           <mml:mi>D</mml:mi>
                        </mml:msub>
                        <mml:mfenced>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mover>
                              <mml:mi>&#931;</mml:mi>
                              <mml:mo>&#8213;</mml:mo>
                           </mml:mover>
                        </mml:mfenced>
                     </mml:math>
                  </span>.
Obviously, <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>G</mml:mi>
                           <mml:mi>D</mml:mi>
                        </mml:msub>
                        <mml:mfenced>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mover>
                              <mml:mi>&#931;</mml:mi>
                              <mml:mo>&#8213;</mml:mo>
                           </mml:mover>
                        </mml:mfenced>
                     </mml:math>
                  </span>
derives from its start strings
exactly the Dyck strings over <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span> and&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>.
</p>
               <p>Following Berstel and Boasson <b>
                     <span style="font-size:85%">
                        <a href="#BBBalancedGrammars" name="fromBBBalancedGrammars">[BB02a]</a>
                     </span>
                  </b>,
we view bracket names as colors.
Hence, a production <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>X</mml:mi>
                        <mml:mo>&#8658;</mml:mo> 
                        <mml:mi>a</mml:mi>
                        <mml:mo>&#8290;</mml:mo>
                        <mml:mi>x</mml:mi>
                        <mml:mo>&#8290;</mml:mo>
                        <mml:mover>
                           <mml:mi>a</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>
of a balanced grammar&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span> is colored&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>a</mml:mi>
                     </mml:math>
                  </span>.
We can rewrite a balanced grammar
such that all the productions of each nonterminal&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>X</mml:mi>
                     </mml:math>
                  </span>
are uniformly colored; that is,
each production schema of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span> has the form
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>X</mml:mi>
                        <mml:mo>&#8658;</mml:mo> 
                        <mml:msub>
                           <mml:mi>a</mml:mi>
                           <mml:mi>X</mml:mi>
                        </mml:msub>
                        <mml:mo>&#8290;</mml:mo>
                        <mml:msub>
                           <mml:mi fontstyle="normal">L</mml:mi>
                           <mml:mi>X</mml:mi>
                        </mml:msub>
                        <mml:mo>&#8290;</mml:mo>
                        <mml:msub>
                           <mml:mover>
                              <mml:mi>a</mml:mi>
                              <mml:mo>&#8213;</mml:mo>
                           </mml:mover>
                           <mml:mi>X</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>
with an opening bracket&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>a</mml:mi>
                           <mml:mi>X</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>,
the corresponding closing bracket&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mover>
                              <mml:mi>a</mml:mi>
                              <mml:mo>&#8213;</mml:mo>
                           </mml:mover>
                           <mml:mi>X</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>
and a regular language <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi fontstyle="normal">L</mml:mi>
                           <mml:mi>X</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span> over the alphabet of nonterminals.
Then we call <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>a</mml:mi>
                           <mml:mi>X</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>
the color of the nonterminal&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>X</mml:mi>
                     </mml:math>
                  </span>.
</p>
               <p>The uniform coloring of a nonterminal&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>X</mml:mi>
                     </mml:math>
                  </span>
with production schema <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>X</mml:mi>
                        <mml:mo>&#8658;</mml:mo>
                        <mml:msub>
                           <mml:mi fontstyle="normal">L</mml:mi>
                           <mml:mi>X</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>,
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi fontstyle="normal">L</mml:mi>
                           <mml:mi>X</mml:mi>
                        </mml:msub>
                        <mml:mo>=</mml:mo>
                        <mml:mo>&#8899;</mml:mo> 
                        <mml:mi>a</mml:mi>
                        <mml:mo>&#8290;</mml:mo>
                        <mml:msub>
                           <mml:mi fontstyle="normal">L</mml:mi>
                           <mml:mrow>
                              <mml:mi>X</mml:mi>
                              <mml:mo>,</mml:mo>
                              <mml:mi>a</mml:mi>
                           </mml:mrow>
                        </mml:msub>
                        <mml:mo>&#8290;</mml:mo>
                        <mml:mover>
                           <mml:mi>a</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>
can be achieved by replacing <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>X</mml:mi>
                     </mml:math>
                  </span>
with alternative nonterminals&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>X</mml:mi>
                           <mml:mi>a</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>
(<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>a</mml:mi>
                        <mml:mo>&#8712;</mml:mo>
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>)
and by using the new, uniformly colored production schemas
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>X</mml:mi>
                           <mml:mi>a</mml:mi>
                        </mml:msub>
                        <mml:mo>&#8658;</mml:mo> 
                        <mml:mi>a</mml:mi>
                        <mml:mo>&#8290;</mml:mo>
                        <mml:msub>
                           <mml:mi fontstyle="normal">L</mml:mi>
                           <mml:mrow>
                              <mml:mi>X</mml:mi>
                              <mml:mo>,</mml:mo>
                              <mml:mi>a</mml:mi>
                           </mml:mrow>
                        </mml:msub>
                        <mml:mo>&#8290;</mml:mo>
                        <mml:mover>
                           <mml:mi>a</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>.
</p>
               <p>In this paper, we do not require nonterminals of balanced grammars
to be uniformly colored.
However, by applying normal-form algorithms for extended
context-free grammars (<b>
                     <span style="font-size:85%">
                        <a href="#AlbertGWNormalFormsTCS" name="fromAlbertGWNormalFormsTCS">[AGW01]</a>
                     </span>
                  </b>)
(which preserve the balanced property of grammars)
we ensure that grammars are always reduced;
that is, each nonterminal can be reached
from some start string of the grammar
and can itself derive some terminal string.
</p>
            </div>
            <div class="section">
               <h2>
                  <a name="SecHedges"/>Hedges and balanced grammars</h2>
               <p>The XML community usually considers trees and hedges
(that is, sequences of trees)
as a model for XML document instances
and for the contents of elements.
Trees and hedges are higher-level abstractions
than are Dyck primes and Dyck strings;
they are exposed by DOM-compliant XML processors in object form.
</p>
               <p>In this section, we examine the close relationship
between Dyck strings and hedges.
We leverage the relationship to devise a two-phase architecture
for the parsing of balanced languages.
</p>
               <p>

                  <b>Definition</b>
A <b>hedge</b> over&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span> is an ordered, directed and acyclic graph,
whose nodes have in-degree of at most&#160;1 and hold labels from&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>.
</p>
               <p>We call the nodes of in-degree zero the <b>roots</b>
of the hedge graph and we call the nodes of out-degree zero
its <b>leaves</b>. If there is an edge from node&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#957;</mml:mi>
                     </mml:math>
                  </span>
to node&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msup>
                           <mml:mi>&#957;</mml:mi>
                           <mml:mo>&#8242;</mml:mo>
                        </mml:msup>
                     </mml:math>
                  </span> in the graph,
then <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#957;</mml:mi>
                     </mml:math>
                  </span> is the <b>parent</b>
of <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msup>
                           <mml:mi>&#957;</mml:mi>
                           <mml:mo>&#8242;</mml:mo>
                        </mml:msup>
                     </mml:math>
                  </span>
and <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msup>
                           <mml:mi>&#957;</mml:mi>
                           <mml:mo>&#8242;</mml:mo>
                        </mml:msup>
                     </mml:math>
                  </span> is a <b>child</b>
of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#957;</mml:mi>
                     </mml:math>
                  </span>.
Any pair of distinct roots and any pair of distinct nodes
that share a parent are in the <b>sibling</b> relationship.
</p>
               <p>Any sequence
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>&#957;</mml:mi>
                           <mml:mn>1</mml:mn>
                        </mml:msub>
                        <mml:mi>&#8230;</mml:mi>
                        <mml:msub>
                           <mml:mi>&#957;</mml:mi>
                           <mml:mi>n</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>,
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>n</mml:mi>
                        <mml:mo>&#8805;</mml:mo>
                        <mml:mn>1</mml:mn>
                     </mml:math>
                  </span>, of nodes such that
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>&#957;</mml:mi>
                           <mml:mi>i</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span> is a parent of
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>&#957;</mml:mi>
                           <mml:mrow>
                              <mml:mi>i</mml:mi>
                              <mml:mo>+</mml:mo>
                              <mml:mn>1</mml:mn>
                           </mml:mrow>
                        </mml:msub>
                     </mml:math>
                  </span>,
for each&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>i</mml:mi>
                     </mml:math>
                  </span>,
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mrow>
                           <mml:mn>1</mml:mn>
                           <mml:mo>&#8804;</mml:mo>
                           <mml:mi>i</mml:mi>
                           <mml:mo>&lt;</mml:mo>
                           <mml:mi>n</mml:mi>
                        </mml:mrow>
                     </mml:math>
                  </span>,
is called a <b>path</b> from
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>&#957;</mml:mi>
                           <mml:mn>1</mml:mn>
                        </mml:msub>
                     </mml:math>
                  </span> to&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>&#957;</mml:mi>
                           <mml:mi>n</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>.
</p>
               <p>A <b>tree</b> is a hedge that has exactly one root.
</p>
               <p>There is an obvious one-to-one correspondence
between hedges over&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span> and Dyck strings over
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span> and&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>:
</p>
               <p>Starting with a hedge&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>h</mml:mi>
                     </mml:math>
                  </span> over&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>,
for each node of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>h</mml:mi>
                     </mml:math>
                  </span> we remove its label&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>a</mml:mi>
                     </mml:math>
                  </span>,
leaving the node unlabeled, and add two new child nodes,
one with label&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>a</mml:mi>
                     </mml:math>
                  </span> at the front and one with label&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>a</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>
at the back of its original child sequence.
The result is a hedge whose internal nodes have no labels
but whose leaf labels yield the Dyck string that corresponds to&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>h</mml:mi>
                     </mml:math>
                  </span>.
The Dyck string is a sequential representation
of the original hedge that uses named brackets
to represent the label and the span of a node in the hedge.
</p>
               <p>Conversely, starting with a Dyck string&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>w</mml:mi>
                     </mml:math>
                  </span>,
we factor it into a sequence
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>w</mml:mi>
                           <mml:mn>1</mml:mn>
                        </mml:msub>
                        <mml:mi>&#8230;</mml:mi>
                        <mml:msub>
                           <mml:mi>w</mml:mi>
                           <mml:mi>n</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span> of Dyck primes.
Each <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>w</mml:mi>
                           <mml:mi>i</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span> has the form
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>a</mml:mi>
                           <mml:mi>i</mml:mi>
                        </mml:msub>
                        <mml:mo>&#8290;</mml:mo>
                        <mml:msubsup>
                           <mml:mi>w</mml:mi>
                           <mml:mi>i</mml:mi>
                           <mml:mo>&#8242;</mml:mo>
                        </mml:msubsup>
                        <mml:mo>&#8290;</mml:mo>
                        <mml:msub>
                           <mml:mover>
                              <mml:mi>a</mml:mi>
                              <mml:mo>&#8213;</mml:mo>
                           </mml:mover>
                           <mml:mi>i</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>
with <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msubsup>
                           <mml:mi>w</mml:mi>
                           <mml:mi>i</mml:mi>
                           <mml:mo>&#8242;</mml:mo>
                        </mml:msubsup>
                     </mml:math>
                  </span> being another Dyck string.
We build a hedge with root nodes <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>&#957;</mml:mi>
                           <mml:mn>1</mml:mn>
                        </mml:msub>
                        <mml:mo>,</mml:mo>
                        <mml:mi>&#8230;</mml:mi>
                        <mml:mo>,</mml:mo>
                        <mml:msub>
                           <mml:mi>&#957;</mml:mi>
                           <mml:mi>n</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>,
label each <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>&#957;</mml:mi>
                           <mml:mi>i</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>
with&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>a</mml:mi>
                           <mml:mi>i</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span> and add the roots of the hedge
that correspond to <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msubsup>
                           <mml:mi>w</mml:mi>
                           <mml:mi>i</mml:mi>
                           <mml:mo>&#8242;</mml:mo>
                        </mml:msubsup>
                     </mml:math>
                  </span>
as children of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>&#957;</mml:mi>
                           <mml:mi>i</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>.
The result is the hedge graph that corresponds to&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>w</mml:mi>
                     </mml:math>
                  </span>.
</p>
               <p>The two conversion processes from hedge to Dyck string
and Dyck string to hedge reverse each other
and convert trees into Dyck primes and Dyck primes into trees.
</p>
               <p>

                  <b>Definition</b>
We call the hedge over&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>
that corresponds to a Dyck string over <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span> and&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>
the Dyck string's <b>generic-derivation hedge</b>.
We call the Dyck string over <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span> and&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>
that corresponds to a hedge over&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>
the hedge's <b>sequential form</b>.
</p>
               <p>

                  <b>Proposition</b>

                  <i>
We can compute a Dyck string's generic-derivation hedge
in linear time, doing a one-pass sweep of the Dyck string.
We can compute a hedge's sequential form in linear time,
doing a depth-first traversal of the Dyck string.
</i>
               </p>
               <p>

                  <b>Proof</b>
Firstly, we do not construct the generic-derivation hedge for the given
Dyck string itself,
but rather we construct a tree that adds a single, unlabeled node
as a joint parent for all the hedge's roots.
We construct this tree incrementally,
during a single left-to-right sweep of the Dyck string,
always pointing to some node of the tree as the current node.
</p>
               <p>We start with a single, unlabeled node,
the root of the tree we wish to construct,
and point to it as the current node.
For each opening bracket <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>a</mml:mi>
                     </mml:math>
                  </span> in&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span> that we read from the Dyck string,
we add a new node that we label with&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>a</mml:mi>
                     </mml:math>
                  </span> as the rightmost child
of the current node
and make this new node the current node.
For each closing bracket <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>a</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span> in&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>
that we encounter in the string,
we move the current-node pointer one level up.
The Dyck property ensures that we never move the current-node pointer
off the tree
and that we end up at the node where we started from,
having constructed the generic-derivation hedge
hanging from our start node.
</p>
               <p>Secondly, given a hedge over&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>,
we do a depth-first traversal of the hedge,
visiting each node twice,
once on the way down, before visiting any of its children,
and once more on the way up,
after having visited all its children.
During the first visit of a node with label&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>a</mml:mi>
                     </mml:math>
                  </span>
we output the opening bracket&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>a</mml:mi>
                     </mml:math>
                  </span>;
during the second visit of the same node
we output the corresponding closing bracket&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>a</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>.
</p>
               <p>Any sequence of derivation steps that a balanced grammar takes
to derive some Dyck string
can be mapped to the generic-derivation hedge of that Dyck string.
Hence, any derivation structure of a Dyck string,
independently of the balanced grammar that derives the string,
is structurally equivalent to the generic-derivation hedge.
This is the reason that we have called it ``generic''.
</p>
               <p>If we are given a balanced grammar and a Dyck string
and wish to test whether the grammar derives the string,
we need to find nonterminal annotations
for the nodes of the string's generic-derivation tree
that witness a derivation of the string:
</p>
               <p>

                  <b>Definition</b>
Given a Dyck string&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>w</mml:mi>
                     </mml:math>
                  </span>, its generic-derivation hedge&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>h</mml:mi>
                     </mml:math>
                  </span>
and a balanced grammar <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span>,
we wish to associate a nonterminal of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span> as a type annotation
with each node of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>h</mml:mi>
                     </mml:math>
                  </span>
in a way that is conformant to <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span>'s productions.
More precisely, if a node carries a label <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>a</mml:mi>
                     </mml:math>
                  </span> in&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>
and a nonterminal type annotation <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>X</mml:mi>
                     </mml:math>
                  </span>,
then its children may carry any sequence of type annotations
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>X</mml:mi>
                           <mml:mn>1</mml:mn>
                        </mml:msub>
                        <mml:mo>&#8290;</mml:mo>
                        <mml:mi>&#8230;</mml:mi>
                        <mml:mo>&#8290;</mml:mo>
                        <mml:msub>
                           <mml:mi>X</mml:mi>
                           <mml:mi>n</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>
such that <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>X</mml:mi>
                        <mml:mo>&#8658;</mml:mo> 
                        <mml:mi>a</mml:mi>
                        <mml:mo>&#8290;</mml:mo>
                        <mml:msub>
                           <mml:mi>X</mml:mi>
                           <mml:mn>1</mml:mn>
                        </mml:msub>
                        <mml:mi>&#8230;</mml:mi>
                        <mml:msub>
                           <mml:mi>X</mml:mi>
                           <mml:mi>n</mml:mi>
                        </mml:msub>
                        <mml:mo>&#8290;</mml:mo>
                        <mml:mover>
                           <mml:mi>a</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>
is a production of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span>.
Furthermore,
the roots of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>h</mml:mi>
                     </mml:math>
                  </span> must carry, in sequence, some string
of type annotations
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>X</mml:mi>
                           <mml:mn>1</mml:mn>
                        </mml:msub>
                        <mml:mi>&#8230;</mml:mi>
                        <mml:msub>
                           <mml:mi>X</mml:mi>
                           <mml:mi>n</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>
that is a start sequence of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span>.
We call such an annotation of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>h</mml:mi>
                     </mml:math>
                  </span>
a <b>grammar-conformant type annotation</b>. 
</p>
               <p>We consider once more the balanced grammar
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>G</mml:mi>
                           <mml:mi>D</mml:mi>
                        </mml:msub>
                        <mml:mfenced>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mover>
                              <mml:mi>&#931;</mml:mi>
                              <mml:mo>&#8213;</mml:mo>
                           </mml:mover>
                        </mml:mfenced>
                     </mml:math>
                  </span>
that generates the set of all Dyck strings
over <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span> and&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mover>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span>.
If we annotate, for any hedge <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>h</mml:mi>
                     </mml:math>
                  </span>
over&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>,
each node that carries label <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>a</mml:mi>
                     </mml:math>
                  </span>
from&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>
with the nonterminal type <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>X</mml:mi>
                           <mml:mi>a</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>
from <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>G</mml:mi>
                           <mml:mi>D</mml:mi>
                        </mml:msub>
                        <mml:mfenced>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mover>
                              <mml:mi>&#931;</mml:mi>
                              <mml:mo>&#8213;</mml:mo>
                           </mml:mover>
                        </mml:mfenced>
                     </mml:math>
                  </span>,
the result is a grammar-conformant type annotation of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>h</mml:mi>
                     </mml:math>
                  </span>.
</p>
               <p>

                  <b>Proposition</b>

                  <i>
A balanced grammar generates exactly those Dyck strings
whose generic-derivation hedges can be annotated with type information
that conforms to the grammar.
</i>
               </p>
               <p>Proposition&#160;<a href="#PropHedgeTyping">
Proposition

A balanced grammar generates exactly those Dyck strings
whose generic-derivation hedges can be annotated with type information
that conforms to the grammar.
</a> implies
that the parsing of a Dyck string with respect to a balanced grammar
can be split into two phases: namely, construct
the generic-derivation hedge (which requires linear time,
as we have seen) and then find a grammar-conformant
type annotation for it.
</p>
               <p>The classical theory of formal languages abounds with results
about which classes of context-free grammars lead to efficient
parsing algorithms.
For the area of <i>extended</i> context-free grammars,
the authors have recently described the grammars
that are amenable to top-down parsing
with 1-symbol look-ahead (<b>
                     <span style="font-size:85%">
                        <a href="#BKWoodCIAA2002" name="fromBKWoodCIAA2002">[BKW03a]</a>
                     </span>
                  </b>, <b>
                     <span style="font-size:85%">
                        <a href="#BKWoodOttmann2003" name="fromBKWoodOttmann2003">[BKW03b]</a>
                     </span>
                  </b>).
In Section&#160;<a href="#SecCaterpillars">&#8220;Pushdown caterpillar automata&#8221;</a> we discuss
how these results apply to balanced grammars.
</p>
               <p>We summarize our view of parsing with respect to balanced languages
with the diagram in Figure&#160;<a href="#FigParsing">1</a>.
</p>
               <div class="figure">
                  <a name="FigParsing"/>
                  <h5>Figure 1: Two-phase architecture for parsing balanced languages.</h5>
                  <img src="parsing.png" border="0"/>
                  <h5>[Link to <a href="parsing.png" target="parsing.png">open this graphic in a separate page</a>]</h5>
               </div>
            </div>
            <div class="section">
               <h2>
                  <a name="SecGrammars"/>Hedges and hedge grammars</h2>
               <p>Since as early as 1991, Murata has been building
on the theory of regular tree and hedge languages
as the foundation of research into schema, query
and transformation languages
for structured documents and XML <b>
                     <span style="font-size:85%">
                        <a href="#MurataHedgeManuscript" name="fromMurataHedgeManuscript">[Mur00]</a>
                     </span>
                  </b>.
</p>
               <p>There are a number of---equivalent---mechanisms
that can be employed to define regularity of hedge languages;
that is, sets of hedges.
As with <i>regular</i> string languages,
several types of automata turn out to be equivalent
with respect to the languages
they recognize (<b>
                     <span style="font-size:85%">
                        <a href="#GecsegSteinbyTAs" name="fromGecsegSteinbyTAs">[GS84]</a>
                     </span>
                  </b>, <b>
                     <span style="font-size:85%">
                        <a href="#TataOnline" name="fromTataOnline">[CDG+98]</a>
                     </span>
                  </b>, <b>
                     <span style="font-size:85%">
                        <a href="#BKMWTreeAutomataTR1" name="fromBKMWTreeAutomataTR1">[BKMW01]</a>
                     </span>
                  </b>).
Lately, following Murata's lead (<b>
                     <span style="font-size:85%">
                        <a href="#MurataTaxonomyEML" name="fromMurataTaxonomyEML">[MLM00]</a>
                     </span>
                  </b>, <b>
                     <span style="font-size:85%">
                        <a href="#MurataSchemasTR" name="fromMurataSchemasTR">[LMM00]</a>
                     </span>
                  </b>),
the XML community has favored tree grammars
as the mechanism of choice
for the definition of regular hedge languages,
since they can be most easily turned into a schema language for XML,
as exemplified by Relax&#160;NG (<b>
                     <span style="font-size:85%">
                        <a href="#RelaxOasis" name="fromRelaxOasis">[CM01]</a>
                     </span>
                  </b>).
</p>
               <p>In this section, building on the insights of Section&#160;<a href="#SecHedges">&#8220;Hedges and balanced grammars&#8221;</a>,
we argue that hedge grammars are effectively
identical to balanced grammars and that balanced languages
are identical to regular hedge languages modulo encoding.
As an application, as we will demonstrate in the full version
of this paper, Berstel and Boasson's results
on codeterministic and minimal balanced grammars (<b>
                     <span style="font-size:85%">
                        <a href="#BBBalancedGrammars" name="fromBBBalancedGrammars">[BB02a]</a>
                     </span>
                  </b>)
turn out to be corollaries of well-known theorems on hedge automata.
</p>
               <p>

                  <b>Definition</b>
A <b>hedge grammar</b>&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span>
over the alphabet&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>
is specified by a tuple <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mfenced>
                           <mml:mi>N</mml:mi>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mi>P</mml:mi>
                           <mml:mi>I</mml:mi>
                        </mml:mfenced>
                     </mml:math>
                  </span>
where <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>N</mml:mi>
                     </mml:math>
                  </span> is a finite set that is disjoint from&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>,
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>P</mml:mi>
                     </mml:math>
                  </span> is a subset
of <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>N</mml:mi>
                        <mml:mo>&#10007;</mml:mo>
                        <mml:mi>&#931;</mml:mi>
                        <mml:mo>&#10007;</mml:mo>
                        <mml:msup>
                           <mml:mi>N</mml:mi>
                           <mml:mo>&#9734;</mml:mo>
                        </mml:msup>
                     </mml:math>
                  </span> such that
for each <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>X</mml:mi>
                     </mml:math>
                  </span> in&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>N</mml:mi>
                     </mml:math>
                  </span>
and each <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>a</mml:mi>
                     </mml:math>
                  </span> in&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>
the set <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mfenced open="{" close="}">
                           <mml:mrow>
                              <mml:mi>x</mml:mi> 
                              <mml:mo>|</mml:mo>
                              <mml:mfenced>
                                 <mml:mi>X</mml:mi>
                                 <mml:mi>a</mml:mi>
                                 <mml:mi>x</mml:mi>
                              </mml:mfenced>
                              <mml:mo>&#8712;</mml:mo>
                              <mml:mi>P</mml:mi>
                           </mml:mrow>
                        </mml:mfenced>
                     </mml:math>
                  </span> is string regular,
and where <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>I</mml:mi>
                     </mml:math>
                  </span> is a regular subset
of <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msup>
                           <mml:mi>N</mml:mi>
                           <mml:mo>&#9734;</mml:mo>
                        </mml:msup>
                     </mml:math>
                  </span>.
We call <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>N</mml:mi>
                     </mml:math>
                  </span>
the set of nonterminals of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span>,
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>P</mml:mi>
                     </mml:math>
                  </span>
the set of productions and&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>I</mml:mi>
                     </mml:math>
                  </span> the set of start strings.
A <b>tree grammar</b> is a hedge grammar where each start string
has length&#160;1.
</p>
               <p>We can rewrite the set&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>P</mml:mi>
                     </mml:math>
                  </span> of productions
of a hedge grammar <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                        <mml:mo>=</mml:mo>
                        <mml:mfenced>
                           <mml:mi>N</mml:mi>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mi>P</mml:mi>
                           <mml:mi>I</mml:mi>
                        </mml:mfenced>
                     </mml:math>
                  </span>
as a set of production schemas <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>X</mml:mi>
                        <mml:mo>&#8658;</mml:mo>
                        <mml:msub>
                           <mml:mi>L</mml:mi>
                           <mml:mi>X</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>
(<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>X</mml:mi>
                        <mml:mo>&#8712;</mml:mo> 
                        <mml:mi>N</mml:mi>
                     </mml:math>
                  </span>)
such that <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>L</mml:mi>
                           <mml:mi>X</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span> is the union of sets
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mfenced open="{" close="}">
                           <mml:mrow>
                              <mml:mi>a</mml:mi>
                           </mml:mrow>
                        </mml:mfenced>
                        <mml:mo>&#10007;</mml:mo>
                        <mml:msub>
                           <mml:mi>L</mml:mi>
                           <mml:mrow>
                              <mml:mi>X</mml:mi>
                              <mml:mo>,</mml:mo>
                              <mml:mi>a</mml:mi>
                           </mml:mrow>
                        </mml:msub>
                     </mml:math>
                  </span> to <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>a</mml:mi> 
                        <mml:msub>
                           <mml:mi>L</mml:mi>
                           <mml:mrow>
                              <mml:mi>X</mml:mi>
                              <mml:mo>,</mml:mo>
                              <mml:mi>a</mml:mi>
                           </mml:mrow>
                        </mml:msub> 
                        <mml:mover>
                           <mml:mi>a</mml:mi>
                           <mml:mo>&#8213;</mml:mo>
                        </mml:mover>
                     </mml:math>
                  </span> and vice versa.
</p>
               <p>

                  <b>Definition</b>
A hedge over&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span> is <b>valid</b> with respect to a hedge grammar over&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>
if and only if the hedge admits a grammar-conformant type annotation.
The <b>language</b> 
                  <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi fontstyle="normal">L</mml:mi>
                        <mml:mfenced>
                           <mml:mi>G</mml:mi>
                        </mml:mfenced>
                     </mml:math>
                  </span> of a hedge grammar&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span>
is the set of all hedges that are valid with respect to&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span>.
</p>
               <p>Let <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                        <mml:mo>=</mml:mo>
                        <mml:mfenced>
                           <mml:mi>N</mml:mi>
                           <mml:mi>&#931;</mml:mi>
                           <mml:mi>P</mml:mi>
                           <mml:mi>I</mml:mi>
                        </mml:mfenced>
                     </mml:math>
                  </span> be a hedge grammar over&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>.
If we call the nonterminals of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span> 
                  <b>states</b>,
then the grammar&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span> becomes a nondeterministic
top-down hedge automaton (<b>
                     <span style="font-size:85%">
                        <a href="#BKMWTreeAutomataTR1" name="fromBKMWTreeAutomataTR1">[BKMW01]</a>
                     </span>
                  </b>)
and each grammar-conformant type annotation of a hedge&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>h</mml:mi>
                     </mml:math>
                  </span>
becomes a computation of the tree automaton
that recognizes the hedge.
Hence, the hedges that are valid with respect to&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span>
are precisely the hedges that the hedge automaton&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>M</mml:mi>
                     </mml:math>
                  </span> recognizes.
Thus, the languages of hedge grammars are precisely
the regular hedge languages.
</p>
               <p>

                  <b>Theorem</b>

                  <i>The two mappings between Dyck strings over
<span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>&#931;</mml:mi>
                        </mml:math>
                     </span> and&#160;<span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mover>
                              <mml:mi>&#931;</mml:mi>
                              <mml:mo>&#8213;</mml:mo>
                           </mml:mover>
                        </mml:math>
                     </span>
and hedges over&#160;<span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>&#931;</mml:mi>
                        </mml:math>
                     </span>
that map a Dyck string to its generic-derivation hedge
and a hedge to its sequential form,
induce a one-to-one correspondence
between balanced languages of Dyck strings and regular languages of hedges.
</i>
               </p>
               <p>

                  <b>Proof</b>
Regular hedge languages are exactly the languages of hedge grammars.
By definition, the language of a hedge grammar
consists precisely of the hedges that are valid
with respect to the grammar.
By Proposion&#160;<a href="#PropHedgeTyping">
Proposition

A balanced grammar generates exactly those Dyck strings
whose generic-derivation hedges can be annotated with type information
that conforms to the grammar.
</a>,
these hedges correspond, via the sequential-form mapping,
one-to-one to the Dyck strings
that the hedge grammar generates when it is viewed
as a balanced grammar.
</p>
               <p>We illustrate Theorem&#160;<a href="#TheoBalancedVsHedgeRegular">
Theorem
The two mappings between Dyck strings over
&#931; and&#160;&#931;&#8213;
and hedges over&#160;&#931;
that map a Dyck string to its generic-derivation hedge
and a hedge to its sequential form,
induce a one-to-one correspondence
between balanced languages of Dyck strings and regular languages of hedges.
</a>
with the diagram in Figure&#160;<a href="#FigGrammars">2</a>:
</p>
               <div class="figure">
                  <a name="FigGrammars"/>
                  <h5>Figure 2: Relating hedge grammars and balanced grammars.</h5>
                  <img src="grammars.png" border="0"/>
                  <h5>[Link to <a href="grammars.png" target="grammars.png">open this graphic in a separate page</a>]</h5>
               </div>
            </div>
            <div class="section">
               <h2>
                  <a name="SecCaterpillars"/>Pushdown caterpillar automata</h2>
               <p>The central problem for any schema-language approach is
how to handle validation of a document with respect to a schema.
In the context of hedges and hedge grammars
validation means to find grammar-conformant type attributes for hedges.
</p>
               <p>We have already pointed out how to view a hedge grammar as a nondeterministic
top-down hedge automaton.
``Reversing'' a top-down automaton results
in an equivalent bottom-up hedge automaton
that can be made deterministic either offline,
in a preprocessing step that extends the subset construction
from string automata to hedge automata (<b>
                     <span style="font-size:85%">
                        <a href="#TataOnline" name="fromTataOnline">[CDG+98]</a>
                     </span>
                  </b>, <b>
                     <span style="font-size:85%">
                        <a href="#BKMWTreeAutomataTR1" name="fromBKMWTreeAutomataTR1">[BKMW01]</a>
                     </span>
                  </b>),
or dynamically, during validation.
Hence, hedge automata serve as a framework within which validation
against hedge grammars and other schema mechanisms can be explored,
as has been proposed by
Murata, Lee and Mani (<b>
                     <span style="font-size:85%">
                        <a href="#MurataTaxonomyEML" name="fromMurataTaxonomyEML">[MLM00]</a>
                     </span>
                  </b>, <b>
                     <span style="font-size:85%">
                        <a href="#MurataSchemasTR" name="fromMurataSchemasTR">[LMM00]</a>
                     </span>
                  </b>).
</p>
               <p>We recognize two problems with the approach of using hedge automata
as a general framework for discussing schema validation:
First, hedge automata are parallel machines,
hence to discuss implementation and performance issues
in this framework is not straightforward.
Second, hedge automata exhibit their typical table-driven behavior
only with their vertical movements up and down a hedge;
they do not explore the regular horizontal relationship
between sibling nodes in an automata-like fashion.
</p>
               <p>We propose to use caterpillar automata (<b>
                     <span style="font-size:85%">
                        <a href="#DLT99" name="fromDLT99">[BKW99]</a>
                     </span>
                  </b>, <b>
                     <span style="font-size:85%">
                        <a href="#ABKWoodCaterpillarsML" name="fromABKWoodCaterpillarsML">[BKW00]</a>
                     </span>
                  </b>)
as an automata model instead.
Caterpillar automata have the sequential control of finite string automata;
that is, being in one of a finite number of states,
they react to an input symbol from a finite alphabet with a change of state
on the basis of some transition table.
Caterpillar automata operate on hedges,
moving back and forth among sibling nodes and between parent and child nodes.
This is facilitated by the special input symbols
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>up</mml:mi>
                     </mml:math>
                  </span>, <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>first</mml:mi>
                     </mml:math>
                  </span>, <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>last</mml:mi>
                     </mml:math>
                  </span>, <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>left</mml:mi>
                     </mml:math>
                  </span> and <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>right</mml:mi>
                     </mml:math>
                  </span>.
The potential moves of the caterpillar automaton on the hedge
are driven by transitions on such movement symbols.
A caterpillar automaton can get a sense of its position on the hedge
with the help of special test input symbols
such as <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>isFirst</mml:mi>
                     </mml:math>
                  </span>, <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>isLast</mml:mi>
                     </mml:math>
                  </span>, <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>isRoot</mml:mi>
                     </mml:math>
                  </span> and <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>isLeaf</mml:mi>
                     </mml:math>
                  </span>.
It must only do a transition on such a test symbol
if it is in a corresponding position on the hedge.
Finally, caterpillar automata may read the label of the node
they are sitting on by doing a transition on that symbol.
</p>
               <p>We can specify a caterpillar automaton over the label alphabet&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>
as a regular expression or, equivalently, a finite-state automaton
over the alphabet <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                        <mml:mo>&#8746;</mml:mo>
                        <mml:mi>&#916;</mml:mi>
                     </mml:math>
                  </span>, where we set
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math display="block" overflow="scroll">

                        <mml:mrow>
                           <mml:mi>&#916;</mml:mi>
                           <mml:mo>=</mml:mo>
                           <mml:mfenced open="{" close="}">
                              <mml:mrow>
                                 <mml:mi>up</mml:mi>
                                 <mml:mo>,</mml:mo>
                                 <mml:mi>left</mml:mi>
                                 <mml:mo>,</mml:mo>
                                 <mml:mi>right</mml:mi>
                                 <mml:mo>,</mml:mo>
                                 <mml:mi>first</mml:mi>
                                 <mml:mo>,</mml:mo>
                                 <mml:mi>last</mml:mi>
                                 <mml:mo>,</mml:mo>
                                 <mml:mi>isRoot</mml:mi>
                                 <mml:mo>,</mml:mo>
                                 <mml:mi>isLeaf</mml:mi>
                                 <mml:mo>,</mml:mo>
                                 <mml:mi>isFirst</mml:mi>
                                 <mml:mo>,</mml:mo>
                                 <mml:mi>isLast</mml:mi>
                              </mml:mrow>
                           </mml:mfenced>
                           <mml:mtext>.</mml:mtext>

                        </mml:mrow>

                     </mml:math>
                  </span>

               </p>
               <p>The hedge-traversing caterpillar automaton&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>M</mml:mi>
                           <mml:mi>H</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span> performs,
when started on the leftmost root of a hedge,
a complete depth-first traversal of the hedge and then stops.
</p>
               <p>We know that caterpillar automata recognize only
regular hedge languages (<b>
                     <span style="font-size:85%">
                        <a href="#DLT99" name="fromDLT99">[BKW99]</a>
                     </span>
                  </b>, <b>
                     <span style="font-size:85%">
                        <a href="#ABKWoodCaterpillarsML" name="fromABKWoodCaterpillarsML">[BKW00]</a>
                     </span>
                  </b>).
It is an open research question
if they are able to recognize the <i>whole</i> family
of regular hedge languages.
Yet there is some evidence that they are strictly less powerful
than hedge automata <b>
                     <span style="font-size:85%">
                        <a href="#SalomaaOneVisitCaterpillars" name="fromSalomaaOneVisitCaterpillars">[OSD02]</a>
                     </span>
                  </b>.
Since we intend to set up a sufficiently rich automata model,
we equip caterpillar automata with a pushdown stack
that holds symbols from a finite pushdown alphabet&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#928;</mml:mi>
                     </mml:math>
                  </span>.
A pushdown caterpillar automaton or PCA
can read the topmost symbol of the stack
and react to it with a transition on that symbol,
leaving the stack intact.
When doing a down move, the PCA must push
a new symbol onto the stack.
Analogously, when doing an up move,
the topmost stack symbol will be popped.
Hence, the stack is synchronized
with the level of the node that the automaton is sitting on,
assuming that we start the PCA
on a root of the hedge with an empty stack.
</p>
               <p>

                  <b>Definition</b>
For a finite alphabet of pushdown-stack symbols&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#928;</mml:mi>
                     </mml:math>
                  </span>
let <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>&#916;</mml:mi>
                           <mml:mi>&#928;</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span> be the alphabet
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math display="block" overflow="scroll">

                        <mml:mfenced open="{" close="}">
                           <mml:mrow>
                              <mml:mrow>
                                 <mml:mi>down</mml:mi>
                                 <mml:mfenced>
                                    <mml:mi>z</mml:mi>
                                 </mml:mfenced>
                              </mml:mrow> 
                              <mml:mo>|</mml:mo> 
                              <mml:mi>z</mml:mi>
                              <mml:mo>&#8712;</mml:mo>
                              <mml:mi>&#928;</mml:mi>
                           </mml:mrow>
                        </mml:mfenced>

                        <mml:mo>&#8746;</mml:mo> 
                        <mml:mfenced open="{" close="}">
                           <mml:mrow>
                              <mml:mrow>
                                 <mml:mi>update</mml:mi>
                                 <mml:mfenced>
                                    <mml:mi>z</mml:mi>
                                 </mml:mfenced>
                              </mml:mrow> 
                              <mml:mo>|</mml:mo> 
                              <mml:mi>z</mml:mi>
                              <mml:mo>&#8712;</mml:mo>
                              <mml:mi>&#928;</mml:mi>
                           </mml:mrow>
                        </mml:mfenced>

                        <mml:mo>&#8746;</mml:mo> 
                        <mml:mfenced open="{" close="}">
                           <mml:mrow>
                              <mml:mi>up</mml:mi>
                              <mml:mo>,</mml:mo>
                              <mml:mi>right</mml:mi>
                              <mml:mo>,</mml:mo>
                              <mml:mi>isRoot</mml:mi>
                              <mml:mo>,</mml:mo>
                              <mml:mi>isLeaf</mml:mi>
                              <mml:mo>,</mml:mo>
                              <mml:mi>isLast</mml:mi>
                           </mml:mrow>
                        </mml:mfenced>

                     </mml:math>
                  </span>
of <b>hedge actions</b>.
</p>
               <p>We replace the original two actions <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>first</mml:mi>
                     </mml:math>
                  </span> and <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>right</mml:mi>
                     </mml:math>
                  </span>
of going to the first and last child,
respectively, of the current node
with a single action <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mrow>
                           <mml:mi>down</mml:mi>
                           <mml:mfenced>
                              <mml:mi>z</mml:mi>
                           </mml:mfenced>
                        </mml:mrow>
                     </mml:math>
                  </span> of going to the first child
of the current node and simultaneously pushing a symbol onto the stack.
Furthermore, we drop the test action <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>isFirst</mml:mi>
                     </mml:math>
                  </span> since we do not seem
to need it.
</p>
               <p>We assume that the alphabets <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>, <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#928;</mml:mi>
                     </mml:math>
                  </span> and <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>&#916;</mml:mi>
                           <mml:mi>&#928;</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>
are pairwise disjoint.
</p>
               <p>

                  <b>Definition</b>
A <b>pushdown caterpillar automaton (PCA)</b> over <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>
is a finite-state automaton over the alphabet <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                        <mml:mo>&#8746;</mml:mo>
                        <mml:mi>&#928;</mml:mi>
                        <mml:mo>&#8746;</mml:mo>
                        <mml:msub>
                           <mml:mi>&#916;</mml:mi>
                           <mml:mi>&#928;</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>
for some finite alphabet of pushdown-stack symbols&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#928;</mml:mi>
                     </mml:math>
                  </span>.
</p>
               <p>We use, as is the usual practice, the notion of a configuration
to explain how a PCA operates on a hedge.
</p>
               <p>

                  <b>Definition</b>
A <b>configuration</b> of a PCA&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>M</mml:mi>
                     </mml:math>
                  </span> over <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>
on a hedge <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>h</mml:mi>
                     </mml:math>
                  </span> over&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span> is a tuple
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>C</mml:mi>
                        <mml:mo>=</mml:mo>
                        <mml:mfenced>
                           <mml:mi>&#957;</mml:mi>
                           <mml:mi>p</mml:mi>
                           <mml:mi>w</mml:mi>
                        </mml:mfenced>
                     </mml:math>
                  </span> such that:
<ol type="1">
                     <li>
                        <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>&#957;</mml:mi>
                           </mml:math>
                        </span> is a node of the hedge&#160;<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>h</mml:mi>
                           </mml:math>
                        </span> (or the null pointer
      if <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>h</mml:mi>
                           </mml:math>
                        </span> is the empty hedge);
  it is called the current node or the node that <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>M</mml:mi>
                           </mml:math>
                        </span> is sitting on.
</li>
                     <li>
                        <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>p</mml:mi>
                           </mml:math>
                        </span> is a state of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>M</mml:mi>
                           </mml:math>
                        </span>; it is called the current state.
</li>
                     <li>
                        <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>w</mml:mi>
                           </mml:math>
                        </span> is a string over the pushdown-stack alphabet <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>&#928;</mml:mi>
                           </mml:math>
                        </span> of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>M</mml:mi>
                           </mml:math>
                        </span>;
  it is called the current stack.
  The length of the stack must be equal to the depth of node&#160;<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>&#957;</mml:mi>
                           </mml:math>
                        </span>
  (that is, the distance from the top of the hedge),
  so <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>w</mml:mi>
                           </mml:math>
                        </span> will be empty if <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>&#957;</mml:mi>
                           </mml:math>
                        </span> is a root node.
  The last symbol in the sequence is considered to be the top
  of the stack; it is called the current stack symbol.
</li>
                  </ol>

               </p>
               <p>

                  <b>Definition</b>
A <b>single-step operation</b> of a PCA&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>M</mml:mi>
                     </mml:math>
                  </span> on a nonempty hedge <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>h</mml:mi>
                     </mml:math>
                  </span>
leads from a configuration <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>C</mml:mi>
                        <mml:mo>=</mml:mo>
                        <mml:mfenced>
                           <mml:mi>&#957;</mml:mi>
                           <mml:mi>p</mml:mi>
                           <mml:mi>w</mml:mi>
                        </mml:mfenced>
                     </mml:math>
                  </span>
to a configuration <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msup>
                           <mml:mi>C</mml:mi>
                           <mml:mo>&#8242;</mml:mo>
                        </mml:msup>
                        <mml:mo>=</mml:mo>
                        <mml:mfenced>
                           <mml:msup>
                              <mml:mi>&#957;</mml:mi>
                              <mml:mo>&#8242;</mml:mo>
                           </mml:msup>
                           <mml:msup>
                              <mml:mi>p</mml:mi>
                              <mml:mo>&#8242;</mml:mo>
                           </mml:msup>
                           <mml:msup>
                              <mml:mi>w</mml:mi>
                              <mml:mo>&#8242;</mml:mo>
                           </mml:msup>
                        </mml:mfenced>
                     </mml:math>
                  </span>,
denoted by <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>C</mml:mi>
                        <mml:munder>
                           <mml:mo>&#8658;</mml:mo>
                           <mml:mi>M</mml:mi>
                        </mml:munder>
                        <mml:msup>
                           <mml:mi>C</mml:mi>
                           <mml:mo>&#8242;</mml:mo>
                        </mml:msup>
                     </mml:math>
                  </span>,
if and only if one of the following conditions holds:
<ol type="1">
                     <li>
                        <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>M</mml:mi>
                           </mml:math>
                        </span> reads the node label:
<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>M</mml:mi>
                           </mml:math>
                        </span>
has a transition <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>p</mml:mi>
                              <mml:mover>
                                 <mml:mo>&#8658;</mml:mo>
                                 <mml:mi>a</mml:mi>
                              </mml:mover>
                              <mml:msup>
                                 <mml:mi>p</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                           </mml:math>
                        </span>,
<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>a</mml:mi>
                           </mml:math>
                        </span> is the label of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>&#957;</mml:mi>
                           </mml:math>
                        </span>,
<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>&#957;</mml:mi>
                              <mml:mo>=</mml:mo>
                              <mml:msup>
                                 <mml:mi>&#957;</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                           </mml:math>
                        </span>
and <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>w</mml:mi>
                              <mml:mo>=</mml:mo>
                              <mml:msup>
                                 <mml:mi>w</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                           </mml:math>
                        </span>.
</li>
                     <li>
                        <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>M</mml:mi>
                           </mml:math>
                        </span> reads the stack symbol:
<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>w</mml:mi>
                           </mml:math>
                        </span>
has the form <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>w</mml:mi>
                              <mml:mo>=</mml:mo>
                              <mml:msub>
                                 <mml:mi>w</mml:mi>
                                 <mml:mn>1</mml:mn>
                              </mml:msub>
                              <mml:mo>&#8290;</mml:mo>
                              <mml:mi>z</mml:mi>
                           </mml:math>
                        </span>,
<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>M</mml:mi>
                           </mml:math>
                        </span>
has a transition <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>p</mml:mi>
                              <mml:mover>
                                 <mml:mo>&#8658;</mml:mo>
                                 <mml:mi>z</mml:mi>
                              </mml:mover>
                              <mml:msup>
                                 <mml:mi>p</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                           </mml:math>
                        </span>,
<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>&#957;</mml:mi>
                              <mml:mo>=</mml:mo>
                              <mml:msup>
                                 <mml:mi>&#957;</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                           </mml:math>
                        </span>
and <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>w</mml:mi>
                              <mml:mo>=</mml:mo>
                              <mml:msup>
                                 <mml:mi>w</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                           </mml:math>
                        </span>.
</li>
                     <li>
                        <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>M</mml:mi>
                           </mml:math>
                        </span> updates the stack symbol:
<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>w</mml:mi>
                           </mml:math>
                        </span>
has the form <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>w</mml:mi>
                              <mml:mo>=</mml:mo>
                              <mml:msub>
                                 <mml:mi>w</mml:mi>
                                 <mml:mn>1</mml:mn>
                              </mml:msub>
                              <mml:mo>&#8290;</mml:mo>
                              <mml:mi>z</mml:mi>
                           </mml:math>
                        </span>,
<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>M</mml:mi>
                           </mml:math>
                        </span>
has a transition <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>p</mml:mi>
                              <mml:mover>
                                 <mml:mo>&#8658;</mml:mo>
                                 <mml:mrow>
                                    <mml:mi>update</mml:mi>
                                    <mml:mfenced>
                                       <mml:mi>z</mml:mi>
                                    </mml:mfenced>
                                 </mml:mrow>
                              </mml:mover>
                              <mml:msup>
                                 <mml:mi>p</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                           </mml:math>
                        </span>,
<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>&#957;</mml:mi>
                              <mml:mo>=</mml:mo>
                              <mml:msup>
                                 <mml:mi>&#957;</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                           </mml:math>
                        </span>
and <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:msup>
                                 <mml:mi>w</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                              <mml:mo>=</mml:mo>
                              <mml:msub>
                                 <mml:mi>w</mml:mi>
                                 <mml:mn>1</mml:mn>
                              </mml:msub>
                              <mml:mo>&#8290;</mml:mo>
                              <mml:mi>z</mml:mi>
                           </mml:math>
                        </span>.
</li>
                     <li>
                        <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>M</mml:mi>
                           </mml:math>
                        </span> moves down in the hedge:
<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>M</mml:mi>
                           </mml:math>
                        </span> has a
transition <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>p</mml:mi>
                              <mml:mover>
                                 <mml:mo>&#8658;</mml:mo>
                                 <mml:mi>up</mml:mi>
                              </mml:mover>
                              <mml:msup>
                                 <mml:mi>p</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                           </mml:math>
                        </span>,
<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:msup>
                                 <mml:mi>&#957;</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                           </mml:math>
                        </span> is the parent of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>&#957;</mml:mi>
                           </mml:math>
                        </span>
and <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>w</mml:mi>
                           </mml:math>
                        </span> has the form
<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mrow>
                                 <mml:mi>w</mml:mi>
                                 <mml:mo>=</mml:mo>
                                 <mml:msup>
                                    <mml:mi>w</mml:mi>
                                    <mml:mo>&#8242;</mml:mo>
                                 </mml:msup>
                                 <mml:mo>&#8290;</mml:mo>
                                 <mml:mi>z</mml:mi>
                              </mml:mrow>
                           </mml:math>
                        </span>.
</li>
                     <li>
                        <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>M</mml:mi>
                           </mml:math>
                        </span> moves to the right in the hedge:
<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>M</mml:mi>
                           </mml:math>
                        </span>
has a transition <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>p</mml:mi>
                              <mml:mover>
                                 <mml:mo>&#8658;</mml:mo>
                                 <mml:mi>right</mml:mi>
                              </mml:mover>
                              <mml:msup>
                                 <mml:mi>p</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                           </mml:math>
                        </span>,
<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:msup>
                                 <mml:mi>&#957;</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                           </mml:math>
                        </span>
is the right sibling of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>&#957;</mml:mi>
                           </mml:math>
                        </span>
and <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>w</mml:mi>
                              <mml:mo>=</mml:mo>
                              <mml:msup>
                                 <mml:mi>w</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                           </mml:math>
                        </span>.
</li>
                     <li>
                        <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>M</mml:mi>
                           </mml:math>
                        </span> tests its position on the hedge:
<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>M</mml:mi>
                           </mml:math>
                        </span> has a transition
<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>p</mml:mi>
                              <mml:mover>
                                 <mml:mo>&#8658;</mml:mo>
                                 <mml:mi>isRoot</mml:mi>
                              </mml:mover>
                              <mml:msup>
                                 <mml:mi>p</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                           </mml:math>
                        </span>,
<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>p</mml:mi>
                              <mml:mover>
                                 <mml:mo>&#8658;</mml:mo>
                                 <mml:mi>isLeaf</mml:mi>
                              </mml:mover>
                              <mml:msup>
                                 <mml:mi>p</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                           </mml:math>
                        </span>
or <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>p</mml:mi>
                              <mml:mover>
                                 <mml:mo>&#8658;</mml:mo>
                                 <mml:mi>isLast</mml:mi>
                              </mml:mover>
                              <mml:msup>
                                 <mml:mi>p</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                           </mml:math>
                        </span>,
<span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>&#957;</mml:mi>
                           </mml:math>
                        </span> is a root, a leaf or the rightmost node among its siblings,
respectively, <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>&#957;</mml:mi>
                              <mml:mo>=</mml:mo>
                              <mml:msup>
                                 <mml:mi>&#957;</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                           </mml:math>
                        </span>
and <span style="font-family: 'Lucida Sans Unicode'">
                           <mml:math overflow="scroll">
                              <mml:mi>w</mml:mi>
                              <mml:mo>=</mml:mo>
                              <mml:msup>
                                 <mml:mi>w</mml:mi>
                                 <mml:mo>&#8242;</mml:mo>
                              </mml:msup>
                           </mml:math>
                        </span>.
</li>
                  </ol>

               </p>
               <p>A <b>starting configuration</b>
of <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>M</mml:mi>
                     </mml:math>
                  </span> on&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>h</mml:mi>
                     </mml:math>
                  </span>, which may be empty,
is a configuration
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>C</mml:mi>
                        <mml:mo>=</mml:mo>
                        <mml:mfenced>
                           <mml:mi>&#957;</mml:mi>
                           <mml:mi>p</mml:mi>
                           <mml:mi>&#955;</mml:mi>
                        </mml:mfenced>
                     </mml:math>
                  </span>
such that <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#957;</mml:mi>
                     </mml:math>
                  </span> is the leftmost root of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>h</mml:mi>
                     </mml:math>
                  </span>,
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>p</mml:mi>
                     </mml:math>
                  </span> is a start state of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>M</mml:mi>
                     </mml:math>
                  </span> and, furthermore, the stack is empty.
</p>
               <p>An <b>accepting configuration</b>
of <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>M</mml:mi>
                     </mml:math>
                  </span> on&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>h</mml:mi>
                     </mml:math>
                  </span>, which may be empty,
is a configuration
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>C</mml:mi>
                        <mml:mo>=</mml:mo>
                        <mml:mfenced>
                           <mml:mi>&#957;</mml:mi>
                           <mml:mi>p</mml:mi>
                           <mml:mi>&#955;</mml:mi>
                        </mml:mfenced>
                     </mml:math>
                  </span>
such that <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#957;</mml:mi>
                     </mml:math>
                  </span> is the rightmost root of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>h</mml:mi>
                     </mml:math>
                  </span>,
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>p</mml:mi>
                     </mml:math>
                  </span> is a final state of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>M</mml:mi>
                     </mml:math>
                  </span> and, once more, the stack is empty.
</p>
               <p>An <b>accepting computation</b>
of <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>M</mml:mi>
                     </mml:math>
                  </span> on&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>h</mml:mi>
                     </mml:math>
                  </span> is a sequence of configurations
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mrow>
                           <mml:msub>
                              <mml:mi>C</mml:mi>
                              <mml:mn>1</mml:mn>
                           </mml:msub>
                           <mml:mo>,</mml:mo>
                           <mml:mi>&#8230;</mml:mi>
                           <mml:mo>,</mml:mo>
                           <mml:msub>
                              <mml:mi>C</mml:mi>
                              <mml:mi>n</mml:mi>
                           </mml:msub>
                        </mml:mrow>
                     </mml:math>
                  </span>
(<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mrow>
                           <mml:mi>n</mml:mi>
                           <mml:mo>&#8805;</mml:mo>
                           <mml:mn>1</mml:mn>
                        </mml:mrow>
                     </mml:math>
                  </span>) such that <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>C</mml:mi>
                           <mml:mn>1</mml:mn>
                        </mml:msub>
                     </mml:math>
                  </span> is a start configuration,
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>C</mml:mi>
                           <mml:mi>n</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span> is an accepting configuration
and single-step operations lead from <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>C</mml:mi>
                           <mml:mi>i</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>
to <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>C</mml:mi>
                           <mml:mrow>
                              <mml:mi>i</mml:mi>
                              <mml:mo>+</mml:mo>
                              <mml:mn>1</mml:mn>
                           </mml:mrow>
                        </mml:msub>
                     </mml:math>
                  </span>
(<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mrow>
                           <mml:mn>1</mml:mn>
                           <mml:mo>&#8804;</mml:mo> 
                           <mml:mi>i</mml:mi>
                           <mml:mo>&#8804;</mml:mo> 
                           <mml:mi>n</mml:mi>
                        </mml:mrow>
                     </mml:math>
                  </span>).
</p>
               <p>

                  <b>Definition</b>
A PCA over <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span> 
                  <b>recognizes</b>
a hedge over&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>
if and only if there is an accepting computation of the PCA on the hedge.
We call the set of hedges that a PCA&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>M</mml:mi>
                     </mml:math>
                  </span> recognizes
its <b>language</b> and denote it with
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mrow>
                           <mml:mi fontstyle="normal">L</mml:mi>
                           <mml:mfenced>
                              <mml:mi>M</mml:mi>
                           </mml:mfenced>
                        </mml:mrow>
                     </mml:math>
                  </span>.
</p>
               <p>

                  <b>Theorem</b>

                  <i>A hedge language over&#160;<span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>&#931;</mml:mi>
                        </mml:math>
                     </span>
is regular if and only if it is recognizable by a PCA.
</i>
               </p>
               <p>

                  <b>Proof</b>
Firstly, let <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>M</mml:mi>
                     </mml:math>
                  </span> be a PCA.
We simulate <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>M</mml:mi>
                     </mml:math>
                  </span> with a two-way hedge automaton.
Our result (<b>
                     <span style="font-size:85%">
                        <a href="#ABKWood2wayJ" name="fromABKWood2wayJ">[BKW02]</a>
                     </span>
                  </b>, <b>
                     <span style="font-size:85%">
                        <a href="#ABKWood2wayJ" name="fromABKWood2wayJ">[BKW02]</a>
                     </span>
                  </b>)
that two-way tree automata recognize the same tree languages
as one-way tree automata or tree grammars
is easily extended from trees to hedges.
Hence, <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mrow>
                           <mml:mi fontstyle="normal">L</mml:mi>
                           <mml:mfenced>
                              <mml:mi>M</mml:mi>
                           </mml:mfenced>
                        </mml:mrow>
                     </mml:math>
                  </span> is regular.
</p>
               <p>Secondly, we convert a hedge grammar&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span>
into a PCA&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>M</mml:mi>
                           <mml:mi>G</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>
that recognizes precisely the hedges
that are valid with respect to the hedge grammar.
The construction combines techniques from two earlier papers:
In our work on caterpillar automata (<b>
                     <span style="font-size:85%">
                        <a href="#DLT99" name="fromDLT99">[BKW99]</a>
                     </span>
                  </b>, <b>
                     <span style="font-size:85%">
                        <a href="#ABKWoodCaterpillarsML" name="fromABKWoodCaterpillarsML">[BKW00]</a>
                     </span>
                  </b>)
we have converted <b>local tree grammars</b>
into caterpillar automata
by extending the hedge-traversing caterpillar automaton
that we have mentioned earlier in this paper.
Local tree or hedge grammars have no memory beyond the label
of the ``local'' node that they are expanding.
By applying our technique of partial parse trees
that we have developed in our work on predictive parsing
of extended context-free languages (<b>
                     <span style="font-size:85%">
                        <a href="#BKWoodCIAA2002" name="fromBKWoodCIAA2002">[BKW03a]</a>
                     </span>
                  </b>, <b>
                     <span style="font-size:85%">
                        <a href="#BKWoodOttmann2003" name="fromBKWoodOttmann2003">[BKW03b]</a>
                     </span>
                  </b>),
we demonstrate that the stack-memory of a PCA is sufficient
to verify validity of a hedge with respect to a hedge grammar.
</p>
               <p>In the sketch of the proof of Theorem&#160;<a href="#TheoPCAsRegLang">
Theorem
A hedge language over&#160;&#931;
is regular if and only if it is recognizable by a PCA.
</a>
we have mentioned a PCA&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>M</mml:mi>
                           <mml:mi>G</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span>
that we construct from a hedge grammar&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span>.
The PCA&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>M</mml:mi>
                           <mml:mi>G</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span> recognizes precisely the hedges
that are valid with respect to grammar&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span>.
</p>
               <p>If we equip PCAs with the write-only capability to annotate nodes
with symbols from a finite set,
we can extend <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>M</mml:mi>
                           <mml:mi>G</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span> in such a way
that it not only recognizes a hedge that conforms to&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span>
but also annotates it with grammar-conformant type information.
</p>
               <p>The definition of the PCA&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>M</mml:mi>
                           <mml:mi>G</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span> depends on the way
  the regular sets <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi fontstyle="normal">L</mml:mi>
                           <mml:mrow>
                              <mml:mi>X</mml:mi>
                              <mml:mo>,</mml:mo>
                              <mml:mi>a</mml:mi>
                           </mml:mrow>
                        </mml:msub>
                     </mml:math>
                  </span>
(which consist of all the strings&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>x</mml:mi>
                     </mml:math>
                  </span> of nonterminals
such that <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mfenced>
                           <mml:mi>X</mml:mi>
                           <mml:mi>a</mml:mi>
                           <mml:mi>x</mml:mi>
                        </mml:mfenced>
                     </mml:math>
                  </span>
is a production of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span>)
are represented.
We assume that each <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi fontstyle="normal">L</mml:mi>
                           <mml:mrow>
                              <mml:mi>X</mml:mi>
                              <mml:mo>,</mml:mo>
                              <mml:mi>a</mml:mi>
                           </mml:mrow>
                        </mml:msub>
                     </mml:math>
                  </span> is represented
by a finite-state automaton <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>M</mml:mi>
                           <mml:mrow>
                              <mml:mi>X</mml:mi>
                              <mml:mo>,</mml:mo>
                              <mml:mi>a</mml:mi>
                           </mml:mrow>
                        </mml:msub>
                     </mml:math>
                  </span>.
</p>
               <p>

                  <b>Theorem</b>

                  <i>The PCA <span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:msub>
                              <mml:mi>M</mml:mi>
                              <mml:mi>G</mml:mi>
                           </mml:msub>
                        </mml:math>
                     </span>
can be constructed from a hedge grammar&#160;<span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>G</mml:mi>
                        </mml:math>
                     </span>
in linear time.
</i>
               </p>
               <p>In general, <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>M</mml:mi>
                           <mml:mi>G</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span> will operate nondeterministically
on a hedge&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>h</mml:mi>
                     </mml:math>
                  </span>.
&gt;From a performance point of view it is relevant to know
for which grammars&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>G</mml:mi>
                     </mml:math>
                  </span> the
behavior of&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>M</mml:mi>
                           <mml:mi>G</mml:mi>
                        </mml:msub>
                     </mml:math>
                  </span> is deterministic.
Hence, let us call a color&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>a</mml:mi>
                     </mml:math>
                  </span>

                  <b>live</b> for&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>X</mml:mi>
                     </mml:math>
                  </span>
if and only if the language <span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi fontstyle="normal">L</mml:mi>
                           <mml:mrow>
                              <mml:mi>X</mml:mi>
                              <mml:mo>,</mml:mo>
                              <mml:mi>a</mml:mi>
                           </mml:mrow>
                        </mml:msub>
                     </mml:math>
                  </span> is nonempty.
Let us then replace in each automaton
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msub>
                           <mml:mi>M</mml:mi>
                           <mml:mrow>
                              <mml:mi>X</mml:mi>
                              <mml:mo>,</mml:mo>
                              <mml:mi>a</mml:mi>
                           </mml:mrow>
                        </mml:msub>
                     </mml:math>
                  </span>
each transition on a nonterminal&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msup>
                           <mml:mi>X</mml:mi>
                           <mml:mo>&#8242;</mml:mo>
                        </mml:msup>
                     </mml:math>
                  </span>
with transitions on each color&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msup>
                           <mml:mi>a</mml:mi>
                           <mml:mo>&#8242;</mml:mo>
                        </mml:msup>
                     </mml:math>
                  </span> that is live for&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>X</mml:mi>
                     </mml:math>
                  </span>.
We call the result of these replacements
<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:msubsup>
                           <mml:mi>M</mml:mi>
                           <mml:mrow>
                              <mml:mi>X</mml:mi>
                              <mml:mo>,</mml:mo>
                              <mml:mi>a</mml:mi>
                           </mml:mrow>
                           <mml:mi fontstyle="normal">c</mml:mi>
                        </mml:msubsup>
                     </mml:math>
                  </span>
(a finite-state automaton over the set of colors&#160;<span style="font-family: 'Lucida Sans Unicode'">
                     <mml:math overflow="scroll">
                        <mml:mi>&#931;</mml:mi>
                     </mml:math>
                  </span>).
</p>
               <p>We can now state the following theorem:
</p>
               <p>

                  <b>Theorem</b>

                  <i>The PCA <span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:msub>
                              <mml:mi>M</mml:mi>
                              <mml:mi>G</mml:mi>
                           </mml:msub>
                        </mml:math>
                     </span>
operates deterministically on all hedges
if and only if each automaton
<span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:msubsup>
                              <mml:mi>M</mml:mi>
                              <mml:mrow>
                                 <mml:mi>X</mml:mi>
                                 <mml:mo>,</mml:mo>
                                 <mml:mi>a</mml:mi>
                              </mml:mrow>
                              <mml:mi fontstyle="normal">c</mml:mi>
                           </mml:msubsup>
                        </mml:math>
                     </span>
is deterministic.
</i>
               </p>
               <p>In our previous work on predictive parsing
for extended context-free grammars (<b>
                     <span style="font-size:85%">
                        <a href="#BKWoodCIAA2002" name="fromBKWoodCIAA2002">[BKW03a]</a>
                     </span>
                  </b>, <b>
                     <span style="font-size:85%">
                        <a href="#BKWoodOttmann2003" name="fromBKWoodOttmann2003">[BKW03b]</a>
                     </span>
                  </b>)
we have identified a class of grammars
whose languages can be parsed deterministically
with a top-down parsing strategy that uses a look-ahead of&#160;one.
This is the class eSLL(1)
that is the extended analog of the classic context-free grammars
to which the top-down 1-symbol-lookahead parsing strategy applies.
</p>
               <p>Which of Berstel and Boasson's balanced grammars belong to eSLL(1)?
Viewing balanced grammars once more as hedge grammars,
we state the following result:
</p>
               <p>

                  <b>Theorem</b>

                  <i>A balanced grammar&#160;<span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:mi>G</mml:mi>
                        </mml:math>
                     </span> is eSLL(1) if and only if
the PCA&#160;<span style="font-family: 'Lucida Sans Unicode'">
                        <mml:math overflow="scroll">
                           <mml:msub>
                              <mml:mi>M</mml:mi>
                              <mml:mi>G</mml:mi>
                           </mml:msub>
                        </mml:math>
                     </span> operates deterministically on all hedges.
</i>
               </p>
            </div>
            <hr class="hr"/>
            <h3>
               <i>Acknowledgments</i>
            </h3>
            <p class="first">The work of the second author was supported under
the CERG grant HKUST 6197/01E from the Research Grants Council of Hong Kong.</p>
            <hr class="hr"/>
            <h3>
               <i>Bibliography</i>
            </h3>
            <p>
               <b>
                  <a name="AlbertGWNormalFormsTCS" href="#fromAlbertGWNormalFormsTCS">[AGW01] </a>
               </b> J.&#160;Albert, D.&#160;Giammarresi, and D.&#160;Wood.
Normal form algorithms for extended context-free grammars.
<i>Theoretical Computer Science</i>, 267(1--2):35--47, 2001.
</p>
            <p>
               <b>
                  <a name="BBXMLGrammars" href="#fromBBXMLGrammars">[BB00] </a>
               </b> J.&#160;Berstel and L.&#160;Boasson.
XML grammars.
In Mogens Nielsen and Branislav Rovan, editors, <i>Mathematical
  Foundations of Computer Science 2000, 25th International Symposium, MFCS
  2000, Bratislava, Slovakia, August 28 - September 1, 2000, Proceedings</i>,
  volume 1893 of <i>Lecture Notes in Computer Science</i>, pages 182--191.
  Springer-Verlag, 2000.
</p>
            <p>
               <b>
                  <a name="BBBalancedGrammars" href="#fromBBBalancedGrammars">[BB02a] </a>
               </b> J.&#160;Berstel and L.&#160;Boasson.
Balanced grammars and their languages.
In Wilfried Brauer, Hartmut Ehrig, Juhani Karhum&#228;ki, and Arto
  Salomaa, editors, <i>Formal and Natural Computing: Essays Dedicated to
  Grzegorz Rozenberg [on occasion of his 60th birthday, March 14, 2002]</i>,
  volume 2300 of <i>Lecture Notes in Computer Science</i>, pages 3--25.
  Springer-Verlag, 2002.
</p>
            <p>
               <b>
                  <a name="BBXMLFormalProperties" href="#fromBBXMLFormalProperties">[BB02b] </a>
               </b> J.&#160;Berstel and L.&#160;Boasson.
Formal properties of XML grammars and languages.
<i>Acta Informatica</i>, 38(9):649--671, 2002.
</p>
            <p>
               <b>
                  <a name="BKMWTreeAutomataTR1" href="#fromBKMWTreeAutomataTR1">[BKMW01] </a>
               </b> A.&#160;Br&#252;ggemann-Klein, M.&#160;Murata, and D.&#160;Wood.
Regular tree and regular hedge languages over unranked alphabets.
Technical Report HKUST-TCSC-2001-05, Hong Kong University of Science
  and Technology, Theoretical Computer Science Center, Computer Science
  Department, Hong Kong SAR, 2001.
</p>
            <p>
               <b>
                  <a name="ABKWoodCaterpillarsML" href="#fromABKWoodCaterpillarsML">[BKW00] </a>
               </b> A.&#160;Br&#252;ggemann-Klein and D.&#160;Wood.
Caterpillars: A context specification technique.
<i>Markup Languages</i>, 2(1):81--106, 2000.
</p>
            <p>
               <b>
                  <a name="ABKWood2wayJ" href="#fromABKWood2wayJ">[BKW02] </a>
               </b> A.&#160;Br&#252;ggemann-Klein and D.&#160;Wood.
Regularly-extended two-way nondeterministic tree automata, 2002.
Accepted for Publication in a Journal.
</p>
            <p>
               <b>
                  <a name="BKWoodCIAA2002" href="#fromBKWoodCIAA2002">[BKW03a] </a>
               </b> A.&#160;Br&#252;ggemann-Klein and D.&#160;Wood.
On predictive parsing and extended context-free grammars.
In Jean-Marc Champarnaud and Denis Maurel, editors,
<i>Implementation and Application of Automata</i>,
7th International Conference,
CIAA 2002, Tours, France}, volume 2608 of <i>Lecture Notes in Computer
  Science</i>, pages 239--247. Springer-Verlag, 2003.
</p>
            <p>
               <b>
                  <a name="BKWoodOttmann2003" href="#fromBKWoodOttmann2003">[BKW03b] </a>
               </b> A.&#160;Br&#252;ggemann-Klein and D.&#160;Wood.
On predictive parsing and extended context-free grammars.
In Rolf Klein, Hans-Werner Six, and Lutz&#160;Michael Wegner, editors,
  <i>Computer Science in Perspective</i>, volume 2598 of <i>Lecture Notes in
  Computer Science</i>, pages 69--87. Springer-Verlag, 2003.
</p>
            <p>
               <b>
                  <a name="DLT99" href="#fromDLT99">[BKW99] </a>
               </b> A.&#160;Br&#252;ggemann-Klein and D.&#160;Wood.
Caterpillars, context, tree automata and tree pattern matching, 1999.
Proceedings of the Fourth International Conference on Developments in
  Formal Language Theory (DLT '99).
</p>
            <p>
               <b>
                  <a name="TataOnline" href="#fromTataOnline">[CDG+98] </a>
               </b> H.&#160;Comon, M.&#160;Daucher, R.&#160;Gilleron, S.&#160;Tison, and M.&#160;Tommasi.
Tree automata techniques and applications, 1998.
Available on the Web from l3ux02.univ-lille3.fr in directory tata.
</p>
            <p>
               <b>
                  <a name="RelaxOasis" href="#fromRelaxOasis">[CM01] </a>
               </b> J.&#160;Clark and M.&#160;Murata.
Relax NG specification.
The Organization for the Advancement of Structured Information
  Standards (OASIS), December 2001.
</p>
            <p>
               <b>
                  <a name="GecsegSteinbyTAs" href="#fromGecsegSteinbyTAs">[GS84] </a>
               </b> F.&#160;G&#233;cseg and M.&#160;Steinby.
<i>Tree Automata</i>.
Akad&#233;miai Kiad&#243;, Budapest, 1984.
</p>
            <p>
               <b>
                  <a name="MurataSchemasTR" href="#fromMurataSchemasTR">[LMM00] </a>
               </b> D.&#160;Lee, M.&#160;Mani, and M.&#160;Murata.
Reasoning about XML schema languages using formal language theory.
Technical Report RJ#&#160;10197, Log#&#160;95071, IBM Almaden Research
  Center, 2000.
</p>
            <p>
               <b>
                  <a name="MurataTaxonomyEML" href="#fromMurataTaxonomyEML">[MLM00] </a>
               </b> M.&#160;Murata, D.&#160;Lee, and M.&#160;Mani.
Taxonomy of XML schema languages using formal language theory.
Extreme Markup Languages, 2000.
</p>
            <p>
               <b>
                  <a name="MurataXMLAccess" href="#fromMurataXMLAccess">[MTKH03] </a>
               </b> M.&#160;Murata, A.&#160;Tozawa, M.&#160;Kudo, and S.&#160;Hada.
XML access control using static analysis.
In <i>Proceedings of the 10th ACM conference on Computer and
  communication security</i>, pages 73--84. ACM Press, 2003.
</p>
            <p>
               <b>
                  <a name="MurataHedgeManuscript" href="#fromMurataHedgeManuscript">[Mur00] </a>
               </b> M.&#160;Murata.
Hedge automata: A formal model for XML schemata.
Web-published manuscript, 2000.
</p>
            <p>
               <b>
                  <a name="MurataExtendingPaths" href="#fromMurataExtendingPaths">[Mur01] </a>
               </b> M.&#160;Murata.
Extended path expressions for XML.
In <i>Proceedings of the Twenteenth ACM SIGACT-SIGMOD-SIGART
  Symposium on Principles of Database Systems, May 21-23, 2001, Santa Barbara,
  California, USA</i>. ACM, 2001.
</p>
            <p>
               <b>
                  <a name="MurataPODP96" href="#fromMurataPODP96">[Mur97] </a>
               </b> M.&#160;Murata.
Transformation of documents and schemas by patterns and contextual
  conditions.
In C.&#160;Nicholas and D.&#160;Wood, editors, <i>Proceedings of the Third
  International Workshop on Principles of Document Processing (PODP 96)</i>,
  pages 153--169, Heidelberg, 1997. Springer-Verlag.
Lecture Notes in Computer Science 1293.
</p>
            <p>
               <b>
                  <a name="MurataPODDP98" href="#fromMurataPODDP98">[Mur98] </a>
               </b> M.&#160;Murata.
Data model for document tranformation and assembly.
In E.V. Munson, C.&#160;Nicholas, and D.Wood, editors, <i>Proceedings of
  the Fourth International Workshop on Principles of Digital Document
  Processing (PODDP 98)</i>, pages 140--152, Heidelberg, Germany, 1998.
  Springer-Verlag.
Lecture Notes in Computer Science 1481.
</p>
            <p>
               <b>
                  <a name="SalomaaOneVisitCaterpillars" href="#fromSalomaaOneVisitCaterpillars">[OSD02] </a>
               </b> A.&#160;Okhotin, K.&#160;Salomaa, and M.&#160;Domaratzki.
One-visit caterpillar tree automata.
<i>Fundamenta Informaticae</i>, 52(4):361--375, 2002.
</p>
            <hr class="hr"/>
            <hr class="hr"/>
            <p class="footertitle">Balanced Context-Free Grammars,
Hedge Grammars and Pushdown Caterpillar Automata</p>
            <address>Anne Br&#252;ggemann-Klein [Technische Universit&#228;t M&#252;nchen, Institut f&#252;r Informatik]<br class="br"/>
               <a href="mailto:brueggem@in.tum.de" class="mailto">brueggem@in.tum.de</a>
            </address>
            <address>Derick Wood [Hong Kong University of Science &amp; Technology, Department of Computer Science]<br class="br"/>
               <a href="mailto:dwood@cs.ust.hk" class="mailto">dwood@cs.ust.hk</a>
            </address>
            <hr class="hr"/>
         </div>
      </div>
   </body>
</html>