feat(om2): switch ABNF from RFC 5234 to RFC 7405#2923
Merged
Conversation
…nsitivity Replace all %d decimal literals with readable %s"..." case-sensitive string literals. Mark inf/infinity/nan as %i"..." to preserve their intentional case-insensitivity. Keeps all semantics identical. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com> Coded with Claude Sonnet 4.6.
eof was used only once; inline %s"EOF" directly at the use site and remove the separate definition. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com> Coded with Claude Sonnet 4.6.
Inline type/help/unit, six metric-type keywords, EQ, and gh-count/gh-sum directly at their use sites. Keep gauge and histogram as named tokens since they are reused in gaugehistogram. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com> Coded with Claude Sonnet 4.6.
Use %s"gaugehistogram" directly instead of concatenating gauge and histogram tokens, allowing both to be inlined as well. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com> Coded with Claude Sonnet 4.6.
- Update ABNF reference from RFC 5234 to RFC 7405 - Replace all %d decimal literals with %s"..." case-sensitive literals - Mark inf/infinity/nan with %i"..." to preserve case-insensitivity - Inline single-use tokens to reduce ABNF size - Add brief explanation of RFC 7405 notation Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com> Coded with Claude Sonnet 4.6.
dashpole
approved these changes
Mar 25, 2026
bwplotka
approved these changes
Mar 25, 2026
Member
bwplotka
left a comment
There was a problem hiding this comment.
nice! no longer ASCII numbers lol
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.
Summary
%ddecimal literals with readable%s"..."case-sensitive string literalsinf,infinity, andnanwith%i"..."to preserve their intentional case-insensitivitytype,help,unit, all metric-type keywords,EQ,gh-count,gh-sum) to reduce ABNF sizeNo semantic changes — purely a readability improvement.
Test plan
Signed-off-by: György Krajcsovits gyorgy.krajcsovits@grafana.com
🤖 Coded with Claude Sonnet 4.6. Generated with Claude Code