shell-lite 0.5__py3-none-any.whl → 0.5.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- shell_lite/interpreter.py +1 -1
- shell_lite/lexer.py +48 -12
- shell_lite/main.py +1 -1
- shell_lite/parser_gbp.py +41 -13
- shell_lite-0.5.2.dist-info/LICENSE +688 -0
- shell_lite-0.5.2.dist-info/METADATA +478 -0
- shell_lite-0.5.2.dist-info/RECORD +20 -0
- {shell_lite-0.5.dist-info → shell_lite-0.5.2.dist-info}/WHEEL +1 -1
- {shell_lite-0.5.dist-info → shell_lite-0.5.2.dist-info}/top_level.txt +0 -1
- shell_lite-0.5.dist-info/LICENSE +0 -21
- shell_lite-0.5.dist-info/METADATA +0 -93
- shell_lite-0.5.dist-info/RECORD +0 -33
- tests/__init__.py +0 -1
- tests/benchmark_driver.py +0 -43
- tests/compare_parsers.py +0 -31
- tests/debug_jit.py +0 -49
- tests/generate_actual_graph.py +0 -84
- tests/generate_perf_graph.py +0 -68
- tests/generate_runtime_graph.py +0 -58
- tests/run_jit.py +0 -70
- tests/test_gbp_standalone.py +0 -37
- tests/test_interpreter.py +0 -8
- tests/test_lexer.py +0 -8
- tests/test_parser.py +0 -8
- tests/test_stdlib.py +0 -8
- {shell_lite-0.5.dist-info → shell_lite-0.5.2.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: shell-lite
|
|
3
|
+
Version: 0.5.2
|
|
4
|
+
Summary: A lightweight, English-like scripting language.
|
|
5
|
+
Home-page: https://github.com/Shrey-N/ShellDesk
|
|
6
|
+
Author: Shrey Naithani
|
|
7
|
+
Author-email: Shrey Naithani <contact@shelllite.tech>
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.8
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: prompt-toolkit>=3.0.0
|
|
15
|
+
|
|
16
|
+
<img src="assets/logo.png" align="right" width="250" alt="ShellLite Logo" />
|
|
17
|
+
|
|
18
|
+
# ShellLite
|
|
19
|
+
|
|
20
|
+
**The English-Like Programming Language**
|
|
21
|
+
|
|
22
|
+
ShellLite is a modern programming language designed to prioritize human readability. It replaces complex syntax with natural English commands, making software development accessible and maintainable. With version 0.05.0, ShellLite now supports native compilation via LLVM alongside its interpreted mode.
|
|
23
|
+
|
|
24
|
+
[](LICENSE)
|
|
25
|
+
[]()
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Table of Contents
|
|
30
|
+
|
|
31
|
+
- [Features](#features)
|
|
32
|
+
- [Architecture](#architecture)
|
|
33
|
+
- [Installation](#installation)
|
|
34
|
+
- [Quick Start](#quick-start)
|
|
35
|
+
- [Language Overview](#language-overview)
|
|
36
|
+
- [Compilation](#compilation)
|
|
37
|
+
- [The Three Pillars](#the-three-pillars)
|
|
38
|
+
- [CLI Reference](#cli-reference)
|
|
39
|
+
- [Project Structure](#project-structure)
|
|
40
|
+
- [Documentation](#documentation)
|
|
41
|
+
- [Ecosystem](#ecosystem)
|
|
42
|
+
- [License](#license)
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Features
|
|
47
|
+
|
|
48
|
+
| Feature | Description |
|
|
49
|
+
|:--------|:------------|
|
|
50
|
+
| **Natural Syntax** | Write code that reads like English |
|
|
51
|
+
| **Dynamic Typing** | No type declarations required |
|
|
52
|
+
| **Multi-Target Compilation** | Compile to LLVM, JavaScript, or Python |
|
|
53
|
+
| **Python Integration** | Use any Python library via The Bridge |
|
|
54
|
+
| **GUI Framework** | Build desktop apps with The Canvas |
|
|
55
|
+
| **Package Manager** | Manage dependencies with The Universe |
|
|
56
|
+
| **Web Framework** | Built-in HTTP server and routing |
|
|
57
|
+
| **Interactive REPL** | Explore and test code interactively |
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Architecture
|
|
62
|
+
|
|
63
|
+
```mermaid
|
|
64
|
+
flowchart TB
|
|
65
|
+
subgraph Input
|
|
66
|
+
A[Source Code .shl]
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
subgraph Frontend
|
|
70
|
+
B[Lexer]
|
|
71
|
+
C[Parser]
|
|
72
|
+
D[AST]
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
subgraph Backend
|
|
76
|
+
E{Execution Mode}
|
|
77
|
+
F[Interpreter]
|
|
78
|
+
G[LLVM Codegen]
|
|
79
|
+
H[JS Compiler]
|
|
80
|
+
I[Python Transpiler]
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
subgraph Output
|
|
84
|
+
J[Runtime Execution]
|
|
85
|
+
K[Native Binary]
|
|
86
|
+
L[JavaScript File]
|
|
87
|
+
M[Python File]
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
A --> B --> C --> D --> E
|
|
91
|
+
E -->|interpret| F --> J
|
|
92
|
+
E -->|compile llvm| G --> K
|
|
93
|
+
E -->|compile js| H --> L
|
|
94
|
+
E -->|compile python| I --> M
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Compilation Pipeline
|
|
98
|
+
|
|
99
|
+
```mermaid
|
|
100
|
+
flowchart LR
|
|
101
|
+
subgraph Lexical Analysis
|
|
102
|
+
A[Source] --> B[Tokens]
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
subgraph Parsing
|
|
106
|
+
B --> C[AST]
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
subgraph Code Generation
|
|
110
|
+
C --> D[LLVM IR]
|
|
111
|
+
D --> E[Optimization]
|
|
112
|
+
E --> F[Native Code]
|
|
113
|
+
end
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Installation
|
|
119
|
+
|
|
120
|
+
### Via PyPI (Recommended)
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
pip install shell-lite
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### From Source
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
git clone https://github.com/Shrey-N/ShellLite.git
|
|
130
|
+
cd ShellLite
|
|
131
|
+
pip install -e .
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Windows Installer
|
|
135
|
+
|
|
136
|
+
Download the latest `shl.exe` from the [Releases](https://github.com/Shrey-N/ShellLite/releases) page.
|
|
137
|
+
|
|
138
|
+
### Verify Installation
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
shl --version
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Quick Start
|
|
147
|
+
|
|
148
|
+
### Hello World
|
|
149
|
+
|
|
150
|
+
Create a file named `hello.shl`:
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
say "Hello, World"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Run it:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
shl hello.shl
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Interactive REPL
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
shl
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
ShellLite REPL - English Syntax
|
|
170
|
+
========================================
|
|
171
|
+
>>> say "Hello"
|
|
172
|
+
Hello
|
|
173
|
+
>>> 5 + 5
|
|
174
|
+
10
|
|
175
|
+
>>> exit
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Language Overview
|
|
181
|
+
|
|
182
|
+
### Type System
|
|
183
|
+
|
|
184
|
+
```mermaid
|
|
185
|
+
graph TD
|
|
186
|
+
A[ShellLite Types] --> B[Number]
|
|
187
|
+
A --> C[String]
|
|
188
|
+
A --> D[Boolean]
|
|
189
|
+
A --> E[List]
|
|
190
|
+
A --> F[Dictionary]
|
|
191
|
+
A --> G[Function]
|
|
192
|
+
A --> H[Object]
|
|
193
|
+
A --> I[None]
|
|
194
|
+
|
|
195
|
+
B --> B1[Integer]
|
|
196
|
+
B --> B2[Float]
|
|
197
|
+
D --> D1[yes / true]
|
|
198
|
+
D --> D2[no / false]
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Syntax Examples
|
|
202
|
+
|
|
203
|
+
**Variables and Constants**
|
|
204
|
+
```
|
|
205
|
+
name = "Alice"
|
|
206
|
+
age = 30
|
|
207
|
+
const PI = 3.14159
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Control Flow**
|
|
211
|
+
```
|
|
212
|
+
if score > 90
|
|
213
|
+
say "Excellent"
|
|
214
|
+
elif score > 70
|
|
215
|
+
say "Good"
|
|
216
|
+
else
|
|
217
|
+
say "Keep trying"
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**Functions**
|
|
221
|
+
```
|
|
222
|
+
to greet name
|
|
223
|
+
say "Hello, " + name
|
|
224
|
+
give "Greeted " + name
|
|
225
|
+
|
|
226
|
+
result = greet "World"
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**Classes**
|
|
230
|
+
```
|
|
231
|
+
thing Car
|
|
232
|
+
has speed = 0
|
|
233
|
+
|
|
234
|
+
can accelerate amount
|
|
235
|
+
speed += amount
|
|
236
|
+
say "Speed: " + str(speed)
|
|
237
|
+
|
|
238
|
+
my_car = new Car
|
|
239
|
+
my_car.accelerate 50
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Natural Language Comparisons
|
|
243
|
+
|
|
244
|
+
| Symbol | Natural Form |
|
|
245
|
+
|:------:|:-------------|
|
|
246
|
+
| `==` | `is`, `equals` |
|
|
247
|
+
| `!=` | `is not` |
|
|
248
|
+
| `>` | `is more than` |
|
|
249
|
+
| `<` | `is less than` |
|
|
250
|
+
| `>=` | `is at least` |
|
|
251
|
+
| `<=` | `is at most` |
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## Compilation
|
|
256
|
+
|
|
257
|
+
### Compilation Targets
|
|
258
|
+
|
|
259
|
+
```mermaid
|
|
260
|
+
flowchart LR
|
|
261
|
+
A[script.shl] --> B{shl compile}
|
|
262
|
+
B -->|--target llvm| C[Native Binary]
|
|
263
|
+
B -->|--target js| D[JavaScript]
|
|
264
|
+
B -->|--target python| E[Python]
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Commands
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
# Compile to native code (default)
|
|
271
|
+
shl compile script.shl
|
|
272
|
+
|
|
273
|
+
# Compile to JavaScript
|
|
274
|
+
shl compile script.shl --target js
|
|
275
|
+
|
|
276
|
+
# Compile to Python
|
|
277
|
+
shl compile script.shl --target python
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Performance Comparison
|
|
281
|
+
|
|
282
|
+
| Mode | Relative Speed | Use Case |
|
|
283
|
+
|:-----|:---------------|:---------|
|
|
284
|
+
| Interpreted | 1x | Development |
|
|
285
|
+
| Python Compiled | ~1.2x | Integration |
|
|
286
|
+
| JavaScript | ~2-5x | Web deployment |
|
|
287
|
+
| LLVM Native | ~10-50x | Production |
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## The Three Pillars
|
|
292
|
+
|
|
293
|
+
ShellLite v0.05.0 introduces three major features:
|
|
294
|
+
|
|
295
|
+
```mermaid
|
|
296
|
+
graph TB
|
|
297
|
+
subgraph "The Bridge"
|
|
298
|
+
A[Python Libraries]
|
|
299
|
+
A1[pandas]
|
|
300
|
+
A2[requests]
|
|
301
|
+
A3[numpy]
|
|
302
|
+
A --> A1
|
|
303
|
+
A --> A2
|
|
304
|
+
A --> A3
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
subgraph "The Canvas"
|
|
308
|
+
B[GUI Framework]
|
|
309
|
+
B1[Windows]
|
|
310
|
+
B2[Dialogs]
|
|
311
|
+
B3[Controls]
|
|
312
|
+
B --> B1
|
|
313
|
+
B --> B2
|
|
314
|
+
B --> B3
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
subgraph "The Universe"
|
|
318
|
+
C[Package Manager]
|
|
319
|
+
C1[Dependencies]
|
|
320
|
+
C2[GitHub Packages]
|
|
321
|
+
C3[shell-lite.toml]
|
|
322
|
+
C --> C1
|
|
323
|
+
C --> C2
|
|
324
|
+
C --> C3
|
|
325
|
+
end
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### The Bridge - Python Integration
|
|
329
|
+
|
|
330
|
+
Import and use any Python library directly:
|
|
331
|
+
|
|
332
|
+
```
|
|
333
|
+
use "pandas" as pd
|
|
334
|
+
use "requests"
|
|
335
|
+
|
|
336
|
+
data = pd.read_csv("data.csv")
|
|
337
|
+
response = requests.get("https://api.example.com")
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### The Canvas - GUI Applications
|
|
341
|
+
|
|
342
|
+
Build native desktop applications:
|
|
343
|
+
|
|
344
|
+
```
|
|
345
|
+
app "My App" size 400, 300
|
|
346
|
+
|
|
347
|
+
column
|
|
348
|
+
heading "Welcome"
|
|
349
|
+
button "Click Me" on_click handle_click
|
|
350
|
+
|
|
351
|
+
to handle_click
|
|
352
|
+
alert "Button clicked!"
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### The Universe - Package Management
|
|
356
|
+
|
|
357
|
+
```bash
|
|
358
|
+
# Initialize project
|
|
359
|
+
shl init
|
|
360
|
+
|
|
361
|
+
# Install dependencies
|
|
362
|
+
shl install
|
|
363
|
+
|
|
364
|
+
# Install from GitHub
|
|
365
|
+
shl get username/repo
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
**shell-lite.toml**
|
|
369
|
+
```toml
|
|
370
|
+
[project]
|
|
371
|
+
name = "my-app"
|
|
372
|
+
version = "1.0.0"
|
|
373
|
+
|
|
374
|
+
[dependencies]
|
|
375
|
+
Shrey-N/shl-utils = "main"
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
## CLI Reference
|
|
381
|
+
|
|
382
|
+
| Command | Description |
|
|
383
|
+
|:--------|:------------|
|
|
384
|
+
| `shl <file.shl>` | Run a ShellLite script |
|
|
385
|
+
| `shl` | Start the interactive REPL |
|
|
386
|
+
| `shl compile <file>` | Compile to native code (LLVM) |
|
|
387
|
+
| `shl compile <file> --target js` | Compile to JavaScript |
|
|
388
|
+
| `shl compile <file> --target python` | Compile to Python |
|
|
389
|
+
| `shl init` | Initialize a new project |
|
|
390
|
+
| `shl install` | Install project dependencies |
|
|
391
|
+
| `shl get <user/repo>` | Install a package from GitHub |
|
|
392
|
+
| `shl fmt <file>` | Format a script |
|
|
393
|
+
| `shl check <file>` | Lint a file (JSON output) |
|
|
394
|
+
| `shl help` | Show help message |
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## Project Structure
|
|
399
|
+
|
|
400
|
+
```
|
|
401
|
+
my-project/
|
|
402
|
+
├── main.shl # Entry point
|
|
403
|
+
├── shell-lite.toml # Project configuration
|
|
404
|
+
├── modules/
|
|
405
|
+
│ ├── utils.shl # Utility functions
|
|
406
|
+
│ └── api.shl # API handlers
|
|
407
|
+
├── tests/
|
|
408
|
+
│ └── test_main.shl # Test files
|
|
409
|
+
└── public/
|
|
410
|
+
└── index.html # Static files (web)
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
## Documentation
|
|
416
|
+
|
|
417
|
+
### Language Guide
|
|
418
|
+
|
|
419
|
+
| Chapter | Topic |
|
|
420
|
+
|:--------|:------|
|
|
421
|
+
| [01](docs/01_Getting_Started.md) | Getting Started |
|
|
422
|
+
| [02](docs/02_Language_Basics.md) | Language Basics |
|
|
423
|
+
| [03](docs/03_Control_Flow.md) | Control Flow |
|
|
424
|
+
| [04](docs/04_Data_Structures.md) | Data Structures |
|
|
425
|
+
| [05](docs/05_Functions_and_OOP.md) | Functions and OOP |
|
|
426
|
+
| [06](docs/06_Modules_and_StdLib.md) | Modules and Standard Library |
|
|
427
|
+
| [07](docs/07_System_Mastery.md) | System Mastery |
|
|
428
|
+
| [08](docs/08_Web_Development.md) | Web Development |
|
|
429
|
+
|
|
430
|
+
### Advanced Topics
|
|
431
|
+
|
|
432
|
+
| Chapter | Topic |
|
|
433
|
+
|:--------|:------|
|
|
434
|
+
| [09](docs/09_Advanced_Features.md) | Advanced Features |
|
|
435
|
+
| [10](docs/10_Compilation_and_Performance.md) | Compilation and Performance |
|
|
436
|
+
| [11](docs/11_Testing_and_Debugging.md) | Testing and Debugging |
|
|
437
|
+
| [12](docs/12_API_Reference.md) | API Reference |
|
|
438
|
+
|
|
439
|
+
### Guides and Resources
|
|
440
|
+
|
|
441
|
+
| Chapter | Topic |
|
|
442
|
+
|:--------|:------|
|
|
443
|
+
| [13](docs/13_Security_Guide.md) | Security Guide |
|
|
444
|
+
| [14](docs/14_Migration_Guide.md) | Migration Guide |
|
|
445
|
+
| [15](docs/15_Troubleshooting.md) | Troubleshooting |
|
|
446
|
+
| [16](docs/16_Examples_and_Tutorials.md) | Examples and Tutorials |
|
|
447
|
+
| [17](docs/17_Best_Practices.md) | Best Practices |
|
|
448
|
+
|
|
449
|
+
---
|
|
450
|
+
|
|
451
|
+
## Ecosystem
|
|
452
|
+
|
|
453
|
+
| Tool | Description | Link |
|
|
454
|
+
|:-----|:------------|:-----|
|
|
455
|
+
| **Book** | Language design, compiler construction, and architecture guide | [Book](https://books2read.com/b/mVpoXM) |
|
|
456
|
+
| **ShellDesk** | Official IDE for ShellLite | [GitHub](https://github.com/Shrey-N/ShellDesk) |
|
|
457
|
+
| **VS Code Extension** | Syntax highlighting and snippets | [Marketplace](https://marketplace.visualstudio.com/items?itemName=ShellLite.shelllite-hello) |
|
|
458
|
+
| **Research Artifact** | Published on Zenodo by CERN | [Zenodo](https://doi.org/10.5281/zenodo.18228699) |
|
|
459
|
+
| **Research Artifact - Geometric Binding Parser** | Published on Zenodo by CERN | [Zenodo](https://doi.org/10.5281/zenodo.18385614) |
|
|
460
|
+
---
|
|
461
|
+
|
|
462
|
+
## Contributing
|
|
463
|
+
|
|
464
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to contribute to ShellLite.
|
|
465
|
+
|
|
466
|
+
## Security
|
|
467
|
+
|
|
468
|
+
See [SECURITY.md](SECURITY.md) for reporting security vulnerabilities.
|
|
469
|
+
|
|
470
|
+
## License
|
|
471
|
+
|
|
472
|
+
MIT License - See [LICENSE](LICENSE) for details.
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
**ShellLite** - Making programming accessible through natural language.
|
|
477
|
+
|
|
478
|
+
Created by Shrey Naithani
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
shell_lite/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
2
|
+
shell_lite/ast_nodes.py,sha256=W2oefXuRjqnQybR5ZcdPU0qC5gxHZHcotQc3LAVDLM0,6129
|
|
3
|
+
shell_lite/cli.py,sha256=14Kq1ohSXS3p-xdh0DPi7eXskUtSX81huSyGhktoOMA,250
|
|
4
|
+
shell_lite/compiler.py,sha256=t2Imae9h03v3GIIKrCo16qCDDLKSxrpjrp83tv0SzUQ,24982
|
|
5
|
+
shell_lite/interpreter.py,sha256=zOf2jy0IhLOemcVMQD89I8XA8a2pEsFDlYeW5pg_lOI,75869
|
|
6
|
+
shell_lite/js_compiler.py,sha256=yEGIkkIvHGU7o1htHEqlQr6BE0wL35PtL5PssNld9fc,5606
|
|
7
|
+
shell_lite/lexer.py,sha256=cNLk_N59a7eKQaQp7Mqcnxy1um64-QgtDEi2eAsAWKE,14913
|
|
8
|
+
shell_lite/main.py,sha256=vSIxORgsMAhnEwMvHgSwbvGfXBLjrV7dggTnDxA0jZI,19877
|
|
9
|
+
shell_lite/parser.py,sha256=qsR2wQUWjUPXbXgnmv8pmOgfX99lYYH6tpxKH3PEnfQ,88471
|
|
10
|
+
shell_lite/parser_gbp.py,sha256=SoERuuuiL6cnFKtwZW2DQizDIgfwRCezX8l-P8V9qOs,10877
|
|
11
|
+
shell_lite/runtime.py,sha256=pSjBeA1dTQ-a94q3FLdv9lqZurdd6MJmfhFGHhOoQEM,16057
|
|
12
|
+
shell_lite/llvm_backend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
+
shell_lite/llvm_backend/builder.py,sha256=WjDj65DePu8LPpOpnjfS2XREy9vQt7aySAqRYvBMq5w,1434
|
|
14
|
+
shell_lite/llvm_backend/codegen.py,sha256=sTpYxSdrOOqyjf9lj7TLQ5ZFOUM17RykL1QNeariZZM,15875
|
|
15
|
+
shell_lite-0.5.2.dist-info/LICENSE,sha256=LlK8rVgwqMiti6NfaXa8xfvXAwfYe5SVrvcz3YpwHgg,37277
|
|
16
|
+
shell_lite-0.5.2.dist-info/METADATA,sha256=ijnwpataGIiXqMaubhrJkrjDR1QxTU8lLWsE_zcqgeQ,10584
|
|
17
|
+
shell_lite-0.5.2.dist-info/WHEEL,sha256=hPN0AlP2dZM_3ZJZWP4WooepkmU9wzjGgCLCeFjkHLA,92
|
|
18
|
+
shell_lite-0.5.2.dist-info/entry_points.txt,sha256=tglL8tjyPIh1W85j6zFpNZjMpQe_xC-k-7BOhHLWfxc,45
|
|
19
|
+
shell_lite-0.5.2.dist-info/top_level.txt,sha256=hIln5ltrok_Mn3ijlQeqMFF6hHBHCyhzqCO7KL358cg,11
|
|
20
|
+
shell_lite-0.5.2.dist-info/RECORD,,
|
shell_lite-0.5.dist-info/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Shrey Naithani
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: shell-lite
|
|
3
|
-
Version: 0.5
|
|
4
|
-
Summary: ShellLite: The English-Like Programming Language with LLVM Backend
|
|
5
|
-
Home-page: https://github.com/Shrey-N/ShellDesk
|
|
6
|
-
Author: Shrey Naithani
|
|
7
|
-
Author-email: mrytshplays@gmail.com
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
-
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Python: >=3.8
|
|
12
|
-
Description-Content-Type: text/markdown
|
|
13
|
-
License-File: LICENSE
|
|
14
|
-
Requires-Dist: llvmlite >=0.40.0
|
|
15
|
-
Requires-Dist: colorama
|
|
16
|
-
Requires-Dist: prompt-toolkit
|
|
17
|
-
Requires-Dist: pygments
|
|
18
|
-
Requires-Dist: pyinstaller
|
|
19
|
-
|
|
20
|
-
<img src="assets/logo.png" align="right" width="250" alt="ShellLite Logo" />
|
|
21
|
-
|
|
22
|
-
# ShellLite: The English-Like Programming Language
|
|
23
|
-
# By Shrey Naithani
|
|
24
|
-
ShellLite is a modern, interpreted programming language designed to prioritize human readability. It replaces complex syntax with natural English commands, making software development accessible and maintainable.
|
|
25
|
-
|
|
26
|
-
## Version 0.04.0 (Polaris Update)
|
|
27
|
-
|
|
28
|
-
This release transforms ShellLite from a scripting tool into a comprehensive platform with three major pillars:
|
|
29
|
-
1. **The Bridge**: Import and use any Python library (pandas, requests, etc.) natively.
|
|
30
|
-
2. **The Canvas**: Build native desktop GUI applications with declarative syntax.
|
|
31
|
-
3. **The Universe**: Integrated package management for project dependencies.
|
|
32
|
-
|
|
33
|
-
## Installation
|
|
34
|
-
|
|
35
|
-
### Via PyPI (Recommended)
|
|
36
|
-
You can install ShellLite directly from PyPI:
|
|
37
|
-
```bash
|
|
38
|
-
pip install shell-lite
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### Windows Installer
|
|
42
|
-
Download the latest `shl.exe` from the Releases page.
|
|
43
|
-
|
|
44
|
-
## Compilation
|
|
45
|
-
|
|
46
|
-
To compile ShellLite code to native machine code (LLVM IR):
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
shl compile script.shl
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Quick Start
|
|
53
|
-
|
|
54
|
-
### 1. Hello World
|
|
55
|
-
Save this as `hello.shl`:
|
|
56
|
-
```shell-lite
|
|
57
|
-
say "Hello, World"
|
|
58
|
-
```
|
|
59
|
-
Run it:
|
|
60
|
-
```bash
|
|
61
|
-
shl hello.shl
|
|
62
|
-
```
|
|
63
|
-
## Project Management
|
|
64
|
-
|
|
65
|
-
Initialize a new project:
|
|
66
|
-
```bash
|
|
67
|
-
shl init
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Install dependencies defined in `shell-lite.toml`:
|
|
71
|
-
```bash
|
|
72
|
-
shl install
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Ecosystem & Tools
|
|
76
|
-
|
|
77
|
-
| Tool | Description | Link |
|
|
78
|
-
| :--- | :--- | :--- |
|
|
79
|
-
| **Book** | teaches cognitive friendly language design, controlled natural languages, compiler construction, forgiving parsing, FFI bridging, performance tuning, and provides full grammar, implementation, and architecture. | [Book](https://books2read.com/b/mVpoXM) |
|
|
80
|
-
| **Research Artifact** | Published on Zenodo By CERN | [GitHub](https://github.com/Shrey-N/ShellDesk) |
|
|
81
|
-
| **ShellDesk** | The official IDE for ShellLite. | [GitHub](https://github.com/Shrey-N/ShellDesk) |
|
|
82
|
-
| **VS Code Extension** | Syntax highlighting and snippets. | [Marketplace](https://marketplace.visualstudio.com/items?itemName=ShellLite.shelllite-hello) / [OpenVSX](https://open-vsx.org/extension/shelllite/shelllite-hello) |
|
|
83
|
-
| **Website** | Official website source code. | [GitHub](https://github.com/Shrey-N/ShellLite-Website) |
|
|
84
|
-
|
|
85
|
-
## Documentation
|
|
86
|
-
|
|
87
|
-
Full documentation is available directly in this repository:
|
|
88
|
-
- [**Language Guide**](https://github.com/Shrey-N/ShellLite)
|
|
89
|
-
- [**Examples**](https://github.com/Shrey-N/ShellLite/tree/main/examples)
|
|
90
|
-
|
|
91
|
-
License: MIT
|
|
92
|
-
Made by Shrey Naithani
|
|
93
|
-
|
shell_lite-0.5.dist-info/RECORD
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
shell_lite/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
2
|
-
shell_lite/ast_nodes.py,sha256=W2oefXuRjqnQybR5ZcdPU0qC5gxHZHcotQc3LAVDLM0,6129
|
|
3
|
-
shell_lite/cli.py,sha256=14Kq1ohSXS3p-xdh0DPi7eXskUtSX81huSyGhktoOMA,250
|
|
4
|
-
shell_lite/compiler.py,sha256=t2Imae9h03v3GIIKrCo16qCDDLKSxrpjrp83tv0SzUQ,24982
|
|
5
|
-
shell_lite/interpreter.py,sha256=-b4Oc-7SMeozbGo7-KQXQ-ip0t2VaG9naz68LiwN27U,75872
|
|
6
|
-
shell_lite/js_compiler.py,sha256=yEGIkkIvHGU7o1htHEqlQr6BE0wL35PtL5PssNld9fc,5606
|
|
7
|
-
shell_lite/lexer.py,sha256=JGqh89LQDCznUPo0YeZp4rm4B8SpshfIYfXdoXOy1Yc,13339
|
|
8
|
-
shell_lite/main.py,sha256=9Up-AcE-J0VxMFai8iJ05ouGpBTCFN0AO9b6q7PVUZE,19880
|
|
9
|
-
shell_lite/parser.py,sha256=qsR2wQUWjUPXbXgnmv8pmOgfX99lYYH6tpxKH3PEnfQ,88471
|
|
10
|
-
shell_lite/parser_gbp.py,sha256=gvITN-5kgZa5fhH5jKITJuK2Rp9I7j8sACKQfppct3g,9640
|
|
11
|
-
shell_lite/runtime.py,sha256=pSjBeA1dTQ-a94q3FLdv9lqZurdd6MJmfhFGHhOoQEM,16057
|
|
12
|
-
shell_lite/llvm_backend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
-
shell_lite/llvm_backend/builder.py,sha256=WjDj65DePu8LPpOpnjfS2XREy9vQt7aySAqRYvBMq5w,1434
|
|
14
|
-
shell_lite/llvm_backend/codegen.py,sha256=sTpYxSdrOOqyjf9lj7TLQ5ZFOUM17RykL1QNeariZZM,15875
|
|
15
|
-
tests/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
16
|
-
tests/benchmark_driver.py,sha256=LBnreweO1x6K1-sw1Xf_vF8YogBqsKvIYBLuuSQUlLg,1526
|
|
17
|
-
tests/compare_parsers.py,sha256=cC4aiKOQFmwcAYS2gcprjIX8rvvwciEN6ZL24YAvAuI,1113
|
|
18
|
-
tests/debug_jit.py,sha256=ghJEnTc2eMqVGSexFyvoQEsGeuvixiUZKG7qZ1QX4Do,1877
|
|
19
|
-
tests/generate_actual_graph.py,sha256=XLaG7a18avGlHvr-nbAMS6EQdTtmUKvwqjMwN2da08I,3329
|
|
20
|
-
tests/generate_perf_graph.py,sha256=6xkDJvan3M6AzyHxo_BluBHNdXRKCTMq5UkLNRp_ikA,2621
|
|
21
|
-
tests/generate_runtime_graph.py,sha256=GIcP8CIWLbrlHe-49ZfM6SOmuwcGsXd4x5A1F-I0d5g,2236
|
|
22
|
-
tests/run_jit.py,sha256=T7QhoKWitoBNBWEU-chKCLXiuohbwb4uHazvUdljIYE,2358
|
|
23
|
-
tests/test_gbp_standalone.py,sha256=p4EdLHLSPr7YwcY2ZcFeOTMeca-ICyIxlCthNbthagg,986
|
|
24
|
-
tests/test_interpreter.py,sha256=04mYgjAw9DBbzM99rrEbRElCKamuJZDLnm2JdswGiw8,204
|
|
25
|
-
tests/test_lexer.py,sha256=XTV0ixB8wSQ6RZpOpxa1Q8etkDKDMbv6mflN4IHAKzw,206
|
|
26
|
-
tests/test_parser.py,sha256=c7DPLC7i7uCikKMJ099VJEYQzqesVZMSQ5ufNCTta8c,213
|
|
27
|
-
tests/test_stdlib.py,sha256=wtCIeNkrnEp6v9DO1wMA3HPb1ANBzcveVKwLFJV81ho,204
|
|
28
|
-
shell_lite-0.5.dist-info/LICENSE,sha256=33eziKLPxbqGCqdHtEHAFe1KSOgqc0-jWUQmdgKq85Q,1092
|
|
29
|
-
shell_lite-0.5.dist-info/METADATA,sha256=Hx_YfK8NNMCuZr7rhfN1kJNLXl0buOYaN3HWSP4b-c0,3186
|
|
30
|
-
shell_lite-0.5.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
|
31
|
-
shell_lite-0.5.dist-info/entry_points.txt,sha256=tglL8tjyPIh1W85j6zFpNZjMpQe_xC-k-7BOhHLWfxc,45
|
|
32
|
-
shell_lite-0.5.dist-info/top_level.txt,sha256=LzIh1SJEY6HL6ZnmzrKTe2zGpFHgUgjV5XscPHHlu3Q,17
|
|
33
|
-
shell_lite-0.5.dist-info/RECORD,,
|
tests/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
tests/benchmark_driver.py
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import time
|
|
3
|
-
import subprocess
|
|
4
|
-
import sys
|
|
5
|
-
SHL_CMD = ["python", "shell_lite/main.py"]
|
|
6
|
-
def run_benchmark():
|
|
7
|
-
print("Generating LLVM IR...")
|
|
8
|
-
subprocess.run(SHL_CMD + ["llvm", "tests/runtime_benchmark.shl"], check=True)
|
|
9
|
-
print("Compiling with Clang...")
|
|
10
|
-
subprocess.run(["clang", "tests/runtime_benchmark.ll", "-o", "tests/runtime_benchmark.exe", "-O3"], check=True)
|
|
11
|
-
print("\n[Running Native Executable...]")
|
|
12
|
-
start = time.perf_counter()
|
|
13
|
-
subprocess.run(["tests/runtime_benchmark.exe"], check=True)
|
|
14
|
-
native_time = time.perf_counter() - start
|
|
15
|
-
print(f"Native Time: {native_time:.4f}s")
|
|
16
|
-
print("\n[Running Interpreter (GBP)...]")
|
|
17
|
-
env = os.environ.copy()
|
|
18
|
-
env["USE_GBP"] = "1"
|
|
19
|
-
start = time.perf_counter()
|
|
20
|
-
subprocess.run(SHL_CMD + ["run", "tests/runtime_benchmark.shl"], env=env, check=True)
|
|
21
|
-
interp_time = time.perf_counter() - start
|
|
22
|
-
print(f"Interpreter Time: {interp_time:.4f}s")
|
|
23
|
-
print("\n[Running Python Equivalent...]")
|
|
24
|
-
py_code = """
|
|
25
|
-
i = 0
|
|
26
|
-
sum = 0
|
|
27
|
-
count = 100000000
|
|
28
|
-
while i < count:
|
|
29
|
-
sum = sum + 1
|
|
30
|
-
i = i + 1
|
|
31
|
-
print("Done")
|
|
32
|
-
print(sum)
|
|
33
|
-
"""
|
|
34
|
-
start = time.perf_counter()
|
|
35
|
-
exec(py_code)
|
|
36
|
-
py_time = time.perf_counter() - start
|
|
37
|
-
print(f"Python Time: {py_time:.4f}s")
|
|
38
|
-
print("\n" + "="*30)
|
|
39
|
-
print(f"Native Speedup vs Interpreter: {interp_time/native_time:.2f}x")
|
|
40
|
-
print(f"Native Speedup vs Python: {py_time/native_time:.2f}x")
|
|
41
|
-
print("="*30)
|
|
42
|
-
if __name__ == "__main__":
|
|
43
|
-
run_benchmark()
|