A custom language with Persian-flavored syntax and full Python power
Project description
PiptonLang - Documentation / مستندات زبان پیپتون
🇮🇷 مستندات زبان برنامهنویسی پیپتون
مقدمه:
Pipton یک زبان برنامهنویسی تفسیری (Interpreter Based) است که با استفاده از پایتون ساخته شده و سینتکسی ساده، روان، و شبیه به زبانهای سطح بالا دارد. این زبان با هدف آموزش آسان، توسعه سریع، و کدنویسی شخصیسازیشده طراحی شده است.
🎯 اهداف زبان:
- سادهسازی آموزش برنامهنویسی برای مبتدیان
- نزدیک بودن سینتکس به تفکر منطقی فارسی و انگلیسی
- اجرای سریع و آسان کدها در محیط ترمینال
- توسعهپذیری بالا با قابلیت افزودن ماژولها
📌 ساختار دستورات زبان Pipton:
var name = entry("نام شما: ")
print>>"سلام " + name
var x = 10
while x < 13 {
print>>x
x = x + 1
}
for i in range(0, 3) {
print>>i
}
fun greet(n) {
print>>"سلام " + n
}
greet("پایتون")
class A {
def __init__(self) {
print>>"کلاس مقداردهی شد"
}
}
import time
print>>time.ctime()
🧠 دستورها و قواعد:
1. تعریف متغیر:
var x = 5
2. حلقهها:
while x < 10 {
print>>x
x = x + 1
}
for i in range(0, 5) {
print>>i
}
3. تابع:
fun hello(name) {
print>>"Hello " + name
}
hello("Amir")
4. کلاس:
class A {
def __init__(self) {
print>>"Init"
}
}
5. دریافت ورودی:
var name = entry("Your name: ")
6. چاپ خروجی:
print>>"Welcome to Pipton!"
7. وارد کردن کتابخانههای پایتون:
import math
print>>math.sqrt(25)
🇬🇧 PiptonLang Documentation
Introduction:
Pipton is a lightweight interpreted language designed for simplicity and readability. It is powered by Python and supports a custom Persian-English hybrid syntax to make it intuitive for Persian speakers.
🎯 Language Goals:
- Beginner-friendly structure
- Customizable syntax
- Support for Python libraries
- Terminal-based execution
📌 Syntax Highlights:
var name = entry("Your name: ")
print>>"Hello " + name
var x = 10
while x < 13 {
print>>x
x = x + 1
}
for i in range(0, 3) {
print>>i
}
fun greet(n) {
print>>"Hi " + n
}
greet("Pipton")
class A {
def __init__(self) {
print>>"Class initialized"
}
}
import time
print>>time.ctime()
🔧 How to Use Pipton:
- Install locally:
pip install .
- Run a file:
pipton examples/test.pipton
📂 اجرای فایلها
برای اجرای فایلهای زبان Pipton با پسوند .piton یا .pipton از دستورات زیر استفاده کنید:
python -m pipton.run_pipton test.piton
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
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 pipton-2.0.0.tar.gz.
File metadata
- Download URL: pipton-2.0.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec672b57d382dd47371334b4bb2b6a13f12e78c4df86a90e98399ed5dc76137e
|
|
| MD5 |
27998a7c73084d7940e9a854d88ec622
|
|
| BLAKE2b-256 |
e3588f2651572ba24c9baae309302788e60412c0cde79776b76f7ae069a43d81
|
File details
Details for the file pipton-2.0.0-py3-none-any.whl.
File metadata
- Download URL: pipton-2.0.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24e5bc63a070a9820c23b859ba591821e3120604270bbe13dbbb09e615c3cadd
|
|
| MD5 |
1920ea232ae830b371de0fc17740b484
|
|
| BLAKE2b-256 |
f91d00ced0d2efcfa2b60f3785815e7184e0a3d98b2d1ada3d34826061156c6c
|