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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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