rere-0.1: Regular-expressions extended with fixpoints for context-free powers

Safe HaskellSafe
LanguageHaskell2010

RERE.Gen

Description

Using RE to generate example Strings.

Synopsis

Documentation

generate Source #

Arguments

:: Int

star upper size

-> Int

fix unroll

-> RE Void 
-> Maybe (Gen String) 

Generate strings.

>>> runGen 42 $ generate 10 10 $ star_ (ch_ 'a')
"aaa"
>>> runGen 44 $ generate 10 10 $ star_ (ch_ 'a')
"aaaaaaaaaa"