From 6677df46ee9b3cabe84263279b61828eb5f31ae7 Mon Sep 17 00:00:00 2001 From: Erez Shinan Date: Mon, 19 Feb 2024 22:56:20 +0700 Subject: [PATCH 1/2] Lark-js now uses a fixed Python version of Lark (<=1.1.5) --- README.md | 4 +++- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 92e5f58..136d53a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Lark is a popular parsing toolkit for Python. -This project is a live port of the Lark standalone parser to Javascript. +This project is a port of the Lark standalone parser to Javascript. **Lark.js** takes a `.lark` grammar, and from it generates a standalone Javascript parser. @@ -52,6 +52,8 @@ Install lark-js on Python: pip install lark-js --upgrade ``` +Note: lark-js requires that the version for lark-python is <=1.1.5 + ### Generate a Javascript LALR(1) parser ```sh diff --git a/pyproject.toml b/pyproject.toml index 168cb6b..8bdef99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ packages = [{ include = "larkjs" }] [tool.poetry.dependencies] -lark = "^1.0.0" +lark = ">=1.0.0,<=1.1.6" [build-system] requires = ["poetry-core>=1.0.0"] From 45484507aeffcfa12201d2a11aa027e863508e0d Mon Sep 17 00:00:00 2001 From: Erez Shinan Date: Mon, 19 Feb 2024 23:01:36 +0700 Subject: [PATCH 2/2] Fix github workflow --- .github/workflows/node.js.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 47a1acf..9011c40 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -34,7 +34,9 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.8 + - name: Install poetry + run: python -m pip install poetry - name: Install dependencies - run: python -m pip install lark + run: poetry install - name: Test parser generator (Python) - run: python -m test.test \ No newline at end of file + run: poetry run python -m test.test \ No newline at end of file