Skip to content

chore: release 0.2.0#11

Merged
siy merged 2 commits into
mainfrom
release-0.2.0
Mar 29, 2026
Merged

chore: release 0.2.0#11
siy merged 2 commits into
mainfrom
release-0.2.0

Conversation

@siy

@siy siy commented Mar 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix generated parser (CST and AST) incorrectly skipping whitespace before predicate expressions (! and &) inside sequences
  • Update pragmatica-lite dependency: 0.9.10 → 0.24.0
  • 310 passing tests (2 new regression tests)

Test plan

  • All 310 tests pass
  • New NegativeLookaheadBugTest verifies both interpreted and generated parsers handle !ClauseKW correctly

Summary by CodeRabbit

  • Bug Fixes

    • Fixed whitespace-skipping behavior that was causing negative lookahead to fail on keyword rules within sequences.
  • Chores

    • Version bumped to 0.2.0.
    • Updated dependency versions.
    • Expanded test coverage to 310 passing tests.

@siy siy merged commit 5724dfa into main Mar 29, 2026
1 check passed
@coderabbitai

coderabbitai Bot commented Mar 29, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 43a680c1-c269-41e9-8b53-27f5437d0a97

📥 Commits

Reviewing files that changed from the base of the PR and between aa45ffb and 39d660a.

📒 Files selected for processing (6)
  • CHANGELOG.md
  • CLAUDE.md
  • README.md
  • pom.xml
  • src/main/java/org/pragmatica/peg/generator/ParserGenerator.java
  • src/test/java/org/pragmatica/peg/NegativeLookaheadBugTest.java

📝 Walkthrough

Walkthrough

This release version 0.2.0 fixes a whitespace-skipping bug in PEG sequence parsing where predicates (negative/positive lookahead) were incorrectly having whitespace stripped before them, causing lookahead assertions to fail. Dependencies were updated, and a regression test was added to prevent reoccurrence.

Changes

Cohort / File(s) Summary
Documentation & Build Versioning
CHANGELOG.md, README.md, pom.xml
Updated project version from 0.1.9 to 0.2.0 and pragmatica-lite dependency from 0.9.10 to 0.24.0; documented changes in CHANGELOG.
Test Count Update
CLAUDE.md
Updated referenced test count from 308 to 310 passing tests in documentation.
Whitespace-Skip Fix
src/main/java/org/pragmatica/peg/generator/ParserGenerator.java
Modified sequence parsing code generation to prevent whitespace skipping before predicate expressions (And, Not); added private helper isPredicate() to detect predicate types.
Regression Test
src/test/java/org/pragmatica/peg/NegativeLookaheadBugTest.java
Added new test class verifying negative lookahead bug is fixed for both interpreted and dynamically-compiled generated parsers; includes runtime Java compilation and reflection to test generated code.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • chore: release 0.1.8 #9: Modifies ParserGenerator's whitespace-skip emission logic for sequence and predicate handling, directly addressing the same control flow area.

Poem

🐰 No more whitespace before the ! and &,
Predicates now stand proud, as they should, you see,
Lookahead assertions work as they're supposed to be,
Version two-dot-oh hops forth, bug-free! 🌿✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release-0.2.0

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot mentioned this pull request Mar 29, 2026
3 tasks
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