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-Inferred

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

no-bracket-signs (excluding mu!)

caslLetters :: Char -> Bool

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

ParsecCombinator extension

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

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

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

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

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

casl words

casl escape chars for quoted chars and literal strings

value :: Int -> String -> Int

digits :: Int -> Int -> Int

chars for quoted chars and literal strings

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

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

digit, number, fraction, float

scanFloatExt :: CharParser st String

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

skip whitespaces and nested comment out

skip :: CharParser st ()

getPos :: GenParser tok st Pos

keywords WORDS or NO-BRACKET-SIGNS

keyWord :: CharParser st a -> CharParser st a

keySign :: CharParser st a -> CharParser st a

lexical tokens with position

toKey :: String -> CharParser st String

check for keywords (depending on lexem class)

some separator parsers

braces :: CharParser st a -> CharParser st a

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

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