diff --git a/README.md b/README.md new file mode 100644 index 0000000..4f0eb73 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# Pylasu Interpreter Example +This [Interpreter Example project](https://github.com/Strumenta/pylasu-interpreter-example) demonstrates an interpreter implementation using the [Pylasu](https://github.com/strumenta/pylasu) library. For details, you can check the the Virtual Meetup - [Building an interpreter in Python with Pylasu](https://www.youtube.com/watch?v=W1SqfflBwcc). + +- Prerequisites: Python, Git +## Setup + +### Installation + +Clone the repository +```bash +git clone git@github.com:Strumenta/pylasu-interpreter-example.git +cd pylasu-interpreter-example +``` + +Activate the virtual environment +```python +python -m venv venv +source venv/bin/activate +pip install -r Requirements.txt +``` + +Generate the parsers inside the **entity_parser** folder +```bash +sh generate_parsers.sh +``` +### Usage + +Run the interpreter though a local server at http://127.0.0.1:5000/ +```bash +sh run_web.sh +``` + +### Version Compatibility +This project is designed to work with python 3.12. +In case of version issues, you can use pyenv, e.g. +```bash +pyenv install 3. +pyenv local 3. +``` + diff --git a/Requirements.txt b/Requirements.txt index f5ad758..d51c6a0 100644 --- a/Requirements.txt +++ b/Requirements.txt @@ -2,14 +2,14 @@ antlr4-python3-runtime==4.11.1 click==8.1.3 Flask==2.2.2 future-fstrings==1.2.0 -importlib-metadata==5.0.0 +importlib-metadata==6.0.0 # Update to a version compatible with Python 3.12 itsdangerous==2.1.2 Jinja2==3.1.2 -lxml==4.9.1 +lxml==4.9.3 # Use a more recent version MarkupSafe==2.1.1 ordered-set==4.1.0 pyecore==0.13.0 pylasu==0.3.0 -RestrictedPython==6.0 +RestrictedPython==7.2 # Update to the newer version Werkzeug==2.2.2 zipp==3.10.0