<?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)
Compared to the file Reg1.xml, we specify here regular expression with no repeated consecutive star symbols

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

-->


<!DOCTYPE specification SYSTEM "seed.dtd">



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

  <union id="All"> <!-- defintion of a regular expression-->
    <child idref="starE"/> <!-- either a finite set-->
    <child idref="nonstarE"/> 
  </union> 


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

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

  <unary id="starE"> <!-- stars of an expression -->
    <symbol value="*"/>
    <child idref="All"/>
  </unary>

  <union id="nonstarE"> <!-- defintion of a regular expression that is
    not a star expression -->
    <child idref="Sub"/> <!-- either a finite set-->
    <child idref="Prod"/> <!-- or a product-->
    <child idref="Union"/> <!-- or a union-->
  </union> 


  <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>
