Jasmine Snake, another JavaScript interpreter written on Python 3
 
 
 
Go to file
Yury Kurlykov 8bba41bd45
Add CI badge in README.md
2020-06-28 18:06:34 +10:00
.github/workflows Fix ANTLR4 file generation in CI 2020-06-28 18:02:06 +10:00
grammars Comment out RegularExpressionLiteral 2020-04-30 00:58:22 +10:00
jasminesnake Implement CST to AST convert (WIP) 2020-06-28 16:49:25 +10:00
tests Add *proper* tests 2020-06-28 17:24:38 +10:00
.gitignore Initial commit 2020-04-15 16:15:56 +10:00
LICENSE Initial commit 2020-04-15 16:15:56 +10:00
README.md Add CI badge in README.md 2020-06-28 18:06:34 +10:00
requirements-dev.txt Initial commit 2020-04-15 16:15:56 +10:00
requirements.txt Add AST to ASCII converter 2020-04-28 03:30:37 +10:00
setup.py Initial commit 2020-04-15 16:15:56 +10:00
tox.ini Configure tox to run tests 2020-06-28 17:54:53 +10:00

README.md

Jasmine Snake

Another JavaScript interpreter written on Python 3.

Code style: black SemVer: 2.0.0 Testing status

Requirements

  • ANTLR 4
  • Colorama

To run tests:

  • pytest

You can get ANTLR here, other dependencies could be installed with pip:

pip install -r requirements.txt # Use requirements-dev.txt if you want to run tests

Running

antlr4 -Xexact-output-dir -o jasminesnake/lex -package lex -Dlanguage=Python3 -listener grammars/*.g4
python -m jasminesnake

Testing

# Running with -s is optional
python -m pytest -s

Credits

ESTree specification: https://github.com/estree/estree/

JavaScript grammar source: https://github.com/antlr/grammars-v4/tree/master/javascript/javascript

The snake: https://textart.io/art/lnl9xe1OsKIow7xPGeWDrAeF/snake