camfort-0.904: CamFort - Cambridge Fortran infrastructure

Copyright(c) 2017 Dominic Orchard Andrew Rice Mistral Contrastin Matthew Danish
LicenseApache-2.0
Maintainerdom.orchard@gmail.com
Stabilityexperimental
Safe HaskellSafe
LanguageHaskell2010

Camfort.Specification.Parser

Contents

Description

 

Synopsis

Specification Parsers

data SpecParser e r Source #

Parser for specifications of type r that may fail with error type e.

looksLikeASpec :: SpecParser e r -> String -> Bool Source #

Check if a comment is probably an attempt at a specification that can be parsed by the given parser.

mkParser Source #

Arguments

:: (String -> Either e r)

Parser with error type e and result type r.

-> [String]

Keywords that indicate the type of specification.

-> SpecParser e r 

Define a specification parser.

runParser :: SpecParser e r -> String -> Either (SpecParseError e) r Source #

Run the given parser on a string to produce a specification (or a reason why it couldn't be parsed).

Errors

parseError :: e -> SpecParseError e Source #

Embed an error as a specification parse error.