BNFC-2.9.4: A compiler front-end generator.
Safe HaskellSafe-Inferred
LanguageHaskell2010

BNFC.Regex

Description

Tools to manipulate regular expressions.

Synopsis

Documentation

nullable :: Reg -> Bool Source #

Check if a regular expression is nullable (accepts the empty string)

simpReg :: Reg -> Reg Source #

Simplification of regular expression, mostly for the purpose of simplifying character alternatives (character classes).

This may help lexer backends, since often lexer generators have a limited syntax for character classes.