A tiny educational programming language interpreter
Project description
newLang
newLang is a tiny educational programming language with variables, arithmetic, print statements, and indentation-based if blocks.
Features
- Integer numbers
- Variables and assignment
- Arithmetic:
+,-,*,/ - Comparisons:
>,<,== print(...)if condition:with indented blocks
Install
From this project directory:
pip install .
For development mode:
pip install -e .
Run a Program
Create a source file, for example example.nl:
x = 20
if x > 10:
print(x)
Run it:
newlang example.nl
Expected output:
20
Language Notes
- Indentation controls blocks for
ifstatements. - Tabs are supported and treated as width 4.
- Empty lines are ignored.
- Variables default to
0if read before assignment.
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
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 newlang_interpreter-0.1.0.tar.gz.
File metadata
- Download URL: newlang_interpreter-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37c2537a3d1129f044a95ba7c172572316103449d1c93e8dcb64bede1cce6590
|
|
| MD5 |
5343d184b23a2cd8b06f2131a5000aa8
|
|
| BLAKE2b-256 |
738cfe2cfceeb01bb081a747d823a50c231391123ae8cff9ac2b10b38736f466
|
File details
Details for the file newlang_interpreter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: newlang_interpreter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f65f18ae43d79de7e98863830ab69aeddd4565b1e89bac85c8751096aa08cb9
|
|
| MD5 |
b81aab69d4b1a53a56e6227f314c9a37
|
|
| BLAKE2b-256 |
2474751a3eef2f7bb6ee3c386725fe0ccc69fc52ad8633bdd5d8a22e1f02f8bc
|