Refactored to allow ConceptEvaluator

This commit is contained in:
2019-11-14 22:04:38 +01:00
parent 576ce77740
commit 9e10e77737
30 changed files with 2406 additions and 1007 deletions
+15 -4
View File
@@ -1,6 +1,10 @@
In this example, I try to think of how I can deal with errors
```
> "hello
-> unfinished quote "
create a concept to recognize the error
> def concept unfinished quote q
... where:
...... q in ('"', '"')
@@ -9,9 +13,16 @@
... input = sheerka.last_input
Create the rule to manage the error
> when unfinished quote q as c:
... add rule as:
...... if q in sheerka.input:
... add rule r as:
...... if q is last of sheerka.input:
......... sheerka.resume(c, c.input + input)
......... remove rule
```
......... remove r
def concept a is last of b as:
where b is list
as b[-1] == a
```