You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
case-pattern position must lex compound keywords as words: case x in case) ... still parse-errors (issue308 residue, 2 reds) #372
Found by ecosweep4-B triage lane (wt23/bats364, 2026-10-01). The two remaining issue308_regressions reds (every_compound_keyword_in_pattern_is_inert, harden_mm_reserved_word_pattern_continuation_parses) — #308's main fix landed; these residual assertions have never been green since the ecosweep4 zero point (not a regression of this window).
Reproducer
The tests drive a generated case.sh where a case PATTERN contains a compound keyword (e.g. case / esac as pattern text). rubash reports:
case.sh: line 3: syntax error: unexpected end of file from `case' command on line 2
case.sh: line 11: syntax error: unexpected end of file from `(' command on line 3
GNU 5.3.0 accepts the file (patterns are read as WORDS; the parser only recognizes reserved words in command position — parse.y read_token / case production consumes patterns via read_token_word).
Evidence
Test failure output captured in the lane run; test bodies at tests/issue308_regressions.rs (the two names above). This is a parser admission issue (pattern position keyword handling), same family as the #360/#361 over-lax/over-strict admissions.
Landed as 50cd08c (wt25/semix lane commit 34492264). The parser sentinels were innocent — the lexer close-char scanner's case-word machine lacked pattern-region state (GNU parse.y:3177-3186 CHECK_FOR_RESERVED_WORD + parser.h:29 PST_CASEPAT: reserved words are not recognized inside pattern lists). Fix converges to the real parser (#117 move 2): a command-position '(' unclosed verdict is disproved by a full tokenize+parse producing no parse-error nodes; other verdict shapes (quotes/${/$(/array/[) are read-time matched-pair verdicts the tokenizer owns and are never overridden (scope verified: unclosed-quote diagnostics unchanged). issue308 residue 2 reds now green; issue372 suite 8/8; issue376 family intact. CI green on 50cd08c. Residues filed: comsub-executor same-family blind spot + empty-case newline divergence.
Activity
fix(#364): assignment RHS never re-executes procsub text from expansi…
fix(#372): command-position `(` unclosed verdicts verify against the …
caomengxuan666 commentedon Oct 1, 2026
Landed as 50cd08c (wt25/semix lane commit 34492264). The parser sentinels were innocent — the lexer close-char scanner's case-word machine lacked pattern-region state (GNU parse.y:3177-3186 CHECK_FOR_RESERVED_WORD + parser.h:29 PST_CASEPAT: reserved words are not recognized inside pattern lists). Fix converges to the real parser (#117 move 2): a command-position '(' unclosed verdict is disproved by a full tokenize+parse producing no parse-error nodes; other verdict shapes (quotes/${/$(/array/[) are read-time matched-pair verdicts the tokenizer owns and are never overridden (scope verified: unclosed-quote diagnostics unchanged). issue308 residue 2 reds now green; issue372 suite 8/8; issue376 family intact. CI green on 50cd08c. Residues filed: comsub-executor same-family blind spot + empty-case newline divergence.
docs: wt25/semix recovery (#371/#372 closed, #380/#381 opened)