| Copyright | (c) Fontaine 2008 - 2011 |
|---|---|
| License | BSD3 |
| Maintainer | fontaine@cs.uni-duesseldorf.de, me@dobrikov.biz |
| Stability | experimental |
| Portability | GHC-only |
| Safe Haskell | None |
| Language | Haskell2010 |
Language.CSPM.Parser
Description
This modules defines a Parser for CSP-M
- parse :: SourceName -> [Token] -> Either ParseError ModuleFromParser
- data ParseError = ParseError {}
- testParser :: PT a -> [Token] -> Either ParseError a
- parseExp :: PT LExp
- parsePattern :: PT LPattern
- type PT a = GenParser Token PState a
Documentation
parse :: SourceName -> [Token] -> Either ParseError ModuleFromParser Source #
The parse function parses a List of Token.
It returns a ParseError or a Labled Module.
The SourceName argument is currently not used.
data ParseError Source #
ParseError data type. This is an instance of Excpetion
Constructors
| ParseError | |
Fields | |
Instances
testParser :: PT a -> [Token] -> Either ParseError a Source #
Wrapper for testing sub parsers
parsePattern :: PT LPattern Source #
Parser for CSP-M patterns