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:
claude@clouddev1
2026-05-15 08:35:59 +00:00
parent 266b4c2ef4
commit fa994cfb66
2 changed files with 17 additions and 118 deletions
+9 -60
View File
@@ -372,67 +372,16 @@ parse:
import: "import <zip-path> [as <target>]"
mode: "mode simple | mode advanced"
messages: "messages | messages short | messages verbose"
# Single-token vocabulary the renderer uses to translate
# chumsky's expected-set patterns. One key per Keyword variant
# (validated against `Keyword::ALL`), one per Punct variant,
# one per token-class label, one per LexError kind.
# Single-token vocabulary (ADR-0021 §4, ADR-0024 §cleanup-pass).
# The per-keyword and per-punct entries collapsed when the
# walker became the source of truth — keyword wording is now
# produced verbatim as `` `<word>` `` by the parse-error
# formatter, sourced from the grammar tree's Word literals.
# What remains here is structural-class labels (identifier /
# number / string literal / flag / end of input) and the
# lex-error wordings, none of which are derivable from the
# grammar.
token:
keyword:
create: "`create`"
drop: "`drop`"
add: "`add`"
rename: "`rename`"
change: "`change`"
show: "`show`"
insert: "`insert`"
update: "`update`"
delete: "`delete`"
replay: "`replay`"
table: "`table`"
column: "`column`"
data: "`data`"
relationship: "`relationship`"
pk: "`pk`"
with: "`with`"
from: "`from`"
to: "`to`"
into: "`into`"
as: "`as`"
in: "`in`"
on: "`on`"
set: "`set`"
where: "`where`"
values: "`values`"
"null": "`null`"
"true": "`true`"
"false": "`false`"
cascade: "`cascade`"
restrict: "`restrict`"
action: "`action`"
"no": "`no`"
# App-lifecycle commands (per ADR-0003, surfaced through
# the parser to drive completion + usage templates).
quit: "`quit`"
help: "`help`"
rebuild: "`rebuild`"
save: "`save`"
new: "`new`"
load: "`load`"
export: "`export`"
import: "`import`"
mode: "`mode`"
messages: "`messages`"
simple: "`simple`"
advanced: "`advanced`"
short: "`short`"
verbose: "`verbose`"
punct:
colon: "`:`"
open_paren: "`(`"
close_paren: "`)`"
comma: "`,`"
equals: "`=`"
dot: "`.`"
identifier: "identifier"
number: "number"
string_literal: "string literal"