FA-80582 / Bidirectional text layout / Member archive
Bracket pair identification: stack overflow handling · case 02
Pairs keep being found after the opener stack overflowed.
Case contract
Input [text, classes, stack limit]. Only characters of class ON take part. Openers ( [ { are pushed; on overflow of the stack limit stop and keep pairs found so far. A closer searches the stack from the top for its opener; if found it pairs and discards that entry and everything above; otherwise it is ignored. Return pairs sorted by opener.
Why this case matters
Mixed right-to-left and left-to-right text must resolve levels and visual order exactly, or words, numbers and carets land in the wrong place.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: stack overflow handling | [[1, 5]] | [] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗