Skip to main content

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

MIT

Metadata

Release files for xformula 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xformula 0.1.1
File Size Uploaded Provenance
xformula-0.1.1.tar.gz 46.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for xformula 0.1.1
File Interpreter ABI Platform
xformula-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 191.1 kB

Release files / xformula-0.1.1.tar.gz

Download URL xformula-0.1.1.tar.gz
Size 46.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4086f17a1bfef0e8543ad33a70c5f1b1f1926d4bcee48df08db97900d76883d9
BLAKE2b-256 checksum
How to use checksums
26fb65deb358930be24856b75892d5774ca3b7dacc1b192ad754bddc8a404a48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.0

Release files / xformula-0.1.1-py3-none-any.whl

Download URL xformula-0.1.1-py3-none-any.whl
Size 144.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8a9df5ae24ba9027eed3417f639b939ef055048e75b6ba33bbe7debafcda682
BLAKE2b-256 checksum
How to use checksums
103e6b4fb541e819e8b9e501a113918ea1d6bb203902fb67b7bf0726ffd5a799
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.0

Security for xformula 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page