Skip to content

fix: keep every option in a WRITETABLE option series - #21

Merged
trygu merged 1 commit into
masterfrom
fix/writetable-options
Nov 6, 2026
Merged

trygu merged 1 commit into
masterfrom
fix/writetable-options

Conversation

@trygu

@trygu trygu commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Bug

<WRITETABLE> (1,5,AS+AR+,"f.txt") silently drops every option
after the first: the parser read the option token once and took
only its first 2-letter code + sign.

Legacy contract

The legacy writeTableBatch (batch.java) reads one option token and
chomps it in 2-letter code + sign chunks until it is empty, so
AS+AR+ is a series of two options. The manual: "Multiple options
form one series".

Fix

Mirror the legacy chomp loop in rta_parse_write_table:

  • AS+AR+ yields +AS and +AR
  • a sign-less series tail (AS+AR) is a BatchError instead of a
    silent drop
  • single-option (AR+) and empty-options (,,) forms unchanged

Verification

  • New parse test (TDD: red before, green after) covering the two-
    and three-option series and the sign-less error case.
  • test_engine_parse, test_engine_writetable_formats,
    test_engine_suppress and test_engine_run_arb all pass.

The batch parser read the WRITETABLE option token once and took
only its first 2-letter code + sign, silently dropping the rest of
a multi-option series. The legacy writeTableBatch (batch.java)
reads one option token and chomps it in 2-letter code + sign
chunks until it is empty, so "AS+AR+" is a series of two options.

Mirror the legacy chomp loop: AS+AR+ now yields +AS and +AR, a
sign-less series tail is an error instead of a silent drop, and
the single-option and empty-options forms are unchanged.
@trygu
trygu merged commit 8366a3f into master Nov 6, 2026
14 of 16 checks passed
@trygu
trygu deleted the fix/writetable-options branch November 6, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant