CoALP-0.0.6: Coalgebraic logic programming library

Safe HaskellNone
LanguageHaskell2010

CoALP.Parser.Lexer

Description

Alex the lexer

Synopsis

Documentation

data Alex a

Instances

Monad Alex 
Functor Alex 
Applicative Alex 

data Token

The token type:

Instances

Eq Token 
Show Token 

runAlex :: String -> Alex a -> Either String a

runAlex' :: String -> Alex a -> Either String (a, Integer)

Run alex monad and get user state counter

getVar :: Ident -> Alex Var

Get var counter from user state

scanTokens :: (Token -> Alex a) -> Alex a

Bind alex monad

clearVars :: Alex ()

Reset var counter

alexSynError :: Token -> Alex a

Syntactic error (unexpected token)