Skip to content

-l as a grammar locator #429

Description

@zharinov

Let -l accept more than bundled language names. It should also take a path to grammar.json, a URL, or a GitHub repo.

  • check, infer, dump, and grammar only need grammar.json (no compiled parser), so they should work with any locator.
  • run, trace, and source ast need a bundled parser. They must error clearly when one isn't available.
  • Remote fetches are cached. CI --frozen semantics are deferred.

Acceptance

  • plotnik check query.ptk -l ./grammar.json
  • plotnik infer query.ptk -l https://…/grammar.json
  • plotnik run … -l ./grammar.json → clear "no parser for this grammar" error

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions