Skip to main content

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.

Metadata

Release files for fhy-lang 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 fhy-lang 0.1.1
File Size Uploaded
fhy_lang-0.1.1.tar.gz 95.8 kB Details

Built distribution (wheel)

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

Total release size: 216.7 kB

Release files / fhy_lang-0.1.1.tar.gz

Download URL fhy_lang-0.1.1.tar.gz
Size 95.8 kB
Tags Source
SHA-256 checksum
How to use checksums
727cbe2de85a3f50600c41747af181cae315a98f18e5cebd61b181af38cd6d43
BLAKE2b-256 checksum
How to use checksums
2c69acdab448a1cf2704e31a148581a09e6aa27b033084350887f20f875105a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

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

Download URL fhy_lang-0.1.1-py3-none-any.whl
Size 120.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ecc09e3b8dac34d1b6e98568355e7015806281e817c2fe7753fa0be4d14df91
BLAKE2b-256 checksum
How to use checksums
195d621132f6e98ced0ff60065894342221f68d2d91c260c95d29aa1f67cf03a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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