CSPM-Frontend-0.12.1.0: A CSP-M parser compatible with FDR-2.91

Safe HaskellNone
LanguageHaskell2010

Language.CSPM.LexHelper

Synopsis

Documentation

lexPlain :: String -> Either LexError [Token] Source #

lex a String .

unicodeTokenString :: Token -> String Source #

Convert a token to a String. If the tokenClasss has a Unicode symbol return the default Unicode string.

asciiTokenString :: Token -> String Source #

Convert a token to a String. If the tokenClasss has a Unicode symbol return the default ASCII string.

type Chunk = [Token] Source #

lexInclude :: String -> IO (Either LexError [Token]) Source #

lex input-string and inport all includes files

splitIncludes :: [Token] -> [Token] -> Either LexError [FilePart] Source #

micro-parser for include-statements

removeIgnoredToken :: [Token] -> [Token] Source #

Remove comments, whitespaces and unneeded newlines.

tokenIsComment :: Token -> Bool Source #

Is the token a line-comment, block-comment or a Pragma?

soakNewlines :: [Token] -> [Token] Source #

remove newlines, that do not end a declaration from the token stream. For example newlines next to binary operators. Remove all trailing newlines.