module TextParser.Parser where

{-IMPORTS-}
import TextData.Data
import Text.Parsec
import Text.Parsec.String
import TextParser.Body
import TextParser.Header
import Text.Parsec
import Text.Parsec.Language (haskellDef)


{-FINAL FlashText Parser-}
parseFlashText :: Parser FlashText
parseFlashText = parseFlashText1 <|> parseFlashText2
    where parseFlashText2 = FlashText2  <$> parseBody
          parseFlashText1 = parseHeader >>= text1Help
          text1Help x     = parseBody   >>= return . FlashText1 x
