Repository navigation
Admit the G0 service family on exact-word terminals, with the evidence 4b(4) requires - #11955
Merged
Merged
Conversation
… word). A literal terminal matches one exact word of a token class and publishes the class identity, so a marker word can be a grammar row without minting a keyword token class. The parser's FIRST element becomes FirstKey (any-of-class | exact word) with equality, overlap and admission defined once; ChoiceByWord dispatches on the token's word inside a class bucket, and a bucket with no exact word compiles exactly the plan it did before. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…tors. The floor's resolve refused six annotations inside declaration bodies (DESIGN 4c: only leading module-scope blocks are modeled) and an if whose arms disagreed because a fold started from an untyped Empty. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review 68453: the constructor had no call site; the claims built the variant directly. They now use the constructor a grammar author would. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… residue positively. Side-chat hold on 8e2b941: the compared pair also differed in its suffix class, so class lookahead could separate it; and the control negated a helper that is false on ANY rejection. The compared pair is now word . pcp_a / word . pcp_a, and the control requires acceptance WITH the ^parse_grammar_choice_overlap_residue diagnostic, so an unrelated rejection fails it. The unequal-suffix pair stays as the second-word execution control. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Rebuilt on #11710's head: the 12 keyword token classes and the whole contextual/reserved name-slot machinery are gone; every marker word is a LiteralTerminal over dag_token_ident. The io field tail stays service-scoped. service_keywords_remain_usable_as_names_holds is retired with its reason: it is true by construction once the words are never keywords. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Parent correction: the property is guaranteed by the deleted keyword lex rules, not by choice_plan's match-is-not-stamp claim, which is a neighbouring property. States the census the guarantee rests on. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…e 4b(4) requires The service family is admitted through a grammar terminal matching ONE exact word, so the twelve marker words stay ordinary identifiers everywhere else and the lexer gains no rule. This supersedes the keyword-token implementation of gunbc#11622, which gave each marker its own token class and was measured as a corpus-wide cost defect. WHAT IT ACTUALLY TOOK, because the branch this was carried from did not compile. `dag_grammar_literal_terminal` was called twelve times and declared nowhere, on its own base or on main, so resolve refused with no established callee identity. Two things closed it, neither a language change: - the algebra constructor `grammar_expr_literal_terminal` already exists in `v2.std.grammar`; it needed a local wrapper in this file's existing idiom, beside its sibling `dag_grammar_terminal_lexeme`. - seven marker words -- service, operation, input, output, readonly, idempotent, hermetic -- are RESERVED in the SEED's `extdeps.languages.dag.syntax` `dag_keyword_set`, so `^service` is not writable in .dag source: a caret literal takes an identifier and a keyword is not one. Those seven are interned from their String spelling by `symbol_intern_lexeme`, which no keyword rule intercepts. G0 carries no keyword entry for any of them, which is the design. EVIDENCE. All 17 pre-existing claims execute green, including the full real `access.PosixEffectivePrincipal` service body -- the leftover `service` token at `dag/extdeps/access/posix_effective_principal_read_op.dag` that this family exists to clear -- and both normalized-tree door claims, so a parsed service is still refused before resolve and the `fn` control is still admitted through the same route. Parsing is not lowering. TWO REPAIRS TO THE EVIDENCE ITSELF. `service_keywords_remain_usable_as_names_holds` is RESTORED. It had been retired as a 4b(4) climb on the argument that deleting the keyword lex rules left its RED unauthorable. 4b(4) dissolves lower-rung PRODUCTION machinery and never the evidence, and 4b decides authorability at the FIXTURE boundary, not the corpus boundary -- plain source using the marker words as names is exactly source handed to the compiler by a fixture. It executes green. The superseded annotation is deleted rather than left standing beside the claim it argued against. `refuses` was the negation of `parses`, and `parse_src` folds a tokenize rejection and a parse rejection into one `Rejected`, so every one of the nine refusal claims was green whenever ANYTHING failed -- the absorbing arm DESIGN 5 refuses. `refuses_at_parse` requires tokenize to ACCEPT and parse to REJECT. All nine stay green under the pin, so they were refusing at the right door; that is now established rather than assumed. The pin carries its OWN discriminating control, `a_lexical_failure_is_not_a_parse_door_refusal_holds`: a source that dies in the lexer is not a parse-door refusal, which also establishes by execution that the fixture fails at tokenize. Delete the tokenize arm and that claim reds while all nine service refusals stay green. The roadmap row's citation of the carried branch as PREPARED WORK is retracted in place, on the row, with what the implementation actually cost. NOT IN SCOPE, per the row's own out_of_scope: the evaluation-step cost of the whole-service witness, which is its own roadmap node and wants a matched-base re-measurement after the keyword machinery is gone -- which this change is. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
briansrls
added this pull request to the merge queue
Sep 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #11622's keyword-token implementation. The service family is admitted through a grammar terminal matching one exact word, so the twelve marker words stay ordinary identifiers everywhere else and the lexer gains no rule — which is the whole cost argument, since #11622 turned every plain-name slot into a thirteen-way choice and was measured raising eval steps on 192 existing witnesses with none falling.
The branch this was carried from did not compile
Worth stating plainly, because I cited it as "prepared work" and was wrong.
dag_grammar_literal_terminalwas called twelve times and declared nowhere — not on its own base, not on main:I had verified that it merged main cleanly and never executed it. A clean merge of source that never compiled is not prepared work — the specification-without-execution trap §5 names. The roadmap row's citation is retracted in place, on the row.
Two things closed it, neither a language change:
grammar_expr_literal_terminalalready exists inv2.std.grammar; it wanted a local wrapper in this file's existing idiom, beside its siblingdag_grammar_terminal_lexeme.service,operation,input,output,readonly,idempotent,hermetic— are reserved in the seed'sdag_keyword_set, so^serviceis not writable in.dagsource at all: a caret literal takes an identifier and a keyword is not one. Those seven intern from their String spelling viasymbol_intern_lexeme, which no keyword rule intercepts. G0 carries no keyword entry for any of them — which is the design, and what keeps the name-usability control meaningful.Evidence
All 17 pre-existing claims execute green, including the full real
access.PosixEffectivePrincipalservice body — the leftoverservicetoken atdag/extdeps/access/posix_effective_principal_read_op.dagthat this family exists to clear — and both normalized-tree door claims, so a parsed service is still refused before resolve and thefncontrol is still admitted through the same route. Parsing is not lowering.Two repairs to the evidence itself
service_keywords_remain_usable_as_names_holdsis restored. It had been retired as a §4b(4) climb, arguing the RED was no longer authorable. §4b(4) dissolves lower-rung production machinery and never the evidence, and §4b decides authorability at the fixture boundary, not the corpus boundary — plain source using the marker words as names is exactly source handed to the compiler by a fixture. It executes green. The superseded annotation is deleted rather than left beside the claim it argued against.refuseswas literally!parses, andparse_srcfolds tokenize and parse rejections into oneRejected— so all nine refusal claims were green whenever anything failed, the absorbing arm §5 refuses.refuses_at_parserequires tokenize to accept and parse to reject. All nine stay green under the pin, so they were refusing at the right door; that is now established rather than assumed.The pin carries its own discriminating control,
a_lexical_failure_is_not_a_parse_door_refusal_holds— a source that dies in the lexer is not a parse-door refusal. That also establishes by execution that the fixture fails at tokenize, since otherwise the claim would be red. Delete the tokenize arm and it goes red while all nine service refusals stay green.Not in scope
Per the row's own
out_of_scope: the evaluation-step cost of the whole-service witness. That is its own roadmap node and wants a matched-base re-measurement after the keyword machinery is gone — which this change is.🤖 Generated with Claude Code