Lexer.hs revision edf1cf81945b26f90b0a40bf1669099466e7e43e
module Lexer where
-- import Text.ParserCombinators.Parsec.Expr
import qualified Text.ParserCombinators.Parsec.Token as T
-------------------------------------------------------------------------------
-- The lexer
-------------------------------------------------------------------------------
lexer = T.makeTokenParser gmpDef
lexeme = T.lexeme lexer
parens = T.parens lexer
braces = T.braces lexer
semiSep = T.semiSep lexer
semiSep1 = T.semiSep1 lexer
commaSep = T.commaSep lexer
commaSep1 = T.commaSep1 lexer
whiteSpace = T.whiteSpace lexer
symbol = T.symbol lexer
identifier = T.identifier lexer
reserved = T.reserved lexer
natural = T.natural lexer
gmpDef
= haskellStyle
{ identStart = letter
, identLetter = alphaNum <|> oneOf "_'" -- ???
, opStart = opLetter gmpDef
, opLetter = oneOf "\\-<>/~[]"
, reservedOpNames = ["~","->","<-","<->","/\\","\\/","[]","<>"]
}
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------