Source file tree.ml

1
2
3
4
5
6
7
8
(** Type definition of Regular Expression Abstract Syntax Tree *)

type re = 
      Literal of string     (* a ∈ Σ *)
    | Epsilon               (* ε *)
    | Empty                 (* ∅ *)
    | Union of re * re      (* E + R *)
    | Concat of re * re     (* E·R *)
    | Star of re            (* E* *)