YamlReference-0.6: YAML reference implementationSource codeContentsIndex
Text.Yaml.Reference
Portabilityportable
Stabilityalpha
Maintaineryaml-oren@ben-kiki.org
Description

Implementation of the YAML syntax as defined in http://www.yaml.org. Actually this file contains the parsing framework and includes (using CPP) the actual productions from Reference.bnf.

The parsing framework is fully streaming (generates output tokens "immediately"). The memory leak that existed in previous version has been plugged.

Synopsis
data Code
data Token
type Tokenizer = String -> ByteString -> Bool -> [Token]
yaml :: Tokenizer
data Context
data Style
data Chomp
tokenizer :: String -> Maybe Tokenizer
tokenizerWithN :: String -> Int -> Maybe Tokenizer
tokenizerWithC :: String -> Context -> Maybe Tokenizer
tokenizerWithS :: String -> Style -> Maybe Tokenizer
tokenizerWithT :: String -> Chomp -> Maybe Tokenizer
tokenizerWithNC :: String -> Int -> Context -> Maybe Tokenizer
tokenizerWithNS :: String -> Int -> Style -> Maybe Tokenizer
tokenizerWithNT :: String -> Int -> Chomp -> Maybe Tokenizer
tokenizerNames :: [String]
showTokens :: [Token] -> String
Documentation
data Code Source
Token codes.
show/hide Instances
data Token Source
Parsed token.
show/hide Instances
type Tokenizer = String -> ByteString -> Bool -> [Token]Source
Tokenizer converts a (named) input text into a list of Token. Errors are reported as tokens with the Error Code, and the unparsed text following an error may be attached as a final token.
yaml :: TokenizerSource
yaml name input converts the Unicode input (called name in error messages) to a list of Token according to the YAML spec. This is it!
data Context Source
Production context.
show/hide Instances
data Style Source
Scalar style.
show/hide Instances
data Chomp Source
Chomp method.
show/hide Instances
tokenizer :: String -> Maybe TokenizerSource
tokenizer name converts the production with the specified name to a simple Tokenizer, or Nothing if it isn't known.
tokenizerWithN :: String -> Int -> Maybe TokenizerSource
tokenizerWithN name n converts the production (that requires an n argument) with the specified name to a simple Tokenizer, or Nothing if it isn't known.
tokenizerWithC :: String -> Context -> Maybe TokenizerSource
tokenizerWithC name c converts the production (that requires a c argument) with the specified name to a simple Tokenizer, or Nothing if it isn't known.
tokenizerWithS :: String -> Style -> Maybe TokenizerSource
tokenizerWithS name s converts the production (that requires an s argument) with the specified name to a simple Tokenizer, or Nothing if it isn't known.
tokenizerWithT :: String -> Chomp -> Maybe TokenizerSource
tokenizerWithT name t converts the production (that requires an t argument) with the specified name to a simple Tokenizer, or Nothing if it isn't known.
tokenizerWithNC :: String -> Int -> Context -> Maybe TokenizerSource
tokenizerWithNC name n c converts the production (that requires n and c arguments) with the specified name to a simple Tokenizer, or Nothing if it isn't known.
tokenizerWithNS :: String -> Int -> Style -> Maybe TokenizerSource
tokenizerWithNS name n s converts the production (that requires n and s arguments) with the specified name to a simple Tokenizer, or Nothing if it isn't known.
tokenizerWithNT :: String -> Int -> Chomp -> Maybe TokenizerSource
tokenizerWithNT name n t converts the production (that requires n and t arguments) with the specified name to a simple Tokenizer, or Nothing if it isn't known.
tokenizerNames :: [String]Source
tokenizerNames returns the list of all productions (tokenizers).
showTokens :: [Token] -> StringSource
showTokens tokens converts a list of tokens to a multi-line YEAST text.
Produced by Haddock version 2.3.0