Highly customizable language front-end, aimed to be a base for custom DSL evaluators.
Project description
XFormula
Highly customizable language front-end, aimed to be a base for custom DSL evaluators.
Developer note: I've created this library to use in many of my projects and decided to publish the source code, because it may help somebody to write a DSL compiler or evaluator can get benefit from Python ecosystem, within a reasonable time.
I couldn't write documentation because of my tight schedule in these days. But I see the code as self-explanatory, feel free to read it if you're interested.
In the meantime, please note that this project is still in development.
Features:
- Built on top of Lark Parser Toolkit
-
- LALR(1), Earley and CYK parsing algorithms are supported by Lark; XFormula uses LALR(1) by default
- Automatic EBNF grammar generator via declarative Python functions (The final grammar generated using the default features can be found in out/Grammar.lark file)
- Modular featurization system to manipulate grammar and parser context dynamically.
- A ready-to-use compact dialect that supports some general purpose data types
and basic symbols
(See
xformula.syntax.ast
package)
See xformula.syntax.core.features
package and
xformula.syntax.core.operations.default_operator_precedences
module for more
information about the default behaviours.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file xformula-0.1.1.tar.gz
.
File metadata
- Download URL: xformula-0.1.1.tar.gz
- Upload date:
- Size: 46.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4086f17a1bfef0e8543ad33a70c5f1b1f1926d4bcee48df08db97900d76883d9 |
|
MD5 | 25f11d8c814f9265370b8bc1ce8fe267 |
|
BLAKE2b-256 | 26fb65deb358930be24856b75892d5774ca3b7dacc1b192ad754bddc8a404a48 |
File details
Details for the file xformula-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: xformula-0.1.1-py3-none-any.whl
- Upload date:
- Size: 144.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8a9df5ae24ba9027eed3417f639b939ef055048e75b6ba33bbe7debafcda682 |
|
MD5 | fbdda11c4ed168217f1ce5cf23636468 |
|
BLAKE2b-256 | 103e6b4fb541e819e8b9e501a113918ea1d6bb203902fb67b7bf0726ffd5a799 |