Fixed #48 : RelationalExpressionParser: Implement relational operator parser

Fixed #49 : ExpressionParser: Implement ExpressionParser
Fixed #50 : Implement ReteConditionExprVisitor
Fixed #51 : Implement PythonConditionExprVisitor
Fixed #52 : SheerkaConceptManager: I can get and set concept property
This commit is contained in:
2021-03-23 11:35:10 +01:00
parent f8e47e2b38
commit 6cda2686fb
25 changed files with 1083 additions and 978 deletions
+7 -4
View File
@@ -7,9 +7,9 @@ set_auto_eval(c:q:)
def concept "x is a concept" as isinstance(x, Concept) pre is_question()
# is a
def concept x is a y as set_isa(x, y)
def concept x is a y as set_isa(x, y) ret x
set_auto_eval(c:x is a y:)
def concept x is an y as set_isa(x, y)
def concept x is an y as set_isa(x, y) ret x
set_auto_eval(c:x is an y:)
def concept x is a y as isa(x,y) pre is_question()
# no need to auto eval as it's a question
@@ -18,9 +18,9 @@ def concept x is an y as isa(x,y) pre is_question()
# has a
def concept x has a y as set_hasa(x, y)
def concept x has a y as set_hasa(x, y) ret x
set_auto_eval(c:x has a y:)
def concept x has an y as set_hasa(x, y)
def concept x has an y as set_hasa(x, y) ret x
set_auto_eval(c:x has an y:)
def concept x has a y as hasa(x,y) pre is_question()
# no need to auto eval as it's a question
@@ -39,6 +39,8 @@ set_is_greater_than(__PRECEDENCE, c:x and y:, c:x or y:, 'Sya')
set_is_less_than(__PRECEDENCE, c:q:, c:x or y:, 'Sya')
def concept the x ret memory(x)
def concept a x where 'x is a concept' ret x
def concept an x where 'x is a concept' ret x
# default
def concept male
@@ -54,6 +56,7 @@ def concept boy
def concept boys
def concept girl
def concept girls
def concept shirt
# days of the week
def concept monday