Commit 54cabdb
committed
Check the transcriptions against the vendored upstream sources
The keyword table, the %fallback set and "every parse function names its
rule" were all things only a careful reading could confirm, and the sort
of thing that quietly rots when the pin advances. Three tests now check
them mechanically:
- token rebuilds the keyword table from mkkeywordhash.c (now vendored
alongside parse.y and tokenize.c) and compares all 147 entries and
their TK_ codes;
- token rebuilds the %fallback set from parse.y and compares all 73,
both resolved for the pinned build's feature flags;
- parser checks that every one of parse.y's 133 nonterminals is named
somewhere in the parser, which is the repository rule read from the
side that catches an omission.
All three passed on the first run, which is the answer I wanted but not
the one worth relying on next time.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JzBeCg7rjweVW3uGPg5G7T1 parent b2ff013 commit 54cabdb
6 files changed
Lines changed: 940 additions & 7 deletions
File tree
- internal/reference
- parser
- token
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
19 | | - | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
10 | 22 | | |
11 | 23 | | |
12 | 24 | | |
13 | 25 | | |
| 26 | + | |
14 | 27 | | |
15 | 28 | | |
16 | 29 | | |
| |||
0 commit comments