Skip to main content

Cross-domain-language frontend for the FhY compiler framework.

Project description

FhY Language and Frontend

PyPI version Python versions CI

A Language for Modeling Physical Things

FhY is a cross-domain language with mathematical foundations that moves beyond the current paradigm of domain-specific languages to enable cross-domain multi-acceleration.

This package provides the user-facing surface of the compiler: the FhY source language, its grammar and parser (built on ANTLR), the AST definitions, and the driver that turns a FhY source program into a fully-constructed AST module and symbol table ready to be consumed by downstream compilation stages.

Features

  • FhY grammar and ANTLR-generated parser
  • Abstract syntax tree (AST) definitions and pretty-printing utilities
  • Parse-tree-to-AST conversion
  • Symbol table construction
  • Compilation driver with configurable options (verbose logging, optimization)
  • AST serialization to JSON or human-readable pretty-printed formats

Command Line Interface

Installing the package exposes the compile-fhy-lang command:

compile-fhy-lang --help
compile-fhy-lang --version

Compile and serialize a FhY source program

compile-fhy-lang serialize path/to/main.fhy [OPTIONS]

Common options:

  • --format, -f {json,pretty,prettyid} - serialization format for the resulting AST
  • --indent, -i N - indentation width for human-readable output
  • --verbose - enable debug-level logging
  • --optimize - enable frontend optimizations
  • --log-file PATH - write logs to the given file

If no --format is provided, the program is compiled but no serialized output is emitted.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fhy_lang-0.1.1.tar.gz (95.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fhy_lang-0.1.1-py3-none-any.whl (120.9 kB view details)

Uploaded Python 3

File details

Details for the file fhy_lang-0.1.1.tar.gz.

File metadata

  • Download URL: fhy_lang-0.1.1.tar.gz
  • Upload date:
  • Size: 95.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for fhy_lang-0.1.1.tar.gz
Algorithm Hash digest
SHA256 727cbe2de85a3f50600c41747af181cae315a98f18e5cebd61b181af38cd6d43
MD5 ba4f8991ce938125bcc13c8d6f0b0b21
BLAKE2b-256 2c69acdab448a1cf2704e31a148581a09e6aa27b033084350887f20f875105a1

See more details on using hashes here.

File details

Details for the file fhy_lang-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fhy_lang-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 120.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for fhy_lang-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9ecc09e3b8dac34d1b6e98568355e7015806281e817c2fe7753fa0be4d14df91
MD5 50a9890510af4a560f9445d78739aac0
BLAKE2b-256 195d621132f6e98ced0ff60065894342221f68d2d91c260c95d29aa1f67cf03a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page