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.2"],
[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 a visual environment (for Japanese and Python syntax). This editor produces Calcium code (a JSON array) that can be executed by the calcium-py runtime.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
calciumlang-0.0.2.tar.gz
(21.3 kB
view hashes)
Built Distribution
Close
Hashes for calciumlang-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 179b8c5098b2d1d709f27d8c18e69e63c7ab9815ef1c7512107abada1e740462 |
|
MD5 | 21d30d5a7d75d80cefe59cae521a6bfa |
|
BLAKE2b-256 | 64c2eea9c6846232ac9e3488be40be91dfba20ec2fd7e4a6c225e253eeccd3ef |