DOG-036 DONE: nav lexer tweaks — key min 2+2, rooted paths, anchor as evidence

Now
DONE
Sev
MED
Ask
gritzko
Rep
///quickjab
On1
DOG-033
On2
DOG-034
See
LITE-024
See
LITE-025

gritzko's ruling 2026-08-14, from real ~/src/linux text: GPL-2 must not lex as a ticket key while /README:10 and path/README:10 must lex as file refs. The fused-F rules in dog/tok are REBUILT around one component grammar, extracted into dog/tok/LINK.rl and included by every prose machine — .mkd, .md and comment bodies alike (see Design decisions) — the known-basenames dictionary was NOT taken, so a bare extensionless README:10 stays unfused.

Input

Context

Today the key rule is [A-Z][A-Z0-9_]* "-" dgt+ (fires on GPL-2, C-1, BUG-1); pathslash requires a dotted final ((seg "/")+ seg("."seg)+), so abc/Makefile:20 never fuses; no rooted or ./ head exists. DOG-034's pathanchor rides both tiers.

Goals

Every prose machine rebuilt around ONE shared component grammar (below), regenerated twins, fixtures. The whole rule is: a fused F is a ticket code, or a name that carries its own EVIDENCE — a known extension, or an anchor past a slash.

Constraints

WIP

Design decisions

gritzko's component spec (2026-08-14, the RESTRUCTURE ruling) — the accreted pathslash/pathbare/pathfinal defines are retired, both grammars read as this, one named define per component:

code    = [A-Z]{2} [A-Z0-9_]* "-" [0-9]{2,}     # + the trailing guard (-d/.d/letter)
seg     = [A-Za-z_] [A-Za-z0-9_]*
ext     = "." KNOWN                             # known extension
extany  = "." seg                               # any dotted tail
line    = ":" [0-9]+ (":" [0-9]+)?
commit  = ":" ron64{1,4} ":" (ron64 ron64){2,5}
anchor  = line | commit
dirs    = (seg "/")+
relfile = dirs? seg ext anchor?                 # known ext: slash optional, anchor optional

| dirs seg extany? anchor # slashed + anchored: ext-less OR unknown ext both fuse

rooted = ("/" | "./") dirs? seg extany? anchor # anchor always required ticket = code anchor? | code "/" relfile ACCEPT = ticket | relfile | rooted


Three renderings the .rl files make of it, each forced by the machine:

TODOs

Blockers and bummers

Outcome

Landed in //DOG-036 (staged, not committed): the component spec above is EXTRACTED into dog/tok/LINK.rl and included by every prose machine, twins regenerated with ragel -C <X>.c.rl -o <X>.rl.c -L.

Suggested commit: DOG-036: LINK.rl — one link grammar, mkd/md/comments