Skip to main content

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 if statements.
  • Tabs are supported and treated as width 4.
  • Empty lines are ignored.
  • Variables default to 0 if read before assignment.

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

newlang_interpreter-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

newlang_interpreter-0.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

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

Hashes for newlang_interpreter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 37c2537a3d1129f044a95ba7c172572316103449d1c93e8dcb64bede1cce6590
MD5 5343d184b23a2cd8b06f2131a5000aa8
BLAKE2b-256 738cfe2cfceeb01bb081a747d823a50c231391123ae8cff9ac2b10b38736f466

See more details on using hashes here.

File details

Details for the file newlang_interpreter-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for newlang_interpreter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f65f18ae43d79de7e98863830ab69aeddd4565b1e89bac85c8751096aa08cb9
MD5 b81aab69d4b1a53a56e6227f314c9a37
BLAKE2b-256 2474751a3eef2f7bb6ee3c386725fe0ccc69fc52ad8633bdd5d8a22e1f02f8bc

See more details on using hashes here.

Supported by

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