Copyright | 2012 Kei Hibino |
---|---|
License | BSD3 |
Maintainer | ex8k.hibino@gmail.com |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell98 |
This module includes a strict parser implementation for Text.Syntax.Poly.
- data Parser tok alpha
- runParser :: Parser tok alpha -> [tok] -> ErrorStack -> Result alpha tok
- data Result a tok
- = Good !a ![tok]
- | Bad !ErrorStack
- type ErrorStack = [ErrorString]
- runAsParser :: Eq tok => RunAsParser tok a ErrorStack
Syntax instance Parser type
Naive Parser
type. Parse [tok]
into alpha
.
runParser :: Parser tok alpha -> [tok] -> ErrorStack -> Result alpha tok Source
Function to run parser
type ErrorStack = [ErrorString] Source
Type to store error state
Poly- morphic wrapper of runParser
runAsParser :: Eq tok => RunAsParser tok a ErrorStack Source