happy-arbitrary
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Alex.Ast

Description

An Alex lexer, as far as generating text for its tokens needs it. Macros are expanded while parsing, so a regex stands on its own.

Synopsis

Documentation

newtype AlexFile Source #

The rules of a lexer, in order.

Constructors

AlexFile 

Fields

Instances

Instances details
Generic AlexFile Source # 
Instance details

Defined in Language.Alex.Ast

Associated Types

type Rep AlexFile 
Instance details

Defined in Language.Alex.Ast

type Rep AlexFile = D1 ('MetaData "AlexFile" "Language.Alex.Ast" "happy-arbitrary-0.0.3-inplace" 'True) (C1 ('MetaCons "AlexFile" 'PrefixI 'True) (S1 ('MetaSel ('Just "alexRules") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Rule])))

Methods

from :: AlexFile -> Rep AlexFile x #

to :: Rep AlexFile x -> AlexFile #

Show AlexFile Source # 
Instance details

Defined in Language.Alex.Ast

Eq AlexFile Source # 
Instance details

Defined in Language.Alex.Ast

Ord AlexFile Source # 
Instance details

Defined in Language.Alex.Ast

type Rep AlexFile Source # 
Instance details

Defined in Language.Alex.Ast

type Rep AlexFile = D1 ('MetaData "AlexFile" "Language.Alex.Ast" "happy-arbitrary-0.0.3-inplace" 'True) (C1 ('MetaCons "AlexFile" 'PrefixI 'True) (S1 ('MetaSel ('Just "alexRules") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Rule])))

data CharSet Source #

A set of characters: these characters, or all characters but these.

Constructors

Only (Set Char) 
AllBut (Set Char) 

Instances

Instances details
Generic CharSet Source # 
Instance details

Defined in Language.Alex.Ast

Associated Types

type Rep CharSet 
Instance details

Defined in Language.Alex.Ast

type Rep CharSet = D1 ('MetaData "CharSet" "Language.Alex.Ast" "happy-arbitrary-0.0.3-inplace" 'False) (C1 ('MetaCons "Only" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Set Char))) :+: C1 ('MetaCons "AllBut" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Set Char))))

Methods

from :: CharSet -> Rep CharSet x #

to :: Rep CharSet x -> CharSet #

Show CharSet Source # 
Instance details

Defined in Language.Alex.Ast

Eq CharSet Source # 
Instance details

Defined in Language.Alex.Ast

Methods

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

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

Ord CharSet Source # 
Instance details

Defined in Language.Alex.Ast

type Rep CharSet Source # 
Instance details

Defined in Language.Alex.Ast

type Rep CharSet = D1 ('MetaData "CharSet" "Language.Alex.Ast" "happy-arbitrary-0.0.3-inplace" 'False) (C1 ('MetaCons "Only" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Set Char))) :+: C1 ('MetaCons "AllBut" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Set Char))))

data Regex Source #

A regex with its macros expanded.

Instances

Instances details
Generic Regex Source # 
Instance details

Defined in Language.Alex.Ast

Methods

from :: Regex -> Rep Regex x #

to :: Rep Regex x -> Regex #

Show Regex Source # 
Instance details

Defined in Language.Alex.Ast

Methods

showsPrec :: Int -> Regex -> ShowS #

show :: Regex -> String #

showList :: [Regex] -> ShowS #

Eq Regex Source # 
Instance details

Defined in Language.Alex.Ast

Methods

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

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

Ord Regex Source # 
Instance details

Defined in Language.Alex.Ast

Methods

compare :: Regex -> Regex -> Ordering #

(<) :: Regex -> Regex -> Bool #

(<=) :: Regex -> Regex -> Bool #

(>) :: Regex -> Regex -> Bool #

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

max :: Regex -> Regex -> Regex #

min :: Regex -> Regex -> Regex #

type Rep Regex Source # 
Instance details

Defined in Language.Alex.Ast

data Rule Source #

A lexer rule: where it applies, what it matches, and its action.

Constructors

Rule 

Fields

Instances

Instances details
Generic Rule Source # 
Instance details

Defined in Language.Alex.Ast

Associated Types

type Rep Rule 
Instance details

Defined in Language.Alex.Ast

type Rep Rule = D1 ('MetaData "Rule" "Language.Alex.Ast" "happy-arbitrary-0.0.3-inplace" 'False) (C1 ('MetaCons "Rule" 'PrefixI 'True) (S1 ('MetaSel ('Just "ruleStartCodes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text]) :*: (S1 ('MetaSel ('Just "ruleRegex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Regex) :*: S1 ('MetaSel ('Just "ruleCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

Methods

from :: Rule -> Rep Rule x #

to :: Rep Rule x -> Rule #

Show Rule Source # 
Instance details

Defined in Language.Alex.Ast

Methods

showsPrec :: Int -> Rule -> ShowS #

show :: Rule -> String #

showList :: [Rule] -> ShowS #

Eq Rule Source # 
Instance details

Defined in Language.Alex.Ast

Methods

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

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

Ord Rule Source # 
Instance details

Defined in Language.Alex.Ast

Methods

compare :: Rule -> Rule -> Ordering #

(<) :: Rule -> Rule -> Bool #

(<=) :: Rule -> Rule -> Bool #

(>) :: Rule -> Rule -> Bool #

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

max :: Rule -> Rule -> Rule #

min :: Rule -> Rule -> Rule #

type Rep Rule Source # 
Instance details

Defined in Language.Alex.Ast

type Rep Rule = D1 ('MetaData "Rule" "Language.Alex.Ast" "happy-arbitrary-0.0.3-inplace" 'False) (C1 ('MetaCons "Rule" 'PrefixI 'True) (S1 ('MetaSel ('Just "ruleStartCodes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text]) :*: (S1 ('MetaSel ('Just "ruleRegex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Regex) :*: S1 ('MetaSel ('Just "ruleCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))