Intellect
Intellect copied to clipboard
Can't match two input in when?
hi, I went to use two class to activate a rule but it seems don't work anyway.
part of the code is like :
rule "should never get here":
agenda-group "test_d"
when:
$lineB := Line()
$pointA := Point()
then:
bar()
and error is
Traceback (most recent call last):
File "D:/CODE/Python/Test/firstapp/Intellect_test/Intellect_test.py", line 25, in <module>
policy_d = myIntellect.learn(Intellect.local_file_uri("./rule.policy"))
File "C:\Python27\lib\site-packages\intellect-1.4.9-py2.7.egg\intellect\Intellect.py", line 190, in learn
return self.learn_policy(identifier)
File "C:\Python27\lib\site-packages\intellect-1.4.9-py2.7.egg\intellect\Intellect.py", line 247, in learn_policy
file_node = parser.file()
File "C:\Python27\lib\site-packages\intellect-1.4.9-py2.7.egg\intellect\grammar\PolicyParser.py", line 245, in file
statement1 = self.statement()
File "C:\Python27\lib\site-packages\intellect-1.4.9-py2.7.egg\intellect\grammar\PolicyParser.py", line 338, in statement
ruleStmt4 = self.ruleStmt()
File "C:\Python27\lib\site-packages\intellect-1.4.9-py2.7.egg\intellect\grammar\PolicyParser.py", line 975, in ruleStmt
object.append_child( then26 )
File "C:\Python27\lib\site-packages\intellect-1.4.9-py2.7.egg\intellect\Node.py", line 152, in append_child
raise TypeError("Parameter 'child' cannot be None.")
Exception: line 46:12 mismatched input u'$pointA' expecting DEDENT
may i wrong? or it don't support this kind of syntax? thanks!!