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]
Versions [faq] 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-02-26T09:16:15Z
Distributions NixOS:0.2.1.1
Downloads 999 total (104 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2020-02-26 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for egison-pattern-src-0.1.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 & p                 (and pattern)
    | p | p                 (or pattern)
    | !p                    (not pattern)
    | p op p                (user-defined infix pattern)
    | x                     (constructor pattern without argument)
    | (x p_1 p_2 ... p_n)   (constructor pattern with arguments)

License

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