razom-text-util-0.1.2.0: Common text/parsing tools for Razom language packages.

Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Razom.Types

Synopsis

Documentation

type Regex a = RE Char a Source

A regular expression over Unicode characters.

type PosRegex a = PosRE Char a Source

A position-aware regular expression over Unicode characters.

data LexError t Source

An error returned when applying a regex fails. Parameters:

  1. Location of the error
  2. Previous tokens parsed successfully
  3. The rest of the text

Constructors

LexError Position [t] String 

Instances

Show t => Show (LexError t) 

type LexResult t = Either (LexError t) [t] Source

What is returned by lexical analyzer.