string-random-0.1.4.2: A library for generating random string from a regular experession
CopyrightCopyright (C) 2016- hiratara
LicenseGPL-3
Maintainerhiratara@cpan.org
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.StringRandom.Parser

Description

Parse the regular expression so that it can be used with the Text.StringRandom module.

See String_random.js

Synopsis

Documentation

data Parsed Source #

Abstract syntax tree of parsed regular expression

Constructors

PClass [Char]
abc
, d, [^abc]
PRange Int (Maybe Int) Parsed

X*, X{1,2}, X+, X?

PConcat [Parsed]

XYZ

PSelect [Parsed]

X|Y|Z

PGrouped Int Parsed

(X)

PBackward Int

1, 2, ..., 9

PIgnored

^, $, b

Instances

Instances details
Eq Parsed Source # 
Instance details

Defined in Text.StringRandom.Parser

Methods

(==) :: Parsed -> Parsed -> Bool #

(/=) :: Parsed -> Parsed -> Bool #

Show Parsed Source # 
Instance details

Defined in Text.StringRandom.Parser

processParse :: Text -> Either String Parsed Source #

processParse parses the regular expression string and returns an abstract syntax tree. If there is an error in the regular expression, it returns the Left value.