lollipop operator, fixed but in grammar-lalrpop for environment parsing

This commit is contained in:
elvis
2025-06-19 23:48:16 +02:00
parent bbff61f71a
commit 732683fd24
7 changed files with 343 additions and 169 deletions

View File

@ -7,7 +7,7 @@ use super::translator::{IdType};
// -----------------------------------------------------------------------------
// RSset
// -----------------------------------------------------------------------------
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct RSset {
identifiers: HashSet<IdType>
}
@ -103,6 +103,7 @@ impl RSreaction {
products }
}
// see enable
pub fn enabled(&self, current_state: &RSset) -> bool {
self.reactants.is_subset(current_state)
&& self.inihibitors.is_disjoint(current_state)