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

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

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]

Properties

Versions 0.1.0.0, 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-25T04:54:21Z

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for egison-pattern-src-0.1.0.0

[back to package description]

Egison Pattern Source

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.