Skip to main content

Python-Compiler for Para-C

Reason this release was yanked:

Support dropped. Move to paralang-base.

Project description

parac - The Python Module for the Para-C Compiler

License Lines of Code Py Versions Documentation Status

Introduction to parac (as Python Module)

The parac module serves the purpose of combining the entire compiler with lib into a simple module, which can be imported and used in ways that are not implemented in the standard CLI. This means both the preprocessor and compiler are available for customisable usage.

Installation

python3 -m pip install -U parac

With specific version:

python3 -m pip install -U parac==version

Structure

Tree

parac - Main module that can be imported
|-- abc/
|  `-- *
|-- compiler/
|  `-- *
|-- preprocessor/
|  `-- *
|-- util/
|  `-- *
|-- const.py
|-- exceptions.py
`-- logging.py

Info

  • abc: ABC classes that are the base for many classes in preprocessor and compiler
  • compiler: Main Compiler module, which includes lexer, parser, semantic analyser, optimiser and code-generation (not completely implemented yet, due to active development still ongoing)
  • preprocessor: Pre-Processor module, which implements its own lexer and parser for processing files.
  • util: Module Utility functions, decorators and classes
  • const.py: Constant values, which are evaluated on __init__
  • exceptions.py: Module exceptions with error-codes ErrorCodes(IntEnum)
  • logging.py: Logging Implementation for the Module and CLI

Introduction to Para-C (as Language)

Para-C (From Greek "para": Beside/Alongside C) is a programming language that is designed to integrate other languages and allow for advanced management of embedded programs / code-bases inside a program, where the language will serve as a base for writing overhead and "connector" programs, which can manage instances, listen for events, stop and start processes and manage in- and out-data.

Documentation

Documentation Status

Documentations are available on the official readthedocs.org site, which builds for each repository on Para-C/Para-C the respective sphinx docs.

Note that the docs are still unfinished and full of things that will be likely changing the more development progresses. For finalisation, it might take until v0.2 or v0.3, so please be patient

Contributing and Development

Due to active and early development not available. (Can be expected with later versions, such as v0.1 or v0.2) - Reason for that is the there is not a lot that can be contributed to, since changes are made while the theory is made as well. This means contributions are going to be limited until the basic structure is finished.

Running Info

There are two different usage (run) options where the compiler can be used:

  • Python module, which is either the source code execution or usage of the imported module
  • Compiled distribution, which is the compiled version of Para-C, which included the CLI. Due to the difference in implementation, only this version can be configured, since the python module is intended for customised behaviour, meaning the pre-configured runtime options are not available.

To differentiate between the two, there are constant variables that are set during initialisation (Only one can be true, if one is true the other is automatically false):

  • DIST_COMPILED_VERSION: bool - If True it's the distribution version, aka. called using the compiled binaries
  • MODULE_VERSION: bool - If True it's the module version

Extensions

parac-ext-cli - CLI

The CLI is its own unique project, as the main compiler is a native python project, which is used using the normal Python interpreter. Therefore, it also has its own pypi release site, which can be found here.

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

parac-0.1.dev6.tar.gz (144.4 kB view details)

Uploaded Source

Built Distribution

parac-0.1.dev6-py3-none-any.whl (156.3 kB view details)

Uploaded Python 3

File details

Details for the file parac-0.1.dev6.tar.gz.

File metadata

  • Download URL: parac-0.1.dev6.tar.gz
  • Upload date:
  • Size: 144.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for parac-0.1.dev6.tar.gz
Algorithm Hash digest
SHA256 f7641dd909ba807bc7bb13c5bf5c6e00984687ad0c455d0f602f2f6f8cc903d5
MD5 eda235221eb477f713cf218ea457e1c6
BLAKE2b-256 151830fcca44e55ca43045d3890cb0825e4ec1d0578dbfb32d4edb1eb72d5762

See more details on using hashes here.

File details

Details for the file parac-0.1.dev6-py3-none-any.whl.

File metadata

  • Download URL: parac-0.1.dev6-py3-none-any.whl
  • Upload date:
  • Size: 156.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for parac-0.1.dev6-py3-none-any.whl
Algorithm Hash digest
SHA256 32b4fda4542661848d613219da0ac98c9537804f81f4f3efe52e5820816f5728
MD5 b9c540b09fed318437d00ee0ccd97310
BLAKE2b-256 54848720e995a5385dc5d4875101f5e3b0dde702737564083e37f3f380e0c3bf

See more details on using hashes here.

Supported by

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