Hets - the Heterogeneous Tool Set

Copyright(c) Christian Maeder and Uni Bremen 2002-2005
LicenseGPLv2 or higher, see LICENSE.txt
MaintainerChristian.Maeder@dfki.de
Stabilityprovisional
Portabilityportable
Safe HaskellSafe

Common.Lexer

Contents

Description

Scanner for Casl tokens using Parsec http://www.cs.uu.nl/~daan/parsec.html according to chapter II.4 (Lexical Symbols) of the CASL reference manual

Synopsis

positions from Text.ParserCombinators.Parsec.Pos starting at (1,1)

isSignChar :: Char -> Bool Source #

no-bracket-signs (excluding mu!)

semis :: CharParser st String Source #

scanAnySigns :: CharParser st String Source #

caslLetters :: Char -> Bool Source #

casl letters (all isAlpha including feminine and masculine ordinal and mu)

caslLetter :: CharParser st Char Source #

scanLPD :: CharParser st Char Source #

ParsecCombinator extension

myLookAhead :: GenParser tok st a -> GenParser tok st a Source #

followedWith :: GenParser tok st a -> GenParser tok st b -> GenParser tok st a Source #

checkWithUsing :: (a -> String) -> GenParser tok st a -> (a -> Bool) -> GenParser tok st a Source #

checkWith :: Show a => GenParser tok st a -> (a -> Bool) -> GenParser tok st a Source #

separatedBy :: GenParser tok st a -> GenParser tok st b -> GenParser tok st ([a], [b]) Source #

casl words

scanLetterWord :: CharParser st String Source #

singleUnderline :: CharParser st Char Source #

scanUnderlineWord :: CharParser st String Source #

scanAnyWords :: CharParser st String Source #

scanDot :: CharParser st Char Source #

scanDotWords :: CharParser st String Source #

casl escape chars for quoted chars and literal strings

value :: Int -> String -> Int Source #

digits :: Int -> Int -> Int Source #

valueCheck :: Int -> String -> Bool Source #

simpleEscape :: CharParser st String Source #

decEscape :: CharParser st String Source #

hexEscape :: CharParser st String Source #

octEscape :: CharParser st String Source #

escapeChar :: CharParser st String Source #

chars for quoted chars and literal strings

printable :: CharParser st String Source #

caslChar :: CharParser st String Source #

scanQuotedChar :: CharParser st String Source #

scanString :: CharParser st String Source #

isString :: Token -> Bool Source #

parseString :: CharParser () a -> String -> a Source #

splitString :: CharParser () a -> String -> (a, String) Source #

digit, number, fraction, float

getNumber :: CharParser st String Source #

getSignedNumber :: CharParser st String Source #

scanFloat :: CharParser st String Source #

scanFloatExt :: CharParser st String Source #

In addition to scanFloat, also '1.', '.1' and '2.e-13' are recognized as well as preceding signs +-.

scanDigit :: CharParser st String Source #

isNumber :: Token -> Bool Source #

skip whitespaces and nested comment out

nestCommentOut :: CharParser st () Source #

skip :: CharParser st () Source #

fromSourcePos :: SourcePos -> Pos Source #

getPos :: GenParser tok st Pos Source #

skipSmart :: CharParser st () Source #

keywords WORDS or NO-BRACKET-SIGNS

keyWord :: CharParser st a -> CharParser st a Source #

keySign :: CharParser st a -> CharParser st a Source #

lexical tokens with position

parseToken :: CharParser st String -> CharParser st Token Source #

pToken :: CharParser st String -> CharParser st Token Source #

pluralKeyword :: String -> CharParser st Token Source #

toKey :: String -> CharParser st String Source #

check for keywords (depending on lexem class)

some separator parsers

asSeparator :: String -> CharParser st Token Source #

commaT :: CharParser st Token Source #

semiT :: CharParser st Token Source #

oBraceT :: CharParser st Token Source #

cBraceT :: CharParser st Token Source #

oBracketT :: CharParser st Token Source #

cBracketT :: CharParser st Token Source #

oParenT :: CharParser st Token Source #

cParenT :: CharParser st Token Source #

braces :: CharParser st a -> CharParser st a Source #

brackets :: CharParser st a -> CharParser st a Source #

parens :: CharParser st a -> CharParser st a Source #

commaSep1 :: CharParser st a -> CharParser st [a] Source #

placeS :: CharParser st String Source #

placeT :: CharParser st Token Source #

notFollowedWith :: GenParser tok st a -> GenParser tok st b -> GenParser tok st a Source #