feat(domain): rule groups — MP rule-string parser/serializer, builtin keywords, chain evaluation wired into slot
- rules/: RuleExpr tree, '>' layers with ! & | and parens, position-aware errors (unknown atom with suggestions, unsupported music atoms, parens, empty layer) - builtin keyword table aligned with MP BUILTIN_RULE_SET; field-based judgement where parsed fields exist, MP regex otherwise; custom atoms (MP 7 fields) - chain evaluation: hard excludes, ladder pri 100-k, groups AND-ed, pri from last laddered group, readable per-atom trace - slot: SlotSpec.rules, rule.hard_exclude / rule.no_layer_matched violations, pri basis switches to priority when a rule ladder is present - differential: 66 rule chains x 32 torrents vs MP python path (parse 64/64, pri 2090/2112, 22 registered mp_bug) Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
22856d0447
commit
e994a7bcfa
13 files changed
+23919
-10
No files matched your search
@@ -0,0 +1,32 @@
|
||||
export {
|
||||
ATOM_ID_RE,
|
||||
type AtomHit,
|
||||
type AtomInput,
|
||||
BUILTIN_ATOM_MAP,
|
||||
BUILTIN_ATOMS,
|
||||
type BuiltinAtom,
|
||||
compileMpPattern,
|
||||
customAtomFromMp,
|
||||
testCustomAtom,
|
||||
} from "./atoms.ts";
|
||||
export {
|
||||
type AtomCatalog,
|
||||
catalogOf,
|
||||
evaluateRuleChain,
|
||||
evaluateRuleGroup,
|
||||
matchesExpr,
|
||||
testAtom,
|
||||
} from "./evaluate.ts";
|
||||
export {
|
||||
atomsOf,
|
||||
fromMpParseList,
|
||||
normalizeExpr,
|
||||
parseExpr,
|
||||
parseRuleString,
|
||||
type RuleParseOptions,
|
||||
type RuleParseResult,
|
||||
serializeExpr,
|
||||
serializeLayers,
|
||||
suggestAtoms,
|
||||
} from "./expr.ts";
|
||||
export * from "./types.ts";
|
||||
Reference in new issue
Block a user