Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Franck Pommereau
/
snakes
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Franck Pommereau
2022-10-24 15:02:08 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4b98f2bac679222fc28b3de538090d2373e214c8
4b98f2ba
1 parent
68df9995
fixed inhibitor arcs
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
snakes/nets.py
snakes/nets.py
View file @
4b98f2b
...
...
@@ -1729,8 +1729,11 @@ class Inhibitor (Test) :
>>> Inhibitor(Variable("x")).check(Substitution(x=4), MultiSet([1, 2, 3]))
True
"""
return
(
not
self
.
_annotation
.
check
(
binding
,
tokens
)
and
self
.
_condition
(
binding
))
try
:
modes
=
self
.
modes
(
tokens
)
except
:
modes
=
[]
return
binding
in
modes
class
Flush
(
ArcAnnotation
)
:
"""A flush arc used as on input arc will consume all the tokens in
...
...
Please
register
or
login
to post a comment