A Calcium language interpreter
Project description
calcium-py
A Calcium language intepreter on Python
What is Calcium language?
Calcium is a programming language that takes a JSON array as input. It is interoperable with the Python language, allowing you to utilize Python's standard libraries and more. It is primarily designed as a subset of Python.
How to create the interpreter and run Calcium code
from calciumlang.runtime import Runtime
# Calcium code is given as a JSON array.
calcium_code = [
[1, [], "#", "0.0.5"],
[1, [], "expr", ["call", ["var", "print"], ["Hello, World."]]],
[1, [], "end"],
]
# The Runtime executes Calcium code.
r = Runtime(calcium_code)
r.run() # outputs 'Hello, World.'
Applications using Calcium
With Blockly, you can generate Calcium code in the visual environment. This editor produces Calcium code (a JSON array) that can be executed by the calcium-py runtime.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file calciumlang-0.0.5.tar.gz.
File metadata
- Download URL: calciumlang-0.0.5.tar.gz
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7cdb40ab1f31f75733405f21533a07e69172052abdc3cccdb1c80b71bc44c0a
|
|
| MD5 |
6dfade8241de859d5976c8672090e722
|
|
| BLAKE2b-256 |
f9d24cf56db8ba894871854b380e41ca9042bd5fb9c479a620833a7ba7bd2b6c
|
File details
Details for the file calciumlang-0.0.5-py3-none-any.whl.
File metadata
- Download URL: calciumlang-0.0.5-py3-none-any.whl
- Upload date:
- Size: 22.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6193ed867081a4bc0d80a752792351bb866a5a07e48507d0c8e824d1a9f7869
|
|
| MD5 |
318cc30df5a878ecfb513dda7bdbd311
|
|
| BLAKE2b-256 |
7c8af847935a146ee48df63b5ca800a48ec569639643c1eeb143691297cfde6c
|