Skip to content

feat(om2): switch ABNF from RFC 5234 to RFC 7405#2923

Merged
bwplotka merged 5 commits intomainfrom
krajo/om2-rfc7405
Mar 25, 2026
Merged

feat(om2): switch ABNF from RFC 5234 to RFC 7405#2923
bwplotka merged 5 commits intomainfrom
krajo/om2-rfc7405

Conversation

@krajorama
Copy link
Copy Markdown
Member

Summary

  • Switches the ABNF specification from RFC 5234 to RFC 7405
  • Replaces all %d decimal literals with readable %s"..." case-sensitive string literals
  • Marks inf, infinity, and nan with %i"..." to preserve their intentional case-insensitivity
  • Inlines single-use tokens (type, help, unit, all metric-type keywords, EQ, gh-count, gh-sum) to reduce ABNF size
  • Adds a brief explanation of RFC 7405 notation in the ABNF section

No semantic changes — purely a readability improvement.

Test plan

  • Verify spec tests still pass with the updated ABNF
  • Verify the ABNF section renders correctly in the docs site

Signed-off-by: György Krajcsovits gyorgy.krajcsovits@grafana.com

🤖 Coded with Claude Sonnet 4.6. Generated with Claude Code

…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.
Copy link
Copy Markdown
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! no longer ASCII numbers lol

@bwplotka bwplotka merged commit 2859ef2 into main Mar 25, 2026
7 checks passed
@bwplotka bwplotka deleted the krajo/om2-rfc7405 branch March 25, 2026 17:19
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.

3 participants