Repository navigation
Conversation
The ANTLR grammar's IRIREF excluded '=', so IRIs with query strings such as <http://a.example/p1?q=v> failed with "token recognition error" (e.g. shexTest's 1dot-baseDotSegmentsTrailing). Regenerated with ANTLR 4.9.3 from shexSpec/grammar#18; with the unfixed grammar the same command reproduces the committed parser byte for byte, and only the lexer's serialized ATN changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cardinality() treated min=1, max=1 like absent min/max and emitted nothing, so ShExJ -> ShExC -> ShExJ dropped them (shexTest 1card1, added 2026-09-22). Emit nothing only when both are absent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI on
mainhas failed since #4 (tests/test_shexc.py::TestShExCValidation::test_shex_schema). That test round-trips every shexTest schema (ShExJ → ShExC → ShExJ), and two newer shexTest schemas exposed two separate bugs.1.
=in IRIs failed to lex (1dot-baseDotSegmentsTrailing, added to shexTest 2026-08-19)The grammar's
IRIREFrule excluded=, unlike the ShEx spec, so any IRI with a query string failed:Fixed upstream in shexSpec/grammar#18. This PR regenerates the lexer with ANTLR 4.9.3, the version that produced the current files and the one the
~=4.9.3runtime pin requires. With the unfixed grammar, the same command reproduces all seven committed parser files byte for byte. With the fix, onlyShExDocLexer.pyandShExDocLexer.interpchange, and only in the serialized ATN.2. Explicit
{1}cardinality was dropped (1card1, added to shexTest 2026-09-22)ShExC.cardinality()emitted nothing formin=1, max=1, the same as for absentmin/max, so the round-trip lost them. It now emits nothing only when both are absent, and writes{1}otherwise.Tests
tests/test_iriref.py: an IRI with?q=v&r=wparses (fails with the old lexer).tests/test_cardinality.py: explicit{1}survives a round-trip, and absent cardinality stays absent (the first fails without the fix).test_shex_schema.Independent of #5 (the UTF-8 decoding fix).
🤖 Generated with Claude Code