https://github.com/akrylysov/abrvalg
Python-like programming language interpreter written in Python
https://github.com/akrylysov/abrvalg
interpreter python
Last synced: about 2 months ago
JSON representation
Python-like programming language interpreter written in Python
- Host: GitHub
- URL: https://github.com/akrylysov/abrvalg
- Owner: akrylysov
- License: mit
- Created: 2015-06-29T12:39:24.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-06-30T00:12:34.000Z (almost 8 years ago)
- Last Synced: 2025-02-27T05:55:55.289Z (2 months ago)
- Topics: interpreter, python
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 105
- Watchers: 6
- Forks: 16
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Abrvalg
=======Abrvalg is a Python-like programming language interpreter.
The project contains:
- Regular expression based lexer
- Top-down recursive descent parser
- AST-walking interpreter
- REPLAbrvalg doesn't require any third-party libraries.
What the language looks like:
.. code-block::
func map(arr, fn):
r = []
for val in arr:
r = r + [fn(val)]
rfunc factorial(n):
if n <= 1:
1
else:
n * factorial(n - 1)print(map(1...10, factorial))
You can find more examples in ``tests`` directory.
How to try it:
.. code-block::
git clone https://github.com/akrylysov/abrvalg.git
cd abrvalg
python -m abrvalg tests/factorial.abr