eplang 7.0.0__tar.gz
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.
- eplang-7.0.0/CHANGELOG.md +242 -0
- eplang-7.0.0/CONTRIBUTING.md +151 -0
- eplang-7.0.0/LICENSE +21 -0
- eplang-7.0.0/MANIFEST.in +50 -0
- eplang-7.0.0/PKG-INFO +1569 -0
- eplang-7.0.0/README.md +1531 -0
- eplang-7.0.0/epl/.ai_config.json +5 -0
- eplang-7.0.0/epl/__init__.py +62 -0
- eplang-7.0.0/epl/__main__.py +11 -0
- eplang-7.0.0/epl/ai.py +842 -0
- eplang-7.0.0/epl/ast_nodes.py +843 -0
- eplang-7.0.0/epl/async_io.py +275 -0
- eplang-7.0.0/epl/block_editor.py +734 -0
- eplang-7.0.0/epl/bytecode_cache.py +116 -0
- eplang-7.0.0/epl/ci_gen.py +431 -0
- eplang-7.0.0/epl/cli.py +1517 -0
- eplang-7.0.0/epl/compiler.py +2593 -0
- eplang-7.0.0/epl/concurrency.py +428 -0
- eplang-7.0.0/epl/concurrency_real.py +730 -0
- eplang-7.0.0/epl/copilot.py +941 -0
- eplang-7.0.0/epl/database.py +896 -0
- eplang-7.0.0/epl/database_real.py +848 -0
- eplang-7.0.0/epl/debugger.py +645 -0
- eplang-7.0.0/epl/deploy.py +2129 -0
- eplang-7.0.0/epl/desktop.py +966 -0
- eplang-7.0.0/epl/doc_linter.py +1196 -0
- eplang-7.0.0/epl/environment.py +150 -0
- eplang-7.0.0/epl/errors.py +482 -0
- eplang-7.0.0/epl/ffi.py +305 -0
- eplang-7.0.0/epl/formatter.py +313 -0
- eplang-7.0.0/epl/github_tools.py +77 -0
- eplang-7.0.0/epl/gui.py +360 -0
- eplang-7.0.0/epl/hot_reload.py +208 -0
- eplang-7.0.0/epl/html_gen.py +267 -0
- eplang-7.0.0/epl/interpreter.py +3242 -0
- eplang-7.0.0/epl/ios_gen.py +909 -0
- eplang-7.0.0/epl/js_transpiler.py +851 -0
- eplang-7.0.0/epl/kotlin_gen.py +2711 -0
- eplang-7.0.0/epl/lexer.py +467 -0
- eplang-7.0.0/epl/lsp_server.py +1139 -0
- eplang-7.0.0/epl/micropython_transpiler.py +501 -0
- eplang-7.0.0/epl/networking.py +601 -0
- eplang-7.0.0/epl/notebook.py +634 -0
- eplang-7.0.0/epl/official_packages/epl-db/README.md +29 -0
- eplang-7.0.0/epl/official_packages/epl-db/epl.toml +9 -0
- eplang-7.0.0/epl/official_packages/epl-db/examples/basic.epl +7 -0
- eplang-7.0.0/epl/official_packages/epl-db/src/main.epl +49 -0
- eplang-7.0.0/epl/official_packages/epl-test/README.md +30 -0
- eplang-7.0.0/epl/official_packages/epl-test/epl.toml +9 -0
- eplang-7.0.0/epl/official_packages/epl-test/examples/basic.epl +7 -0
- eplang-7.0.0/epl/official_packages/epl-test/src/main.epl +60 -0
- eplang-7.0.0/epl/official_packages/epl-web/README.md +30 -0
- eplang-7.0.0/epl/official_packages/epl-web/epl.toml +9 -0
- eplang-7.0.0/epl/official_packages/epl-web/examples/basic.epl +10 -0
- eplang-7.0.0/epl/official_packages/epl-web/src/main.epl +87 -0
- eplang-7.0.0/epl/package_index.py +876 -0
- eplang-7.0.0/epl/package_manager.py +5251 -0
- eplang-7.0.0/epl/packager.py +772 -0
- eplang-7.0.0/epl/parser.py +2972 -0
- eplang-7.0.0/epl/playground.py +749 -0
- eplang-7.0.0/epl/profiler.py +495 -0
- eplang-7.0.0/epl/publisher.py +523 -0
- eplang-7.0.0/epl/python_transpiler.py +732 -0
- eplang-7.0.0/epl/reference_monitor.py +206 -0
- eplang-7.0.0/epl/registry.json +285 -0
- eplang-7.0.0/epl/registry.py +675 -0
- eplang-7.0.0/epl/registry_server.py +536 -0
- eplang-7.0.0/epl/resolver.py +588 -0
- eplang-7.0.0/epl/runtime.c +2319 -0
- eplang-7.0.0/epl/site_generator.py +1043 -0
- eplang-7.0.0/epl/stdlib/api.epl +41 -0
- eplang-7.0.0/epl/stdlib/auth.epl +53 -0
- eplang-7.0.0/epl/stdlib/collections.epl +189 -0
- eplang-7.0.0/epl/stdlib/crypto.epl +47 -0
- eplang-7.0.0/epl/stdlib/datetime.epl +85 -0
- eplang-7.0.0/epl/stdlib/encoding.epl +49 -0
- eplang-7.0.0/epl/stdlib/functional.epl +86 -0
- eplang-7.0.0/epl/stdlib/html.epl +45 -0
- eplang-7.0.0/epl/stdlib/http.epl +62 -0
- eplang-7.0.0/epl/stdlib/io.epl +71 -0
- eplang-7.0.0/epl/stdlib/json.epl +26 -0
- eplang-7.0.0/epl/stdlib/math.epl +168 -0
- eplang-7.0.0/epl/stdlib/net.epl +75 -0
- eplang-7.0.0/epl/stdlib/os.epl +70 -0
- eplang-7.0.0/epl/stdlib/regex.epl +38 -0
- eplang-7.0.0/epl/stdlib/registry.json +90 -0
- eplang-7.0.0/epl/stdlib/sql.epl +66 -0
- eplang-7.0.0/epl/stdlib/string.epl +121 -0
- eplang-7.0.0/epl/stdlib/template.epl +29 -0
- eplang-7.0.0/epl/stdlib/testing.epl +104 -0
- eplang-7.0.0/epl/stdlib/web.epl +139 -0
- eplang-7.0.0/epl/stdlib/websocket.epl +57 -0
- eplang-7.0.0/epl/stdlib.py +9482 -0
- eplang-7.0.0/epl/store_backends.py +538 -0
- eplang-7.0.0/epl/templates/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- eplang-7.0.0/epl/templates/android/gradlew +248 -0
- eplang-7.0.0/epl/templates/android/gradlew.bat +92 -0
- eplang-7.0.0/epl/test_framework.py +748 -0
- eplang-7.0.0/epl/tokens.py +499 -0
- eplang-7.0.0/epl/type_checker.py +679 -0
- eplang-7.0.0/epl/type_system.py +867 -0
- eplang-7.0.0/epl/vm.py +3046 -0
- eplang-7.0.0/epl/wasm_web.py +1248 -0
- eplang-7.0.0/epl/web.py +2993 -0
- eplang-7.0.0/epl/workspace.py +433 -0
- eplang-7.0.0/epl/wsgi.py +566 -0
- eplang-7.0.0/eplang.egg-info/PKG-INFO +1569 -0
- eplang-7.0.0/eplang.egg-info/SOURCES.txt +164 -0
- eplang-7.0.0/eplang.egg-info/dependency_links.txt +1 -0
- eplang-7.0.0/eplang.egg-info/entry_points.txt +2 -0
- eplang-7.0.0/eplang.egg-info/requires.txt +17 -0
- eplang-7.0.0/eplang.egg-info/top_level.txt +3 -0
- eplang-7.0.0/examples/advanced.epl +84 -0
- eplang-7.0.0/examples/apps/blog_engine.epl +137 -0
- eplang-7.0.0/examples/apps/discord_bot.epl +109 -0
- eplang-7.0.0/examples/apps/rest_api_jwt.epl +126 -0
- eplang-7.0.0/examples/apps/todo_app.epl +229 -0
- eplang-7.0.0/examples/builtins.epl +30 -0
- eplang-7.0.0/examples/calculator.epl +108 -0
- eplang-7.0.0/examples/classes.epl +48 -0
- eplang-7.0.0/examples/compile_full.epl +32 -0
- eplang-7.0.0/examples/compile_test.epl +14 -0
- eplang-7.0.0/examples/compile_test2.epl +33 -0
- eplang-7.0.0/examples/conditions.epl +31 -0
- eplang-7.0.0/examples/constants_and_loops.epl +77 -0
- eplang-7.0.0/examples/data_pipeline.epl +88 -0
- eplang-7.0.0/examples/data_tool.epl +124 -0
- eplang-7.0.0/examples/database_app.epl +62 -0
- eplang-7.0.0/examples/english_simple.epl +118 -0
- eplang-7.0.0/examples/enums.epl +73 -0
- eplang-7.0.0/examples/error_handling.epl +100 -0
- eplang-7.0.0/examples/files.epl +15 -0
- eplang-7.0.0/examples/functions.epl +47 -0
- eplang-7.0.0/examples/hello.epl +4 -0
- eplang-7.0.0/examples/import_as_demo.epl +26 -0
- eplang-7.0.0/examples/imports.epl +17 -0
- eplang-7.0.0/examples/lambdas.epl +74 -0
- eplang-7.0.0/examples/loops.epl +40 -0
- eplang-7.0.0/examples/maps.epl +65 -0
- eplang-7.0.0/examples/math_builtins.epl +98 -0
- eplang-7.0.0/examples/math_utils.epl +19 -0
- eplang-7.0.0/examples/module_demo.epl +48 -0
- eplang-7.0.0/examples/native_stdlib_demo.epl +166 -0
- eplang-7.0.0/examples/new_features.epl +82 -0
- eplang-7.0.0/examples/portfolio.epl +109 -0
- eplang-7.0.0/examples/power_test1.epl +87 -0
- eplang-7.0.0/examples/power_test2.epl +84 -0
- eplang-7.0.0/examples/power_test3.epl +103 -0
- eplang-7.0.0/examples/regex_demo.epl +56 -0
- eplang-7.0.0/examples/showcase.epl +189 -0
- eplang-7.0.0/examples/slicing.epl +57 -0
- eplang-7.0.0/examples/stdlib_demo.epl +72 -0
- eplang-7.0.0/examples/string_advanced.epl +83 -0
- eplang-7.0.0/examples/strings.epl +48 -0
- eplang-7.0.0/examples/task_manager.epl +127 -0
- eplang-7.0.0/examples/text_analyzer.epl +76 -0
- eplang-7.0.0/examples/text_editor.epl +74 -0
- eplang-7.0.0/examples/todo.epl +44 -0
- eplang-7.0.0/examples/todo_api.epl +37 -0
- eplang-7.0.0/examples/transpile_test.epl +20 -0
- eplang-7.0.0/examples/varargs_test.epl +19 -0
- eplang-7.0.0/examples/variables.epl +19 -0
- eplang-7.0.0/examples/webapp.epl +34 -0
- eplang-7.0.0/main.py +2647 -0
- eplang-7.0.0/pyproject.toml +79 -0
- eplang-7.0.0/setup.cfg +4 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to EPL are documented here.
|
|
4
|
+
|
|
5
|
+
## [7.0.0] — 2026
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- Unified production tooling around `epl.toml` while keeping `epl.json` as a legacy fallback.
|
|
9
|
+
- Fixed the module CLI so manifest-based builds, strict type checking, and sandboxed execution work correctly.
|
|
10
|
+
- Hardened pytest collection to exclude legacy script-style runners from structured pytest runs.
|
|
11
|
+
- Updated release metadata and docs to align with EPL v7.0.
|
|
12
|
+
|
|
13
|
+
### Packaging
|
|
14
|
+
- Renamed the standalone CLI bundler script from `build.py` to `bundle.py` so `python -m build` works with the standard Python packaging frontend.
|
|
15
|
+
- Added wheel/sdist package data for native `.epl` stdlib modules, `registry.json`, `runtime.c`, and the AI `Modelfile`.
|
|
16
|
+
- Expanded PyInstaller bundling assets so packaged EPL binaries include the same runtime files expected by source installs.
|
|
17
|
+
|
|
18
|
+
## [4.2.0] — 2025
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
#### Native EPL Standard Library Modules
|
|
23
|
+
- 9 native `.epl` modules written in EPL itself (not Python):
|
|
24
|
+
- `math` — factorial, fibonacci, is_prime, gcd, lcm, statistics (mean, median, variance, std_dev)
|
|
25
|
+
- `string` — capitalize, slug, pad_left/pad_right, truncate, word_count, char_count, repeat_string
|
|
26
|
+
- `collections` — flatten, chunk, unique, zip_pair, take/drop, stack (push/pop/peek), queue
|
|
27
|
+
- `functional` — map_list, filter_list, reduce_list, compose, pipe, curry, memoize, once
|
|
28
|
+
- `datetime` — format_duration, time_ago, is_weekend, days_until, format_date
|
|
29
|
+
- `crypto` — md5, sha256, base64_enc/base64_dec, hex_enc, uuid, random_string
|
|
30
|
+
- `http` — http_fetch, http_send, parse_json, to_json, encode_url
|
|
31
|
+
- `io` — read_whole_file, write_whole_file, file_lines, file_head, file_tail
|
|
32
|
+
- `testing` — test, expect_equal, expect_true, expect_false, expect_contains, test_summary
|
|
33
|
+
- `epl/stdlib/registry.json` — Module registry with descriptions and file paths
|
|
34
|
+
- `epl modules` CLI command — Lists all available standard library modules
|
|
35
|
+
|
|
36
|
+
#### Import System Improvements
|
|
37
|
+
- AST caching (`_ast_cache`) — Parsed files are cached by absolute path, eliminating redundant lex/parse on re-import
|
|
38
|
+
- `_parse_file()` method — Centralised file reading, lexing, and parsing with caching
|
|
39
|
+
- Module function recursion — Functions accessed via `Module.method()` or `Module::method()` can call other module functions
|
|
40
|
+
|
|
41
|
+
#### REPL Enhancements
|
|
42
|
+
- `.vars` command now works correctly (shows variables + defined functions with parameter names)
|
|
43
|
+
- Persistent REPL history across sessions (`~/.epl_history`)
|
|
44
|
+
- Windows readline support via `pyreadline3` fallback
|
|
45
|
+
|
|
46
|
+
#### CLI
|
|
47
|
+
- `epl modules` command — Discover available standard library modules
|
|
48
|
+
- Python 3.9+ version guard with friendly error message (both `main.py` and `epl/cli.py`)
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
- `_import_and_exec()` and `_import_as_module()` refactored to use shared `_parse_file()` method
|
|
52
|
+
- REPL `.vars` handler uses `interpreter.global_env` (was incorrectly using `interpreter.env`)
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
- **Security: Removed `shell=True`** from `_exec()` and `_exec_output()` in `epl/stdlib.py` — Eliminates command injection vulnerability. Now raises `EPLRuntimeError` on invalid commands.
|
|
56
|
+
- REPL `.vars` crash — was accessing non-existent `interpreter.env` attribute
|
|
57
|
+
- `median()` in native math module — was using float division result as list index (now uses `floor()`)
|
|
58
|
+
- Module constants accessible via both `Module::CONST` and `Module.CONST` syntax
|
|
59
|
+
- F-string syntax compatibility (Python < 3.12) in `_list_modules()`
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## [4.1.0] — 2025
|
|
64
|
+
|
|
65
|
+
### Added
|
|
66
|
+
|
|
67
|
+
#### Pluggable Store & Session Backends
|
|
68
|
+
- `epl/store_backends.py` — Abstract `StoreBackend` and `SessionBackend` interfaces
|
|
69
|
+
- `MemoryStoreBackend` / `MemorySessionBackend` — In-process (default, fast)
|
|
70
|
+
- `SQLiteStoreBackend` / `SQLiteSessionBackend` — File-based, survives restarts
|
|
71
|
+
- `RedisStoreBackend` / `RedisSessionBackend` — Shared across workers + restarts
|
|
72
|
+
- `configure_backends(store='memory', session='memory', **kwargs)` API
|
|
73
|
+
- CLI flags: `--store memory|sqlite|redis`, `--session memory|sqlite|redis`
|
|
74
|
+
|
|
75
|
+
#### Production Server (`serve` command)
|
|
76
|
+
- `python main.py serve <file.epl>` — Cross-platform production server
|
|
77
|
+
- Waitress on Windows, Gunicorn on Linux/macOS, wsgiref fallback
|
|
78
|
+
- `--port`, `--workers`, `--reload` flags
|
|
79
|
+
- `serve()` function in `epl/deploy.py`
|
|
80
|
+
|
|
81
|
+
#### Hot Reload
|
|
82
|
+
- `epl/hot_reload.py` — File watcher + auto-restart for development
|
|
83
|
+
- `--reload` flag on `serve` command
|
|
84
|
+
- Polling-based (no external dependencies)
|
|
85
|
+
|
|
86
|
+
#### ASGI WebSocket Support
|
|
87
|
+
- `ASGIAdapter` now handles `websocket` scope type
|
|
88
|
+
- `_ASGIWebSocket` class with accept/send/receive/close
|
|
89
|
+
- Dict-based and simple handler patterns
|
|
90
|
+
|
|
91
|
+
#### Python Callable Route Handlers
|
|
92
|
+
- Routes can return `'callable'` type with a Python function
|
|
93
|
+
- Works across `EPLHandler`, `AsyncEPLServer`, `WSGIAdapter`
|
|
94
|
+
|
|
95
|
+
#### Advanced Template Engine
|
|
96
|
+
- 30 template filters: upper, lower, title, capitalize, strip, length, reverse, first, last, sort, join, truncate, default, replace, date, url_encode, nl2br, json, abs, int, float, round, safe, wordcount, striptags, batch, slice, unique, shuffle, dictsort
|
|
97
|
+
- Filter chaining: `{{ name|upper|truncate:10 }}`
|
|
98
|
+
- `{% set var = expr %}` tag
|
|
99
|
+
- Ternary expressions: `{{ x if condition else y }}`
|
|
100
|
+
|
|
101
|
+
### Changed
|
|
102
|
+
- Health check now returns dynamic version from `epl/__init__.py`
|
|
103
|
+
- `_data_store` proxy properly delegates `clear()`, `pop()`, `items()` to backends
|
|
104
|
+
- VS Code extension updated to v4.1.0 with EPL web/English keyword highlighting
|
|
105
|
+
- `startWebServer` command now uses `python main.py serve`
|
|
106
|
+
- `requirements.txt` and `pyproject.toml` list `waitress` and `redis` as optional deps
|
|
107
|
+
|
|
108
|
+
### Fixed
|
|
109
|
+
- `_StoreProxy.clear()` and `pop()` were no-ops (inherited from `dict`)
|
|
110
|
+
- `_StoreProxy.items()` always returned empty list (missing `all_collections()`)
|
|
111
|
+
- Gunicorn multi-worker mode: `_gunicorn_app` was `None` in forked workers
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## [4.0.0] — 2025
|
|
116
|
+
|
|
117
|
+
### Added
|
|
118
|
+
|
|
119
|
+
#### LLVM Native Compiler
|
|
120
|
+
- Compile EPL programs to native executables via `python main.py compile <file.epl>`
|
|
121
|
+
- Support for integers, floats, strings, print, conditionals, loops, functions
|
|
122
|
+
- LLVM IR inspection via `python main.py ir <file.epl>`
|
|
123
|
+
- 26 compiler tests
|
|
124
|
+
|
|
125
|
+
#### Kotlin/Android Transpiler
|
|
126
|
+
- Transpile EPL to Kotlin via `python main.py kotlin <file.epl>`
|
|
127
|
+
- Full Android project generation via `python main.py android <file.epl>`
|
|
128
|
+
- Jetpack Compose UI mapping for GUI and web nodes
|
|
129
|
+
- Type inference via SymbolTable across scopes
|
|
130
|
+
- Sealed classes for enums, data classes, generics
|
|
131
|
+
- 30 transpiler tests
|
|
132
|
+
|
|
133
|
+
#### Bytecode Virtual Machine
|
|
134
|
+
- Stack-based bytecode VM with 68 opcodes
|
|
135
|
+
- 10-50x faster than tree-walking interpretation
|
|
136
|
+
- Peephole optimizer with instruction reindexing
|
|
137
|
+
- Dead code elimination
|
|
138
|
+
- Comparison constant folding
|
|
139
|
+
- Dict-based builtin dispatch (O(1) lookup)
|
|
140
|
+
- 43 VM tests
|
|
141
|
+
|
|
142
|
+
#### Package Manager v3.0
|
|
143
|
+
- SemVer class with full parsing, comparison, caret/tilde compatibility
|
|
144
|
+
- Version range parsing: exact, ^, ~, >=, <=, >, <, !=, compound, wildcard
|
|
145
|
+
- Transitive dependency resolution via BFS
|
|
146
|
+
- Dependency conflict detection with clear error messages
|
|
147
|
+
- Lockfile v2 with integrity hashes and required_by tracking
|
|
148
|
+
- Frozen install from lockfile
|
|
149
|
+
- Package validation (name format, semver, description, entry point)
|
|
150
|
+
- Pack command (zip + SHA256 checksum)
|
|
151
|
+
- Publish workflow (validate → pack → install → register)
|
|
152
|
+
- Update and update-all commands
|
|
153
|
+
- 91 package manager tests
|
|
154
|
+
|
|
155
|
+
#### Stability Improvements
|
|
156
|
+
- Short-circuit evaluation for `and`/`or` operators
|
|
157
|
+
- Clean error for `max()`/`min()` on empty lists
|
|
158
|
+
- Type checking for `sum()`, `sorted()`, `round()`, `sqrt()`, `log()`
|
|
159
|
+
- Overflow protection for `**` with exponent > 10000
|
|
160
|
+
- Negative repeat count protection
|
|
161
|
+
- `reduce()` on empty list without initial value raises clean error
|
|
162
|
+
- 42 stability tests
|
|
163
|
+
|
|
164
|
+
#### Documentation
|
|
165
|
+
- `docs/language-reference.md` — Complete syntax and built-in reference
|
|
166
|
+
- `docs/tutorials.md` — 11 step-by-step tutorials
|
|
167
|
+
- `docs/architecture.md` — Technical system overview
|
|
168
|
+
- `docs/package-manager.md` — Package management guide
|
|
169
|
+
|
|
170
|
+
#### Adoption Infrastructure
|
|
171
|
+
- `CONTRIBUTING.md` — Contributor guide
|
|
172
|
+
- `CHANGELOG.md` — Version history
|
|
173
|
+
- `CODE_OF_CONDUCT.md` — Community guidelines
|
|
174
|
+
- `.github/ISSUE_TEMPLATE/` — Bug report and feature request templates
|
|
175
|
+
|
|
176
|
+
### Changed
|
|
177
|
+
- Test count: 299 → 547+ (7 test suites)
|
|
178
|
+
- README updated with documentation links and current statistics
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## [3.0.0] — 2024
|
|
183
|
+
|
|
184
|
+
### Added
|
|
185
|
+
- Web framework with routing, sessions, WebSocket support
|
|
186
|
+
- GUI toolkit (tkinter-based): windows, widgets, canvas, events, menus
|
|
187
|
+
- Package manager with init, install, uninstall, list
|
|
188
|
+
- Database ORM with Store/Fetch/Delete
|
|
189
|
+
- Debugger with breakpoints, stepping, watch expressions
|
|
190
|
+
- LSP server for editor integration
|
|
191
|
+
- Testing framework (Assert, AssertEqual, AssertThrows)
|
|
192
|
+
- AI assistant for code generation and explanation
|
|
193
|
+
- Static type system with optional annotations
|
|
194
|
+
- WSGI/ASGI server support
|
|
195
|
+
- Profiler with DAP debugging
|
|
196
|
+
- Async I/O support
|
|
197
|
+
- JavaScript transpiler (browser + Node.js targets)
|
|
198
|
+
- Standard library: 311 functions across 20+ modules
|
|
199
|
+
- 36 built-in packages
|
|
200
|
+
|
|
201
|
+
### Added (Language Features)
|
|
202
|
+
- Augmented assignment (`+=`, `-=`, `*=`, `/=`)
|
|
203
|
+
- Ternary expressions (`x If condition Otherwise y`)
|
|
204
|
+
- Enums and enum access
|
|
205
|
+
- Match/When pattern matching
|
|
206
|
+
- Super calls in class inheritance
|
|
207
|
+
- Try/Catch/Finally
|
|
208
|
+
- Module definitions and exports
|
|
209
|
+
- Interfaces and implements clauses
|
|
210
|
+
- Generics, abstract methods, static methods
|
|
211
|
+
- Yield, destructuring, spread expressions
|
|
212
|
+
- Chained comparisons
|
|
213
|
+
- Lambda expressions and higher-order functions
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## [2.0.0] — 2024
|
|
218
|
+
|
|
219
|
+
### Added
|
|
220
|
+
- Classes and inheritance
|
|
221
|
+
- File I/O (read, write, append)
|
|
222
|
+
- Error handling (Try/Catch/Throw)
|
|
223
|
+
- Imports and module system
|
|
224
|
+
- Break/Continue in loops
|
|
225
|
+
- ForRange loops with step
|
|
226
|
+
- Maps/dictionaries
|
|
227
|
+
- Index access and assignment
|
|
228
|
+
- Slice access for lists and strings
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## [1.0.0] — 2024
|
|
233
|
+
|
|
234
|
+
### Added
|
|
235
|
+
- Core language: variables, functions, conditionals, loops
|
|
236
|
+
- Data types: integers, decimals, text, booleans, nothing, lists
|
|
237
|
+
- Print/Input (Say/Ask)
|
|
238
|
+
- Repeat/While/ForEach loops
|
|
239
|
+
- User-defined functions with parameters and return values
|
|
240
|
+
- Binary and unary operators
|
|
241
|
+
- String concatenation and interpolation
|
|
242
|
+
- Comments via `Note:`
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Contributing to EPL
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to EPL! This guide will help you get started.
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
### Prerequisites
|
|
8
|
+
|
|
9
|
+
- Python 3.11+
|
|
10
|
+
- Git
|
|
11
|
+
|
|
12
|
+
### Setup
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
git clone https://github.com/your-org/epl.git
|
|
16
|
+
cd epl
|
|
17
|
+
pip install -r requirements.txt
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Running Tests
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Core regression tests (271 tests)
|
|
24
|
+
python -m pytest tests/test_epl.py -v
|
|
25
|
+
|
|
26
|
+
# v4 feature tests (44 tests)
|
|
27
|
+
python tests/run_tests.py
|
|
28
|
+
|
|
29
|
+
# LLVM compiler tests (26 tests)
|
|
30
|
+
python -m pytest tests/test_llvm.py -v
|
|
31
|
+
|
|
32
|
+
# Kotlin transpiler tests (30 tests)
|
|
33
|
+
python -m pytest tests/test_kotlin.py -v
|
|
34
|
+
|
|
35
|
+
# Bytecode VM tests (43 tests)
|
|
36
|
+
python -m pytest tests/test_vm.py -v
|
|
37
|
+
|
|
38
|
+
# Package manager tests (91 tests)
|
|
39
|
+
python -m pytest tests/test_package_manager.py -v
|
|
40
|
+
|
|
41
|
+
# Stability tests (42 tests)
|
|
42
|
+
python -m pytest tests/test_stability.py -v
|
|
43
|
+
|
|
44
|
+
# Run everything
|
|
45
|
+
python -m pytest tests/ -v && python tests/run_tests.py
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
All 547+ tests must pass before submitting a PR.
|
|
49
|
+
|
|
50
|
+
## How to Contribute
|
|
51
|
+
|
|
52
|
+
### Reporting Bugs
|
|
53
|
+
|
|
54
|
+
1. Check existing issues to avoid duplicates
|
|
55
|
+
2. Include:
|
|
56
|
+
- EPL version (`python main.py --version`)
|
|
57
|
+
- Python version
|
|
58
|
+
- OS
|
|
59
|
+
- Minimal `.epl` file that reproduces the bug
|
|
60
|
+
- Expected vs actual behavior
|
|
61
|
+
- Full error traceback
|
|
62
|
+
|
|
63
|
+
### Suggesting Features
|
|
64
|
+
|
|
65
|
+
Open an issue with:
|
|
66
|
+
- A clear description of the feature
|
|
67
|
+
- Example EPL code showing the proposed syntax
|
|
68
|
+
- Rationale — why this improves the language
|
|
69
|
+
|
|
70
|
+
### Submitting Code
|
|
71
|
+
|
|
72
|
+
1. Fork the repository
|
|
73
|
+
2. Create a feature branch: `git checkout -b feature/my-feature`
|
|
74
|
+
3. Make your changes
|
|
75
|
+
4. Add tests for any new functionality
|
|
76
|
+
5. Ensure all tests pass
|
|
77
|
+
6. Submit a pull request
|
|
78
|
+
|
|
79
|
+
## Code Guidelines
|
|
80
|
+
|
|
81
|
+
### Project Structure
|
|
82
|
+
|
|
83
|
+
- `epl/` — All EPL modules (lexer, parser, interpreter, compiler, etc.)
|
|
84
|
+
- `tests/` — Test suites (pytest-based)
|
|
85
|
+
- `examples/` — Example EPL programs
|
|
86
|
+
- `docs/` — Documentation
|
|
87
|
+
|
|
88
|
+
### Style
|
|
89
|
+
|
|
90
|
+
- Follow existing code style in each file
|
|
91
|
+
- Use type hints for function signatures
|
|
92
|
+
- Keep functions focused — one responsibility per function
|
|
93
|
+
- Use descriptive variable names
|
|
94
|
+
|
|
95
|
+
### Commit Messages
|
|
96
|
+
|
|
97
|
+
Use clear, descriptive commit messages:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
Add support for pattern matching in VM backend
|
|
101
|
+
|
|
102
|
+
- Implement MATCH/WHEN opcodes in bytecode compiler
|
|
103
|
+
- Add VM dispatch for match/case evaluation
|
|
104
|
+
- Add 5 tests for pattern matching
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Testing Requirements
|
|
108
|
+
|
|
109
|
+
- Every new feature must have tests
|
|
110
|
+
- Bug fixes should include a regression test
|
|
111
|
+
- Tests go in the appropriate suite:
|
|
112
|
+
- Interpreter features → `tests/test_epl.py`
|
|
113
|
+
- VM features → `tests/test_vm.py`
|
|
114
|
+
- Compiler features → `tests/test_llvm.py`
|
|
115
|
+
- Package manager → `tests/test_package_manager.py`
|
|
116
|
+
- Edge cases / stability → `tests/test_stability.py`
|
|
117
|
+
|
|
118
|
+
### Adding a New Built-in Function
|
|
119
|
+
|
|
120
|
+
1. Add the implementation in `epl/interpreter.py` inside `_call_builtin()`
|
|
121
|
+
2. Add VM support in `epl/vm.py` inside `_exec_call_builtin()`
|
|
122
|
+
3. Add compiler support in `epl/compiler.py` if applicable
|
|
123
|
+
4. Add stdlib documentation in `epl/stdlib.py`
|
|
124
|
+
5. Add tests in the appropriate test file
|
|
125
|
+
6. Update `docs/language-reference.md`
|
|
126
|
+
|
|
127
|
+
### Adding a New AST Node
|
|
128
|
+
|
|
129
|
+
1. Define the node class in `epl/ast_nodes.py`
|
|
130
|
+
2. Add parsing in `epl/parser.py`
|
|
131
|
+
3. Add interpretation in `epl/interpreter.py`
|
|
132
|
+
4. Add VM compilation in `epl/vm.py` (BytecodeCompiler + VM)
|
|
133
|
+
5. Add Kotlin transpilation in `epl/kotlin_gen.py` if needed
|
|
134
|
+
6. Add LLVM compilation in `epl/compiler.py` if needed
|
|
135
|
+
7. Add tests covering the new syntax
|
|
136
|
+
|
|
137
|
+
## Architecture Overview
|
|
138
|
+
|
|
139
|
+
See [docs/architecture.md](docs/architecture.md) for the full technical overview.
|
|
140
|
+
|
|
141
|
+
The core pipeline: **Source → Lexer → Parser → AST → Backend**
|
|
142
|
+
|
|
143
|
+
Backends:
|
|
144
|
+
- **Interpreter** — Tree-walking, full feature support
|
|
145
|
+
- **VM** — Bytecode compilation + stack-based execution (10-50x faster)
|
|
146
|
+
- **LLVM Compiler** — Native executables
|
|
147
|
+
- **Kotlin Transpiler** — Android apps via Jetpack Compose
|
|
148
|
+
|
|
149
|
+
## License
|
|
150
|
+
|
|
151
|
+
By contributing, you agree that your contributions will be licensed under the same license as the project.
|
eplang-7.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 EPL Team
|
|
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.
|
eplang-7.0.0/MANIFEST.in
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Include essential project files
|
|
2
|
+
include README.md
|
|
3
|
+
include LICENSE
|
|
4
|
+
include CONTRIBUTING.md
|
|
5
|
+
include CHANGELOG.md
|
|
6
|
+
include pyproject.toml
|
|
7
|
+
|
|
8
|
+
# Include EPL source files
|
|
9
|
+
recursive-include epl *.py *.epl *.json *.c *.md
|
|
10
|
+
|
|
11
|
+
# Include stdlib modules
|
|
12
|
+
recursive-include epl/stdlib *.epl *.json
|
|
13
|
+
|
|
14
|
+
# Include official packages
|
|
15
|
+
recursive-include epl/official_packages *.toml *.md *.epl
|
|
16
|
+
|
|
17
|
+
# Include templates (but NOT the heavy Android gradle wrapper binaries)
|
|
18
|
+
recursive-include epl/templates *.epl *.md *.xml *.gradle *.properties *.kt
|
|
19
|
+
include epl/templates/android/gradlew
|
|
20
|
+
include epl/templates/android/gradlew.bat
|
|
21
|
+
recursive-include epl/templates/android/gradle *.jar *.properties
|
|
22
|
+
|
|
23
|
+
# Include examples
|
|
24
|
+
recursive-include examples *.epl *.md
|
|
25
|
+
|
|
26
|
+
# Exclude compiled Python caches
|
|
27
|
+
global-exclude __pycache__
|
|
28
|
+
global-exclude *.pyc
|
|
29
|
+
global-exclude *.pyo
|
|
30
|
+
global-exclude *.pyd
|
|
31
|
+
|
|
32
|
+
# Exclude PyInstaller/frozen build artifacts (dist/epl/_internal contains PyTorch etc.)
|
|
33
|
+
prune dist
|
|
34
|
+
prune build
|
|
35
|
+
prune .git
|
|
36
|
+
prune .github
|
|
37
|
+
prune docs
|
|
38
|
+
prune tests
|
|
39
|
+
prune vscode-extension
|
|
40
|
+
prune epl/_internal
|
|
41
|
+
|
|
42
|
+
# Exclude large model/binary files
|
|
43
|
+
global-exclude *.exe
|
|
44
|
+
global-exclude *.dll
|
|
45
|
+
global-exclude *.so
|
|
46
|
+
global-exclude *.dylib
|
|
47
|
+
global-exclude *.whl
|
|
48
|
+
global-exclude *.zip
|
|
49
|
+
global-exclude *.tar.gz
|
|
50
|
+
global-exclude Modelfile
|