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.0.tar.gz (95.9 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.0-py3-none-any.whl (121.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fhy_lang-0.1.0.tar.gz
  • Upload date:
  • Size: 95.9 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.0.tar.gz
Algorithm Hash digest
SHA256 2e228fa865b4106e13d9091cdcfdb1d6d06393cb10e626c06c4251f6481ec1f6
MD5 5a4bcaad66a61c264b264dd13464248e
BLAKE2b-256 bd47b8c40d04939be1eb589a23516b9fa661b95514bf8e8a2cd7454110e5f531

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fhy_lang-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 121.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9e1298ffd3a0ea1c9448dfe3290481ad1e4168412aa6cd8da03345dc2341385
MD5 1420a1a8a75dc069ae8c51b3e108f6d9
BLAKE2b-256 438b0cc1b2bcc42e2772498e0d08ba885bb47762d46c93f2f8300768bc9d68dc

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