Franck Pommereau

fixed inhibitor arcs

...@@ -1729,8 +1729,11 @@ class Inhibitor (Test) : ...@@ -1729,8 +1729,11 @@ class Inhibitor (Test) :
1729 >>> Inhibitor(Variable("x")).check(Substitution(x=4), MultiSet([1, 2, 3])) 1729 >>> Inhibitor(Variable("x")).check(Substitution(x=4), MultiSet([1, 2, 3]))
1730 True 1730 True
1731 """ 1731 """
1732 - return (not self._annotation.check(binding, tokens) 1732 + try :
1733 - and self._condition(binding)) 1733 + modes = self.modes(tokens)
1734 + except :
1735 + modes = []
1736 + return binding in modes
1734 1737
1735 class Flush (ArcAnnotation) : 1738 class Flush (ArcAnnotation) :
1736 """A flush arc used as on input arc will consume all the tokens in 1739 """A flush arc used as on input arc will consume all the tokens in
......