BNFC-2.9.6.2: A compiler front-end generator.
Safe HaskellSafe-Inferred
LanguageHaskell2010

BNFC.Lexing

Synopsis

Documentation

data LexType Source #

Constructors

LexComment 
LexToken String 
LexSymbols 

Instances

Instances details
Show LexType Source # 
Instance details

Defined in BNFC.Lexing

Methods

showsPrec :: Int -> LexType -> ShowS

show :: LexType -> String

showList :: [LexType] -> ShowS

Eq LexType Source # 
Instance details

Defined in BNFC.Lexing

Methods

(==) :: LexType -> LexType -> Bool

(/=) :: LexType -> LexType -> Bool

mkRegMultilineComment :: String -> String -> Reg Source #

Create regex for multiline comments.

>>> debugPrint $ mkRegMultilineComment "<" ">"
'<'(char-'>')*'>'
>>> debugPrint $ mkRegMultilineComment "/*" "*/"
{"/*"}(char-'*')*'*'((char-["*/"])(char-'*')*'*'|'*')*'/'
>>> debugPrint $ mkRegMultilineComment "<!--" "-->"
{"<!--"}(char-'-')*'-'((char-'-')+'-')*'-'((char-["->"])(char-'-')*'-'((char-'-')+'-')*'-'|'-')*'>'

mkRegSingleLineComment :: String -> Reg Source #

Create regex for single line comments >>> debugPrint $ mkRegSingleLineComment "--" {"--"}char*'n'

debugPrint :: Reg -> IO () Source #