-- //     [14] block(n) ::= scalar '\' space? break (space(>n) (char_word | char_space)* break)+

-- // A block is a scalar leaf node, i.e., it cannot be parent of other
-- // nodes. It is to be used for holding a block of literal text. The
-- // only transformation that it undergoes is leading space stripping,
-- // according to the indentation rules. A block is child of the scalar
-- // that starts it.

block = do s <- scalar
           char '\\' >> many spaceChar >> lineBreak
           d <- liftM length (many spaceChar)
           l <- many (allowedChar <|> spaceChar)
           lineBreak
           ls <-  try (count d spaceChar >> many ( allowedChar <|> spaceChar )) `sepEndBy` lineBreak
           let txt = intercalate "\n" (l:ls) 
           return $ [Node s [(Node txt [] )] ]

-- //     [15] list ::= (scalar|group) ( (space? ',')? space? (scalar|group) )*

-- this doesn't seem accurate, or terribly useful, let me try:

-- [15.1] node ::= scalar ( (space* group) | (space+ node) )
--
-- [15.2] list ::= (node|group) ( (space* ',' ) (node|group) )*
block = do s <- scalar
           char '\\' >> many spaceChar >> lineBreak
           d <- liftM length (many spaceChar)
           l <- many (allowedChar <|> spaceChar)
           lineBreak
           ls <-  try (count d spaceChar >> many ( allowedChar <|> spaceChar )) `sepEndBy` lineBreak
           let txt = intercalate "\n" (l:ls) 
           return $ [Node s [(Node txt [] )] ]

-- //     [15] list ::= (scalar|group) ( (space? ',')? space? (scalar|group) )*

-- this doesn't seem accurate, or terribly useful, let me try:

-- [15.1] node ::= scalar ( (space* group) | (space+ node) )
--
-- [15.2] list ::= (node|group) ( (space* ',' ) (node|group) )*
block = do s <- scalar
           char '\\' >> many spaceChar >> lineBreak
           d <- liftM length (many spaceChar)
           l <- many (allowedChar <|> spaceChar)
           lineBreak
           ls <-  try (count d spaceChar >> many ( allowedChar <|> spaceChar )) `sepEndBy` lineBreak
           let txt = intercalate "\n" (l:ls) 
           return $ [Node s [(Node txt [] )] ]

-- //     [15] list ::= (scalar|group) ( (space? ',')? space? (scalar|group) )*

-- this doesn't seem accurate, or terribly useful, let me try:

-- [15.1] node ::= scalar ( (space* group) | (space+ node) )
--
-- [15.2] list ::= (node|group) ( (space* ',' ) (node|group) )*