<?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 subsets of S,
product, star and union (other approaches are described in Regi.xml
files). We use the following grammar (the U is commutative and idempotent)

S -> a | b | c | d
Sub -> Set (S)
E= Sub | E.E | E U E | E*

-->


<!DOCTYPE specification SYSTEM "seed.dtd">



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

  <union id="All"> <!-- defintion of a regular expression-->
    <child idref="Sub"/> <!-- either a finite set-->
    <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-->
    <child idref="E"/><!-- or the empty word-->
  </union> 

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

  <constants id="E">
    <symbol value="epsilon"/> <!-- empty word-->
  </constants>

  <constants_set id="Sub">  <!-- defintion of subsets of S-->
    <child idref="S"/>
  </constants_set>

  <unary id="Star"> <!-- stars of an expression -->
    <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>
