<?xml version="1.0"?>


<!-- Regular Expressions are widely used for pattern matching issues. A
regular expression on a finite alphabet S. Several definitions
(semantically but not syntactically equivalent) exist. Here we
consider that a regular expression is defined by elements of S*
(finite words), product, star and union (other approaches are
described in Regi.xml files). We use the following grammar (the U is
commutative and idempotent, epsilon is a constant encoding the empty
word).

S -> a | b | c | d
Word -> Seq (S) | epsilon
E -> Word | E U E | E.E | E*

-->




<!DOCTYPE specification SYSTEM "seed.dtd">


<specification>
  <start idref="All"/> 

  <union id="All"> <!-- definition of a regular expression-->
    <child idref="Word"/> <!-- either a letter-->
    <child idref="Prod"/> <!-- or the product of two expressions-->
    <child idref="Union"/><!-- or the union of two expressions-->
    <child idref="Star"/><!-- or the star of an expression-->
  </union> 

  <constants id="S"> <!-- defintion of the alphabet-->
    <symbol value="a"/>
    <symbol value="b"/>
    <symbol value="c"/>
    <symbol value="d"/>
  </constants>

  <sequence id="Word1"> <!-- definition of non empty words -->
    <symbol value="."/>
    <child idref="S"/>
  </sequence>

  <union id="Word"> <!-- defintion of words -->
    <child idref="EmptyWord"/> 
    <child idref="Word1"/>
  </union> 
  
  <constants id="EmptyWord">
    <symbol value="epsilon"/>
  </constants>

  <unary id="Star"> <!-- stars of expressions -->
    <symbol value="*"/>
    <child idref="All"/>
  </unary>

  <binary id="Prod"> <!-- product of expressions -->
    <symbol value="."/>
    <child idref="All"/>
    <child idref="All"/>
  </binary>
  
  <binary_sym_neq id="Union"> <!-- union of expressions -->
    <symbol value="+"/>
    <child idref="All"/>
  </binary_sym_neq>


</specification>

