package ocamlregextkit

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Representation of Regular Expressions and implementation of standard operations

exception Syntax_error of string

Syntax_error is raised when the parser encounters a parsing error. It should include the problem character

val simplify : Tree.re -> Tree.re

simplify r attempts to simplify RE r by Kozen Axioms

  • returns

    a simplfication of RE r

val print : Tree.re -> unit

print r prints a string representation of r

val export_graphviz : Tree.re -> string

export_graphviz r

  • returns

    a representation of the Abstract Syntax Tree representing r in the DOT language for Graphviz

val get_alphabet : Tree.re -> string list

get_alphabet r

  • returns

    the alphabet of RE r as a list

val is_nullable : Tree.re -> bool

is_nullable r

  • returns

    true iff Epsilon is accepted by the RE r

val derivative : Tree.re -> string -> Tree.re

derivative r a

  • returns

    the Brzozowski derivative of RE r with respect to symbol a

val parse : string -> Tree.re

parse s Invokes the parser on string s to create a Regular Expression Abstract Syntax Tree

  • returns

    Regular Expression Abstract Syntax Tree for string s

OCaml

Innovation. Community. Security.