HaLeX-1.2.6: HaLeX enables modelling, manipulation and visualization of regular languages

Copyright(c) João Saraiva 20012002200320042005
LicenseLGPL
Maintainerjas@di.uminho.pt
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Language.HaLex.Fa2RegExp

Description

From Finite Automata into Regular Expressions

Code Included in the Lecture Notes on Language Processing (with a functional flavour).

Synopsis

Documentation

dfa2RegExp Source #

Arguments

:: Eq sy 
=> Dfa Int sy

Deterministic Automaton

-> RegExp sy

Equivalent Regular Expression

Compute a regular expression from a Dfa.

regExpFromTo Source #

Arguments

:: Eq st 
=> (st -> sy -> st)

Transition Function

-> [sy]

Vocabulary

-> st

Origin State

-> st

Destination State

-> RegExp sy

Regular Expression

Compute a regular expression that defines the transitions from an origin to a destination in a Dfa.

ndfaregExpFromTo Source #

Arguments

:: Eq st 
=> (st -> Maybe sy -> [st])

Transition Function

-> [sy]

Vocabulary

-> st

Origin State

-> st

Destination State

-> RegExp sy

Regular Expression

Compute a regular expression that defines the transitions from an origin to a destination in a Ndfa.