Expand description
Phase 2/3: token extraction and structural parsing.
Takes MarkingCandidate spans from the scanner and produces IsmAttributes.
§Phase 2 — Token Extraction
A compile-time Aho-Corasick automaton (built from CVE token list in marque-capco) runs over each candidate span, identifying known tokens and their positions. Unrecognized tokens within a candidate boundary are themselves diagnostics.
§Phase 3 — Structural Parsing
Token sequence → IsmAttributes. Validates ordering and block structure.
Produces ParseError for structural violations; these feed into the rule engine
as diagnostics with associated fixes.
Note: the Aho-Corasick automaton is injected via TokenSet to keep marque-core
free of a direct dependency on marque-capco’s generated data.
Structs§
- Parsed
Marking - Parse result for a single candidate.
- Parser
- Phase 2+3 parser. Stateless; call
Parser::parseper candidate.