Repository navigation
spec: make the ABNF read the sentences ergo.rego reads - #242
Merged
Merged
Conversation
… and plus Fixes the three groups of sentences check_grammar.py found where the ABNF and ergo.rego disagree: - Keywords of several words, like "is not empty" and "named by", take WS between their words, as sentences.md says a run of spaces reads as one. - Spaces at either end of a line are dropped before it's read, as ergo.rego does. - An elapsed time can go in a whose or after a plus. ergo.rego reads it and says it isn't supported yet, as sentence.derived.elapsed says, so a parser built from the ABNF gives the same message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jbpros
force-pushed
the
spec/abnf-fixes
branch
from
October 17, 2026 14:17
3c61c98 to
d867237
Compare
…nd an elapsed time on the right Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follows #241. Fixes every disagreement between
spec/sentences.abnfandergo.regothat its check finds, and empties the list inspec/OPEN.md.#241's check missed most of the cases. It only collected sentences under
assert,forandfrom, not checks written asc: "x is 1", so it read 79 case sentences instead of 324. This PR collects those too, and that turned up three more groups, fixed here as well.ABNF
is not empty,if any,andnamed by, now takeWSbetween their words, sox is not emptyparses. sentences.md:212 already said a run of spaces reads as one.ergo.regodoes.whose, after aplus, and alone on the right of a phrase, likevulns whose days elapsed from found to now is more than 30orn is days elapsed from started to ended.ergo.regoreads these and reportsan elapsed time isn't supported yet except alone before a phrase, so a parser built from the ABNF reads the same sentences. spec: say what the forms ergo.rego doesn't run yet mean and list them as known differences #243 takes this further and says what these forms mean.x is one of "a","b"parses, as sentences.md:212 says a list can be written with or without a space after each comma.check_grammar.py
count of approvers is emptydoesn't parse asisfollowed by a field calledempty. The word list is read from that rule insentences.md, not copied into the script.check_grammar.pynow reads 6565 sentences with 0 disagreements, and still 0 with #243 on top.check_rules.pypasses. No.regochanged.🤖 Generated with Claude Code