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

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

Language.HaLex.RegExp2Fa

Description

From Regular Expressions into Non-Deterministic and Deterministic Finite Automata

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

Synopsis

Documentation

regExp2Ndfa Source #

Arguments

:: Eq sy 
=> RegExp sy

Regular expression

-> Ndfa Int sy

Automaton

Compute a Ndfa from a RegExp.

regExp2Dfa Source #

Arguments

:: Eq sy 
=> RegExp sy

Regular expression

-> Dfa [Int] sy

Automaton

Compute a Dfa from a RegExp. (via the intermediate Ndfa)

regExp2Ndfa' :: Eq sy => RegExp sy -> Int -> (Ndfa Int sy, Int) Source #

Compute a Ndfa from a RegExp. Auxiliar function threading the context: the first available int to name the states