Skip to main content

A lightweight interpreted programming language

Project description

Ssebidethon

A lightweight interpreted programming language built in Python, featuring arithmetic operations, variables, conditionals, and loops.

Installation

From PyPI

pip install ssebidethon

From Source

git clone https://github.com/ssebide/ssebidethon.git
cd ssebidethon
pip install -e .

Standalone Executable

Download the latest release from the Releases page.

Usage

Interactive Shell

# If installed via pip
ssebidethon

# Or run as module
python -m ssebidethon

# Or run directly from source
python shell.py

Example Session

Ssebidethon v0.1.0
Type 'exit' to quit.

>>> 5 + 3
8
>>> make x = 10
{'x': 10}
>>> x * 2
20
>>> exit
Goodbye!

Language Features

Arithmetic

5 + 3          # 8
10 - 4         # 6
6 * 7          # 42
20 / 4         # 5.0
(2 + 3) * 4    # 20

Variables

make x = 10
make y = x * 2
x + y          # 30

Comparisons

5 > 3          # 1 (true)
5 < 3          # 0 (false)
5 ?= 5         # 1 (equality check)
5 >= 5         # 1
5 <= 3         # 0

Boolean Logic

1 and 1        # 1
1 and 0        # 0
1 or 0         # 1
not 0          # 1

Conditionals

if x > 5 do x * 2
if x > 10 do 100 elif x > 5 do 50 else do 0

Loops

while x > 0 do make x = x - 1

Development

Project Structure

ssebidethon/
├── __init__.py      # Package exports
├── __main__.py      # Module entry point
├── shell.py         # Interactive REPL
├── lexer.py         # Tokenizer
├── tokens.py        # Token definitions
├── parse.py         # Parser (AST generation)
├── interpreter.py   # Tree-walking interpreter
└── data.py          # Variable storage

Building from Source

# Install build tools
pip install build

# Build the package
python -m build

# Install locally
pip install dist/ssebidethon-0.1.0-py3-none-any.whl

License

MIT

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

ssebidethon-0.1.1.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

ssebidethon-0.1.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file ssebidethon-0.1.1.tar.gz.

File metadata

  • Download URL: ssebidethon-0.1.1.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for ssebidethon-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7ac6afdcd0df5ac545f3d0cddd93422e6dab8e7aa8818ebad0f787ab9ed1c443
MD5 ae3951afd1b7889e7fbdbe8be8cc4491
BLAKE2b-256 54a629636c759a30c509d87bbcd613d94e5cc7b494b9c119b498f5b2473510d2

See more details on using hashes here.

File details

Details for the file ssebidethon-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ssebidethon-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for ssebidethon-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2b7804d54b3ca987eb1d11dc63ecf85f86d01ed3eab3b97114e9b9503376c623
MD5 2231e67579a0fb14e0ee5f1d6e1f282b
BLAKE2b-256 73cd1ca09f6564c8b515a401a5146858aeba8c396c94a6e3b20c1a7ea93e93ae

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