| |||||||||
| |||||||||
| |||||||||
Description | |||||||||
parsing of interspersed annotations
| |||||||||
Synopsis | |||||||||
Documentation | |||||||||
type AParser a = GenParser Char AnnoState a | |||||||||
parsers that can collect annotations via side effects | |||||||||
aParse :: AParser a -> GenParser Char st a | |||||||||
convert an annotation parser, start without annotations and possibly ignore trailing annotations | |||||||||
data AnnoState | |||||||||
| |||||||||
emptyAnnos :: AnnoState | |||||||||
no annotations | |||||||||
parseAnnos :: AnnoState -> GenParser Char st AnnoState | |||||||||
add further annotations to the input state | |||||||||
parseLineAnnos :: AnnoState -> GenParser Char st AnnoState | |||||||||
add only annotations on consecutive lines to the input state | |||||||||
addAnnos :: AParser () | |||||||||
add annotations to the internal state | |||||||||
addLineAnnos :: AParser () | |||||||||
add only annotations on consecutive lines to the internal state | |||||||||
getAnnos :: AParser [Annotation] | |||||||||
extract all annotation from the internal state, resets the internal state to emptyAnnos | |||||||||
mLineAnnos :: GenParser Char st [Annotation] | |||||||||
annotations on consecutive lines | |||||||||
annos :: AParser [Annotation] | |||||||||
explicitly parse annotations, reset internal state | |||||||||
lineAnnos :: AParser [Annotation] | |||||||||
explicitly parse annotations on consecutive lines. reset internal state | |||||||||
optSemi :: AParser (Maybe Token, [Annotation]) | |||||||||
optional semicolon followed by annotations on consecutive lines | |||||||||
tryItemEnd :: [String] -> AParser () | |||||||||
succeeds if the previous item is finished | |||||||||
startKeyword :: [String] | |||||||||
keywords that indicate a new item for tryItemEnd. the quantifier exists does not start a new item. | |||||||||
annoParser :: AParser a -> AParser (Annoted a) | |||||||||
parse preceding annotations and the following item | |||||||||
annosParser :: AParser a -> AParser [Annoted a] | |||||||||
parse an item list preceded and followed by annotations | |||||||||
itemList :: String -> AParser b -> ([Annoted b] -> [Pos] -> a) -> AParser a | |||||||||
parse an item list preceded by a singular or plural keyword, interspersed with semicolons and an optional semicolon at the end | |||||||||
auxItemList :: [String] -> String -> AParser b -> ([Annoted b] -> [Pos] -> a) -> AParser a | |||||||||
generalized version of itemList for an other keyword list of tryItemEnd | |||||||||
itemAux :: [String] -> AParser a -> AParser ([a], [Token], [[Annotation]]) | |||||||||
parse an item list without a starting keyword | |||||||||
wrapAnnos :: AParser a -> AParser a | |||||||||
collect preceding and trailing annotations | |||||||||
asKey :: String -> AParser Token | |||||||||
parse an annoted keyword | |||||||||
annoted keywords | |||||||||
anComma :: AParser Token | |||||||||
commaT :: AParser Token | |||||||||
anSemi :: AParser Token | |||||||||
semiT :: AParser Token | |||||||||
equalT :: AParser Token | |||||||||
colonT :: AParser Token | |||||||||
lessT :: AParser Token | |||||||||
dotT :: AParser Token | |||||||||
asT :: AParser Token | |||||||||
barT :: AParser Token | |||||||||
forallT :: AParser Token | |||||||||
Produced by Haddock version 0.6 |