ADR-0024 Phase F (full) step 4: catalog token-keyword cleanup
Drops the 47 `parse.token.keyword.*` and 6 `parse.token.punct.*`
catalog entries (and their `KEYS_AND_PLACEHOLDERS` declarations).
Nothing consumes them: the walker renders keyword wording in
`format!(\"`{word}`\")` directly, sourced from grammar-tree Word
literals; punct wording surfaces the same way via
`Expectation::Punct(ch)`.
Structural-class labels (`parse.token.identifier`,
`parse.token.number`, `parse.token.string_literal`,
`parse.token.flag`, `parse.token.end_of_input`) and the lex-error
wordings (`parse.token.error.{bad_flag,unknown_char,
unterminated_string}`) stay. These are not derivable from the
grammar tree and the walker's expected-set / validator paths still
read them.
`friendly::keys::tests::keys_validate_against_catalog` continues to
assert catalog ↔ `KEYS_AND_PLACEHOLDERS` bidirectional coverage,
so the trimmed declaration is pinned against the trimmed catalog.
Tests: 806 passing, 0 failing, 1 ignored. Clippy clean.
This commit is contained in:
+8
-58
@@ -182,71 +182,21 @@ pub const KEYS_AND_PLACEHOLDERS: &[(&str, &[&str])] = &[
|
||||
("parse.usage.show_data", &[]),
|
||||
("parse.usage.show_table", &[]),
|
||||
("parse.usage.update", &[]),
|
||||
// Single-token vocabulary (ADR-0021 §4). One per Keyword
|
||||
// variant (declared by `Keyword::ALL`), one per Punct
|
||||
// variant, one per token-class label, one per LexError
|
||||
// kind. The per-Keyword and per-Punct entries are also
|
||||
// validated against the enums by
|
||||
// `keyword_and_punct_have_complete_token_vocabulary`.
|
||||
// Single-token vocabulary (ADR-0021 §4). Phase F of
|
||||
// ADR-0024 collapsed the per-keyword and per-punct catalog
|
||||
// entries — the walker renders keyword wording verbatim via
|
||||
// `format!("`{word}`")` rather than going through the catalog.
|
||||
// What remains are the structural-class labels (identifier,
|
||||
// number, string literal, flag, end of input) and the
|
||||
// lex-error wordings, none of which are derivable from the
|
||||
// grammar tree.
|
||||
("parse.token.end_of_input", &[]),
|
||||
("parse.token.error.bad_flag", &[]),
|
||||
("parse.token.error.unknown_char", &["found"]),
|
||||
("parse.token.error.unterminated_string", &[]),
|
||||
("parse.token.flag", &[]),
|
||||
("parse.token.identifier", &[]),
|
||||
("parse.token.keyword.action", &[]),
|
||||
("parse.token.keyword.add", &[]),
|
||||
("parse.token.keyword.advanced", &[]),
|
||||
("parse.token.keyword.as", &[]),
|
||||
("parse.token.keyword.cascade", &[]),
|
||||
("parse.token.keyword.change", &[]),
|
||||
("parse.token.keyword.column", &[]),
|
||||
("parse.token.keyword.create", &[]),
|
||||
("parse.token.keyword.data", &[]),
|
||||
("parse.token.keyword.delete", &[]),
|
||||
("parse.token.keyword.drop", &[]),
|
||||
("parse.token.keyword.export", &[]),
|
||||
("parse.token.keyword.false", &[]),
|
||||
("parse.token.keyword.from", &[]),
|
||||
("parse.token.keyword.help", &[]),
|
||||
("parse.token.keyword.import", &[]),
|
||||
("parse.token.keyword.in", &[]),
|
||||
("parse.token.keyword.insert", &[]),
|
||||
("parse.token.keyword.into", &[]),
|
||||
("parse.token.keyword.load", &[]),
|
||||
("parse.token.keyword.messages", &[]),
|
||||
("parse.token.keyword.mode", &[]),
|
||||
("parse.token.keyword.new", &[]),
|
||||
("parse.token.keyword.no", &[]),
|
||||
("parse.token.keyword.null", &[]),
|
||||
("parse.token.keyword.on", &[]),
|
||||
("parse.token.keyword.pk", &[]),
|
||||
("parse.token.keyword.quit", &[]),
|
||||
("parse.token.keyword.rebuild", &[]),
|
||||
("parse.token.keyword.relationship", &[]),
|
||||
("parse.token.keyword.rename", &[]),
|
||||
("parse.token.keyword.replay", &[]),
|
||||
("parse.token.keyword.restrict", &[]),
|
||||
("parse.token.keyword.save", &[]),
|
||||
("parse.token.keyword.set", &[]),
|
||||
("parse.token.keyword.short", &[]),
|
||||
("parse.token.keyword.show", &[]),
|
||||
("parse.token.keyword.simple", &[]),
|
||||
("parse.token.keyword.table", &[]),
|
||||
("parse.token.keyword.to", &[]),
|
||||
("parse.token.keyword.true", &[]),
|
||||
("parse.token.keyword.update", &[]),
|
||||
("parse.token.keyword.values", &[]),
|
||||
("parse.token.keyword.verbose", &[]),
|
||||
("parse.token.keyword.where", &[]),
|
||||
("parse.token.keyword.with", &[]),
|
||||
("parse.token.number", &[]),
|
||||
("parse.token.punct.close_paren", &[]),
|
||||
("parse.token.punct.colon", &[]),
|
||||
("parse.token.punct.comma", &[]),
|
||||
("parse.token.punct.dot", &[]),
|
||||
("parse.token.punct.equals", &[]),
|
||||
("parse.token.punct.open_paren", &[]),
|
||||
("parse.token.string_literal", &[]),
|
||||
// ---- Project lifecycle event notes ----
|
||||
("project.export_failed", &["error"]),
|
||||
|
||||
Reference in New Issue
Block a user