Skip to content

interpreter: implement RS regexp and blank-line record splitting - #133

Open
Franklin-Qi wants to merge 1 commit into
uutils:mainfrom
Franklin-Qi:feature-issue#124-record-splitting
Open

Franklin-Qi wants to merge 1 commit into
uutils:mainfrom
Franklin-Qi:feature-issue#124-record-splitting

Conversation

@Franklin-Qi

Copy link
Copy Markdown
Collaborator

Wire RT as a builtin and finish the missing RS modes (multi-char regexp and RS="") so record boundaries and RT match gawk.

Closes: #124

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

GNU awk testsuite comparison:

Test results comparison:
  Current:   TOTAL: 666 / PASSED: 97 / FAILED: 471 / SKIPPED: 98
  Reference: TOTAL: 666 / PASSED: 90 / FAILED: 478 / SKIPPED: 98

Changes from main branch:
  TOTAL: +0
  PASSED: +7
  FAILED: -7

New test failures (1):
  - rscompat

Test improvements (8):
  + fpat8
  + fsnul1
  + leadnl
  + nlinstr
  + nulrsend
  + onlynl
  + rs
  + rsnul1nl

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

GNU awk testsuite comparison:

Test results comparison:
  Current:   TOTAL: 666 / PASSED: 98 / FAILED: 470 / SKIPPED: 98
  Reference: TOTAL: 666 / PASSED: 90 / FAILED: 478 / SKIPPED: 98

Changes from main branch:
  TOTAL: +0
  PASSED: +8
  FAILED: -8

Test improvements (8):
  + fpat8
  + fsnul1
  + leadnl
  + nlinstr
  + nulrsend
  + onlynl
  + rs
  + rsnul1nl

Comment thread interpreter/src/vm/io.rs
Comment thread interpreter/src/vm/io.rs Outdated
Comment thread interpreter/src/vm/io.rs Outdated
Comment thread interpreter/src/vm/io.rs Outdated
Comment thread interpreter/src/vm/io.rs Outdated
Comment thread src/main.rs
Comment thread tests/by-util/test_awk.rs
@Franklin-Qi
Franklin-Qi force-pushed the feature-issue#124-record-splitting branch from 6440887 to 509fb42 Compare October 10, 2026 10:26
@github-actions

Copy link
Copy Markdown

GNU awk testsuite comparison:

Test results comparison:
  Current:   TOTAL: 666 / PASSED: 97 / FAILED: 471 / SKIPPED: 98
  Reference: TOTAL: 666 / PASSED: 90 / FAILED: 478 / SKIPPED: 98

Changes from main branch:
  TOTAL: +0
  PASSED: +7
  FAILED: -7

New test failures (1):
  - rscompat

Test improvements (8):
  + fpat8
  + fsnul1
  + leadnl
  + nlinstr
  + nulrsend
  + onlynl
  + rs
  + rsnul1nl

Wire RT as a builtin and finish the missing RS modes (multi-char regexp
and RS=""). Cache the RS automaton, keep reading when a match touches the
buffer end, and consume rs_leftover when RS switches mid-file.

Closes: uutils#124
@Franklin-Qi
Franklin-Qi force-pushed the feature-issue#124-record-splitting branch from 509fb42 to 35f7293 Compare October 16, 2026 02:47
@github-actions

Copy link
Copy Markdown

GNU awk testsuite comparison:

Test results comparison:
  Current:   TOTAL: 666 / PASSED: 98 / FAILED: 470 / SKIPPED: 98
  Reference: TOTAL: 666 / PASSED: 90 / FAILED: 478 / SKIPPED: 98

Changes from main branch:
  TOTAL: +0
  PASSED: +8
  FAILED: -8

Test improvements (8):
  + fpat8
  + fsnul1
  + leadnl
  + nlinstr
  + nulrsend
  + onlynl
  + rs
  + rsnul1nl

@Alonely0

Copy link
Copy Markdown
Collaborator

Sorry about the delay, I'm in EuroRust this week. Let me get the PRs reviewed today or this weekend.

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.

Missing record splitting modes

3 participants