package ocamlregextkit

  1. Overview
  2. Docs

Module Regextkit.ReSource

Representation of Regular Expressions and implementation of standard operations

Sourceexception Syntax_error of string

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

Sourceval simplify : Tree.re -> Tree.re

simplify r attempts to simplify RE r by Kozen Axioms

  • returns

    a simplfication of RE r

Sourceval print : Tree.re -> unit

print r prints a string representation of r

Sourceval export_graphviz : Tree.re -> string

export_graphviz r

  • returns

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

Sourceval get_alphabet : Tree.re -> string list

get_alphabet r

  • returns

    the alphabet of RE r as a list

Sourceval is_nullable : Tree.re -> bool

is_nullable r

  • returns

    true iff Epsilon is accepted by the RE r

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

derivative r a

  • returns

    the Brzozowski derivative of RE r with respect to symbol a

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