nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
093e77e
)
nitcc: trim also remove tags on bad states
author
Jean Privat
<jean@pryen.org>
Thu, 18 Jul 2019 18:06:52 +0000
(14:06 -0400)
committer
Jean Privat
<jean@pryen.org>
Thu, 18 Jul 2019 18:06:52 +0000
(14:06 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
contrib/nitcc/src/autom.nit
patch
|
blob
|
history
diff --git
a/contrib/nitcc/src/autom.nit
b/contrib/nitcc/src/autom.nit
index
bec0f07
..
c771408
100644
(file)
--- a/
contrib/nitcc/src/autom.nit
+++ b/
contrib/nitcc/src/autom.nit
@@
-358,10
+358,14
@@
class Automaton
if not goods.has(s) then bads.add(s)
end
- # Remove their transitions
+ # Remove their transitions and tags
for s in bads do
for t in s.ins.to_a do t.delete
for t in s.outs.to_a do t.delete
+ if tags.has_key(s) then
+ for t in tags[s] do retrotags[t].remove(s)
+ tags.keys.remove(s)
+ end
end
# Keep only the good stuff