Jasmine Snake, another JavaScript interpreter written on Python 3
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Yury Kurlykov 8bba41bd45
Add CI badge in README.md
3 years ago
.github/workflows Fix ANTLR4 file generation in CI 3 years ago
grammars Comment out RegularExpressionLiteral 3 years ago
jasminesnake Implement CST to AST convert (WIP) 3 years ago
tests Add *proper* tests 3 years ago
.gitignore Initial commit 3 years ago
LICENSE Initial commit 3 years ago
README.md Add CI badge in README.md 3 years ago
requirements-dev.txt Initial commit 3 years ago
requirements.txt Add AST to ASCII converter 3 years ago
setup.py Initial commit 3 years ago
tox.ini Configure tox to run tests 3 years ago

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