tuples for positive assert

This commit is contained in:
elvis
2025-12-15 21:07:55 +01:00
parent e983e778eb
commit e80bb5b20a
10 changed files with 6944 additions and 101 deletions

View File

@ -29,7 +29,8 @@ match {
"ReactantsAbsent", "SystemContext", "SystemEntities", "[", "\"", "]", "^",
"^^", "edge", "else", "empty", "false", "for", "if", "in", "label",
"length", "let", "neighbours", "not", "rand", "return", "source",
"system", "target", "then", "toel", "tostr", "true", "{", "||", "}",
"system", "target", "then", "toel", "tostr", "true", "tuple", "{", "||",
"}", "first", "second",
} else {
r"[0-9]+" => NUMBER
} else {
@ -226,6 +227,8 @@ AssertUnarySuffix: relabel::Unary = {
"length" => relabel::Unary::Length,
"tostr" => relabel::Unary::ToStr,
"toel" => relabel::Unary::ToEl,
"first" => relabel::Unary::First,
"second" => relabel::Unary::Second,
#[precedence(level="1")]
<q: AssertQualifier> => relabel::Unary::Qualifier(q),
@ -316,4 +319,5 @@ AssertBinaryPrefix: relabel::Binary = {
"min" => relabel::Binary::Min,
"max" => relabel::Binary::Max,
"commonsubstr" => relabel::Binary::CommonSubStr,
"tuple" => relabel::Binary::Tuple,
}

View File

@ -30,7 +30,7 @@ match {
"SystemEntities", "[", "\"", "]", "^", "^^", "edge", "else", "empty",
"entities", "false", "for", "if", "in", "label", "length", "let",
"neighbours", "node", "not", "rand", "return", "source", "system", "target",
"then", "toel", "tostr", "true", "{", "||", "}",
"then", "toel", "tostr", "true", "tuple", "{", "||", "}", "first", "second",
} else {
r"[0-9]+" => NUMBER
} else {
@ -227,6 +227,8 @@ GroupUnarySuffix: grouping::Unary = {
"length" => grouping::Unary::Length,
"tostr" => grouping::Unary::ToStr,
"toel" => grouping::Unary::ToEl,
"first" => grouping::Unary::First,
"second" => grouping::Unary::Second,
#[precedence(level="1")]
<q: GroupQualifier> => grouping::Unary::Qualifier(q),
@ -317,4 +319,5 @@ GroupBinaryPrefix: grouping::Binary = {
"min" => grouping::Binary::Min,
"max" => grouping::Binary::Max,
"commonsubstr" => grouping::Binary::CommonSubStr,
"tuple" => grouping::Binary::Tuple,
}

View File

@ -28,7 +28,8 @@ match {
"if", "in", "isGuarded", "isIdentifier", "isNill",
"isNondeterministicChoice", "isRepeated", "isSet", "isSummation", "label",
"length", "let", "neighbours", "not", "rand", "return", "source", "system",
"target", "then", "toel", "tostr", "true", "{", "||", "}",
"target", "then", "toel", "tostr", "true", "{", "||", "}", "first",
"second", "tuple",
} else {
r"[0-9]+" => NUMBER
} else {
@ -229,6 +230,8 @@ AssertUnarySuffix: positive_relabel::PositiveUnary = {
"length" => positive_relabel::PositiveUnary::Length,
"tostr" => positive_relabel::PositiveUnary::ToStr,
"toel" => positive_relabel::PositiveUnary::ToEl,
"first" => positive_relabel::PositiveUnary::First,
"second" => positive_relabel::PositiveUnary::Second,
#[precedence(level="1")]
<q: AssertQualifier> => positive_relabel::PositiveUnary::Qualifier(q),
@ -317,4 +320,5 @@ AssertBinaryPrefix: positive_relabel::PositiveBinary = {
"min" => positive_relabel::PositiveBinary::Min,
"max" => positive_relabel::PositiveBinary::Max,
"commonsubstr" => positive_relabel::PositiveBinary::CommonSubStr,
"tuple" => positive_relabel::PositiveBinary::Tuple,
}

View File

@ -30,6 +30,7 @@ match {
"isNondeterministicChoice", "isRepeated", "isSet", "isSummation", "label",
"length", "let", "neighbours", "node", "not", "rand", "return", "source",
"system", "target", "then", "toel", "tostr", "true", "{", "||", "}",
"first", "second", "tuple", "entities",
} else {
r"[0-9]+" => NUMBER
} else {
@ -230,6 +231,8 @@ GroupUnarySuffix: positive_grouping::PositiveUnary = {
"length" => positive_grouping::PositiveUnary::Length,
"tostr" => positive_grouping::PositiveUnary::ToStr,
"toel" => positive_grouping::PositiveUnary::ToEl,
"first" => positive_grouping::PositiveUnary::First,
"second" => positive_grouping::PositiveUnary::Second,
#[precedence(level="1")]
<q: GroupQualifier> => positive_grouping::PositiveUnary::Qualifier(q),
@ -318,4 +321,5 @@ GroupBinaryPrefix: positive_grouping::PositiveBinary = {
"min" => positive_grouping::PositiveBinary::Min,
"max" => positive_grouping::PositiveBinary::Max,
"commonsubstr" => positive_grouping::PositiveBinary::CommonSubStr,
"tuple" => positive_grouping::PositiveBinary::Tuple,
}