smt2-parser-0.1.0.1: A Haskell parser for SMT-LIB version 2.6
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.SMT2.Parser

Description

  • Module : Language.SMT2.Parser
  • Description : SMT language parser
  • Maintainer : ubikium@gmail.com
  • Stability : experimental
Synopsis

Utils

commonly used combinators

parseFileMsg :: Parser a -> Text -> Either Text a Source #

parse from a file string, may have leading & trailing spaces and comments

parseCommentFreeFileMsg :: Parser a -> Text -> Either Text a Source #

parse from a comment-free file string

stripSpaces :: GenParser st a -> GenParser st a Source #

strip away the leading and trailing spaces

removeComment :: Text -> Text Source #

remove comments

Lexicons (Sec. 3.1)

Parsers for lexicons.

For a numeral, a decimal, or a string literal, the parsed result is the same. For a hexadecimal or a binary, the result is stripped with marks (#x and #b).

reservedWord :: GenParser st ReservedWord Source #

accept all reserved words, the exact content should be checked later in the parsing procedure

symbol :: GenParser st Symbol Source #

enclosing a simple symbol in vertical bars does not produce a new symbol, e.g. abc and |abc| are the same symbol this is guaranteed by removing the bars

S-expressions (Sec. 3.2)

specConstant :: GenParser st SpecConstant Source #

a constant must be followed by a space to delimit the end

Identifiers (Sec 3.3)

Attributes (Sec. 3.4)

Sorts (Sec 3.5)

Terms and Formulas (Sec 3.6)

Theory declarations (Sec 3.7)

Logic Declarations (Sec 3.8)

Scripts (Sec 3.9)

Responses (Sec 3.9.1)

values

instances

Orphan instances