Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/SupraSummus/dhall-python
Work in progress pure python dhall interpreter
https://github.com/SupraSummus/dhall-python
dhall
Last synced: 3 months ago
JSON representation
Work in progress pure python dhall interpreter
- Host: GitHub
- URL: https://github.com/SupraSummus/dhall-python
- Owner: SupraSummus
- License: mit
- Created: 2018-10-30T19:21:46.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-23T08:35:50.000Z (almost 6 years ago)
- Last Synced: 2024-06-11T00:12:19.942Z (5 months ago)
- Topics: dhall
- Language: Python
- Size: 148 KB
- Stars: 26
- Watchers: 6
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Dhall for python
================[![Build Status](https://travis-ci.com/SupraSummus/dhall-python.svg?branch=master)](https://travis-ci.com/SupraSummus/dhall-python)
[![codecov](https://codecov.io/gh/SupraSummus/dhall-python/branch/master/graph/badge.svg)](https://codecov.io/gh/SupraSummus/dhall-python)Pure python implementation of [dhall](https://github.com/dhall-lang/dhall-lang) language.
**Work in progres**
python setup.py build # to patch the grammar and compile parser tables
python setup.py test # to run tests
flake8 # to lint the code
make abnf_patch # to make changes to dhall.abnf persistentStatus
------* [x] parsing
All tests from acceptance test suite pass, except AST is not checked against CBOR.
* [ ] typechecking / evaluating / normalizingSome tests from acceptance test suite pass, but typechecking infrastructure needs to be havily reworked.
* [ ] import resolution
* [ ] loading from / dumping to binary
* [ ] (pretty)printing expressions
There is some code responsible for printing for type errors explanation, but it's incomplete and does not properly support precedence.Details
-------Parsing is done using [parglare](https://github.com/igordejanovic/parglare) GLR parser library. `grammar.abnf` from dhall-lang repository is first patched, then converted into GLR parser tables. Take a look at [`setup.py`](setup.py), how it's done.
Acceptance tests comes from dhall-lang repository. They are then triggered during unit testing using awesome [parametrized package](https://github.com/wolever/parameterized). Take a look at [`tests/test_acceptance.py`](tests/test_acceptance.py).
To check what dhall-python is capable of parsing call something like
cat dhall-haskell/tests/parser/annotations.dhall | dhall-python-parse