From 1b951813f43689b047418e76318350272baffd1e Mon Sep 17 00:00:00 2001 From: Mark Date: Sat, 12 Nov 2022 19:14:58 -0800 Subject: [PATCH] Fixed command parser --- .vscode/settings.json | 1 + lamb_engine/parser.py | 2 +- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 13b366e..3080ebc 100755 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,6 +8,7 @@ "mdel", "onefile", "Packrat", + "printables", "pyparsing", "rlimit", "runstatus", diff --git a/lamb_engine/parser.py b/lamb_engine/parser.py index 1198eee..28650f8 100755 --- a/lamb_engine/parser.py +++ b/lamb_engine/parser.py @@ -56,7 +56,7 @@ class LambdaParser: (self.lp + self.pp_history + self.rp) ) - self.pp_command = pp.Suppress(":") + pp.Word(pp.alphas + "_") + pp.Word(pp.alphas + pp.nums + "_.")[0, ...] + self.pp_command = pp.Suppress(":") + pp.Word(pp.alphas + "_") + pp.Word(pp.printables)[0, ...] self.pp_all = ( diff --git a/pyproject.toml b/pyproject.toml index 77a6010..507e3b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ lamb = "lamb_engine:main" [project] name = "lamb_engine" description = "A lambda calculus engine" -version = "1.1.6" +version = "1.1.7" dependencies = [ "prompt-toolkit==3.0.31", "pyparsing==3.0.9"