Safe Haskell | None |
---|---|
Language | Haskell2010 |
Regex.Internal.Debug
Description
This module provides functions for visualizing RE
s and Parser
s.
See here
for some examples.
Documentation
reToDot :: Maybe ([c], [c] -> String) -> RE c a -> String Source #
Generate a Graphviz DOT
visualization of a RE
. Optionally takes an alphabet [c]
, which will be
tested against the token
functions in the RE
and accepted characters
displayed.
parserToDot :: Maybe ([c], [c] -> String) -> Parser c a -> String Source #
Generate a Graphviz DOT
visualization of a Parser
. Optionally takes an alphabet [c]
, which will
be tested against the token
functions in the Parser
and the accepted
characters displayed.
dispCharRanges :: [Char] -> String Source #
>>>
dispCharRanges "abc012def"
"[('0','2'),('a','f')]"