Conversation
#98 was parked on a cost that had expired: +591 states measured before new_expression's arguments became required, +14 after. That makes every other parked number worth re-taking rather than trusting. #75's did not move. base 5,315 19.5 MB $.if_statement in the arrow body choice 10,704 39.3 MB (+101%) the same, gated on an external marker 10,758 39.4 MB a conditional with expression branches 7,330 27.5 MB (+38%) The middle row is the new finding and the reason this is worth a commit. The external zero-width marker is what made savecontent-as-an-expression (#82) and the empty arrow body (#116) affordable: the scanner looks ahead one token where the grammar cannot. Here it buys nothing, and slightly less than nothing, because the cost is not ambiguity at the decision point — it is the if_statement subtree becoming reachable in expression position at all, which duplicates states across the whole expression hierarchy. Reach for the marker when the problem is one token of lookahead; it does not help when a rule category becomes reachable in a new context. The third row shows even a hand-written conditional admitting only expressions in its branches costs +38% and +8 MB, because it still mentions $.expression in a new context. For one corpus file, none of the three is worth it. #75 stays open and stays rejected; no grammar or scanner file changes here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117EvdX3EgLgDevVNrWZ5hr
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.
Refs #75 — documentation only, no grammar or scanner change. The issue stays open and stays rejected; this records why, with fresh numbers and one new finding.
Why re-measure at all
#98 was parked on a cost that had expired:
+591states, measured beforenew_expression'sargumentsbecame required, and+14after. That makes every other parked number worth re-taking rather than trusting.#75's did not move.
STATE_COUNTparser.c$.if_statementin the arrow bodychoice'member'The middle row is the finding
The external zero-width marker is the technique that made
savecontentas an expression (#82) and the empty arrow body (#116) affordable — the scanner looks ahead one token where the grammar cannot. Here it buys nothing, and slightly less than nothing.The reason is worth stating because it tells you when to reach for it: the cost is not ambiguity at the decision point. It is the
if_statementsubtree becoming reachable in expression position at all, which duplicates states across the whole expression hierarchy. A marker prunes a choice; it does not un-reach a rule.The third row is the same lesson from the other side: even a hand-written conditional that admits only expressions in its branches costs +38% and +8 MB, because it still mentions
$.expressionin a new position.Verdict unchanged
For one corpus file — Lucee's
LDEV1819/test2.cfm— none of the three is worth it.LIMITATIONS.mdanddocs/FAILING-PATTERNS.mdnow carry the table and the delimitation; the working tree is back on master's parser, withSTATE_COUNTat 5,315, 346/346 tests and probes 50/56 with no drift.🤖 Generated with Claude Code
https://claude.ai/code/session_0117EvdX3EgLgDevVNrWZ5hr
Generated by Claude Code