egison-pattern-src: Manipulating Egison patterns: abstract syntax, parser, and pretty-printer

[ bsd3, language, library, parser, pretty-printer ] [ Propose Tags ]

egison-pattern-src provides a standalone syntax definition for patterns in Egison programming language. This package enables you to embed Egison's patterns in your parser (pretty-printer) by supplying expression and name parsers (printers) externally.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.1.0, 0.2.0.0, 0.2.1.0, 0.2.1.1, 0.2.1.2
Change log CHANGELOG.md
Dependencies base (>=4.8 && <5), containers (>=0.5.4 && <0.7), free (>=5.0.1 && <5.2), megaparsec (>=7.0.0 && <8.1), mtl (>=2.2.1 && <2.3), parser-combinators (>=1.0.0 && <1.3), prettyprinter (>=1.0.0 && <1.7), recursion-schemes (>=5.0.2 && <5.2), text (>=0.1.0 && <1.3) [details]
License BSD-3-Clause
Copyright Copyright 2020 coord_e
Author coord_e
Maintainer coord_e <me@coord-e.com>, Satoshi Egi <egi@egison.org>
Category Language, Parser, Pretty Printer
Home page https://github.com/egison/egison-pattern-src#readme
Bug tracker https://github.com/egison/egison-pattern-src/issues
Source repo head: git clone https://github.com/egison/egison-pattern-src
Uploaded by coord_e at 2020-03-04T07:34:13Z
Distributions LTSHaskell:0.2.1.2, Stackage:0.2.1.2
Reverse Dependencies 4 direct, 3 indirect [details]
Downloads 1905 total (19 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-03-04 [all 1 reports]

Readme for egison-pattern-src-0.2.1.0

[back to package description]

Egison Pattern Source

Actions Status Actions Status Hackage Hackage Deps

The egison-pattern-src provides a standalone syntax definition for patterns in Egison programming language. This package enables you to embed Egison's patterns in your parser (pretty-printer) by supplying expression and name parsers (printers) externally.

Syntax

The following is a simplified syntax of pattern expressions where x, v, op and e are respectively names, variable names, user-defined infix operators and expressions in host language.

p ::= _                     (wildcard pattern)
    | $v                    (pattern variable)
    | #e                    (value pattern)
    | ?e                    (predicate pattern)
    | (p_1, p_2, ..., p_n)  (tuple pattern)
    | [p_1, p_2, ..., p_n]  (collection pattern)
    | p & p                 (and pattern)
    | p | p                 (or pattern)
    | !p                    (not pattern)
    | p op p                (user-defined infix pattern)
    | x p_1 p_2 ... p_n     (constructor pattern)

License

egison-pattern-src is distributed as open source software under the terms of the 3 clause BSD License. See LICENSE for details.