Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ohm Language #6693

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

novusnota
Copy link

@novusnota novusnota commented Jan 30, 2024

Adding an Ohm language for .ohm extension. Expected to only occur once per repo.

Description

Ohm is a parsing toolkit consisting of a library and a domain-specific language. One can use it to parse custom file formats or quickly build parsers, interpreters, and compilers for programming languages.

The Ohm language is based on parsing expression grammars (PEGs), which are a formal way of describing syntax, similar to regular expressions and context-free grammars. The Ohm library provides a JavaScript interface for creating parsers, interpreters, and more from the grammars you write.

Checklist:

  • I am adding a new language.
    • The extension of the new language is used in hundreds of repositories on GitHub.com. As this language is used for making parsers, and interpreter/compiler frontends, it's extension is expected to occur only once per repository (except for the repositories in ohmjs organization):
    • I have included a real-world usage sample for all extensions added in this PR:
      • Sample source(s):
        • ohm-grammar.ohm is adapted from it's version in ohmjs/ohm
      • Sample license(s): MIT License
    • I have included a syntax highlighting grammar: novusnota/vscode-ohm
    • I have added a color
      • Hex value: #A469F8
      • Rationale: Most used on the language website, primary color.
    • I have updated the heuristics to distinguish my language from others using the same extension. No other language has the same extension, so I didn't update heuristics.

@novusnota novusnota requested a review from a team as a code owner January 30, 2024 23:12
@lildude lildude changed the title Add language: Ohm Add Ohm Language Feb 20, 2024
@novusnota
Copy link
Author

For what it's worth, here's a complete and well-tested tree-sitter grammar for Ohm, which may be used by the relevant GitHub team to supersede TextMate grammar from this PR once or if it gets merged :)

@Lacters

This comment has been minimized.

@novusnota novusnota marked this pull request as draft May 29, 2024 15:56
@novusnota
Copy link
Author

Converted to draft to enhance and/or re-write the grammar :)

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.

None yet

2 participants