-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | YAML reference implementation
--
-- This package contains "the" reference YAML syntax parser
-- (Text.Yaml.Reference), generated directly from the YAML
-- specifications, as well as sample program (yaml2yeast) that
-- allows accessing it from the command line, converting YAML files to
-- YEAST tokens. This is intended to be more of an "executable
-- specification" for YAML rather than an actual basis for YAML tool
-- chains. That said, it is possible to build interesting tools on top of
-- it, such as the yeast2html YAML syntax visualizer (contained
-- in this package), pretty printers, etc. This is a streaming parser
-- that will "immediately" begin to generate output. Updated to be
-- compatible with the final Apr 1, 2009 YAML 1.2 spec.
@package YamlReference
@version 0.9.3
-- | 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").
module Text.Yaml.Reference
-- | Token codes.
data Code
-- | BOM, contains "TF8", "TF16LE", "TF32BE",
-- etc.
Bom :: Code
-- | Content text characters.
Text :: Code
-- | Non-content (meta) text characters.
Meta :: Code
-- | Separation line break.
Break :: Code
-- | Line break normalized to content line feed.
LineFeed :: Code
-- | Line break folded to content space.
LineFold :: Code
-- | Character indicating structure.
Indicator :: Code
-- | Separation white space.
White :: Code
-- | Indentation spaces.
Indent :: Code
-- | Document start marker.
DirectivesEnd :: Code
-- | Document end marker.
DocumentEnd :: Code
-- | Begins escape sequence.
BeginEscape :: Code
-- | Ends escape sequence.
EndEscape :: Code
-- | Begins comment.
BeginComment :: Code
-- | Ends comment.
EndComment :: Code
-- | Begins directive.
BeginDirective :: Code
-- | Ends directive.
EndDirective :: Code
-- | Begins tag.
BeginTag :: Code
-- | Ends tag.
EndTag :: Code
-- | Begins tag handle.
BeginHandle :: Code
-- | Ends tag handle.
EndHandle :: Code
-- | Begins anchor.
BeginAnchor :: Code
-- | Ends anchor.
EndAnchor :: Code
-- | Begins node properties.
BeginProperties :: Code
-- | Ends node properties.
EndProperties :: Code
-- | Begins alias.
BeginAlias :: Code
-- | Ends alias.
EndAlias :: Code
-- | Begins scalar content.
BeginScalar :: Code
-- | Ends scalar content.
EndScalar :: Code
-- | Begins sequence content.
BeginSequence :: Code
-- | Ends sequence content.
EndSequence :: Code
-- | Begins mapping content.
BeginMapping :: Code
-- | Ends mapping content.
EndMapping :: Code
-- | Begins mapping key:value pair.
BeginPair :: Code
-- | Ends mapping key:value pair.
EndPair :: Code
-- | Begins complete node.
BeginNode :: Code
-- | Ends complete node.
EndNode :: Code
-- | Begins document.
BeginDocument :: Code
-- | Ends document.
EndDocument :: Code
-- | Begins YAML stream.
BeginStream :: Code
-- | Ends YAML stream.
EndStream :: Code
-- | Parsing error at this point.
Error :: Code
-- | Unparsed due to errors (or at end of test).
Unparsed :: Code
-- | Detected parameter (for testing).
Detected :: Code
-- | Parsed token.
data Token
-- | 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 (if the Bool is True). Note that
-- tokens are available "immediately", allowing for streaming of large
-- YAML files with memory requirements depending only on the YAML nesting
-- level.
type Tokenizer = String -> ByteString -> Bool -> [Token]
-- | 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!
yaml :: Tokenizer
-- | Production context.
data Context
-- | Chomp method.
data Chomp
-- | tokenizer name converts the production with the specified
-- name to a simple Tokenizer, or Nothing if it
-- isn't known.
tokenizer :: String -> (Maybe Tokenizer)
-- | 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.
tokenizerWithN :: String -> Int -> Maybe Tokenizer
-- | 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.
tokenizerWithC :: String -> Context -> Maybe Tokenizer
-- | 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.
tokenizerWithT :: String -> Chomp -> Maybe Tokenizer
-- | 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.
tokenizerWithNC :: String -> Int -> Context -> Maybe Tokenizer
-- | 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.
tokenizerWithNT :: String -> Int -> Chomp -> Maybe Tokenizer
-- | tokenizerNames returns the list of all productions
-- (tokenizers).
tokenizerNames :: [String]
-- | showTokens tokens converts a list of tokens to a
-- multi-line YEAST text.
showTokens :: [Token] -> String
instance Eq Code
instance Read Chomp
instance Show Chomp
instance Read Context
instance Show Context
instance Monad Parser
instance Match String ()
instance Match (Char, Char) ()
instance Match Char ()
instance Match (Parser result) result
instance Show State
instance Show result => Show (Reply result)
instance Show result => Show (Result result)
instance Show Token
instance Show Code
instance Show Encoding