Pebble programming language interpreter in Python
Project description
Pebble Programming Language
Pebble is a beginner-friendly programming language built in Python.
It’s designed to be simple, readable, and fun for learners and hobbyists.
Features
- Functions: Define with
fncand return values without - Loops:
go(for loops) anduntil(while loops) - Conditions:
if, with comparison keywordsbig,sml,eql, and boolean operatorsand,or,not - Collections: Lists
{}and dictionaries[]with easy syntax - Input:
inp[...]to get user input - Comments: Use
!to ignore text on a line - Math:
+,-,*,/,//,%,^ - Easy to run: Execute
.pbfiles with a single command
Installation
pip install pebble-lang
Usage
Running a Pebble program
pebble examples/hello.pb
Example Pebble program (hello.pb)
say "Hello Pebble!"
x is 2 ^ 3
say x
! Output: 8
nums is {1, 2, 3}
count is 0
go n in nums:
count is count + 1
say count
! Output: 3
fnc greet(name):
say "Hello " + name
greet("Rasa")
Loops and Conditions
nums is {0, 1, 2}
go i in nums:
say "Hello"
x is 10
if x big 5:
say "x is bigger than 5"
Collections
numbers is {10, 20, 30}
say numbers
person is [name: "Rasa", age: 14]
say person
go n in numbers:
say n * 2
say person["name"]
say person["age"]
This will output:
[10, 20, 30]
{'name': 'Rasa', 'age': 14}
20
40
60
Rasa
14
Input
name is inp["Enter your name: "]
say "Hello " + name
License
MIT License See LICENSE for details.
Contributing
Contributions are welcome! Please open issues or pull requests on the GitHub repository.
Contact
Created by Rasa8877 GitHub: https://github.com/Rasa8877/pebble-lang
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 pebble_lang-2.1.0.tar.gz.
File metadata
- Download URL: pebble_lang-2.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
764c3478c52a2ab033d00091a54cb5e274e8c78da50967befaf2c43ce24fa38d
|
|
| MD5 |
723a10475a20dbd43698eb34d492519b
|
|
| BLAKE2b-256 |
b7fb07eea4641bcfa0cba5aa9b8821c9e3a5a3da719802c0d65ea0ae5602e007
|
File details
Details for the file pebble_lang-2.1.0-py3-none-any.whl.
File metadata
- Download URL: pebble_lang-2.1.0-py3-none-any.whl
- Upload date:
- Size: 5.3 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 |
3fefcfa5500e50824a1f748324edd5f4a9d4001bcbb20c1ff36dea9f9a1e69f6
|
|
| MD5 |
3d86c589e108abb9b4e03d66819c19e6
|
|
| BLAKE2b-256 |
18aaf0d780de5058bcc0e6dbb63ab5dfd490269204035886480e2b959488a26e
|