Skip to main content

pygments-mvl

Pygments lexer for MVL source code.

pip install pygments-mvl
pygmentize -l mvl example.mvl

Registers under the mvl alias and claims *.mvl, so ```mvl fences work anywhere Pygments is installed.

Structure

tools/pygments/
├── pyproject.toml           Package manifest — publishes as `pygments-mvl` to PyPI
├── README.md
├── LICENSE                  Apache-2.0
├── mvl_pygments/
│   ├── __init__.py
│   ├── lexer.py             RegexLexer subclass; keyword sets generated from
│   │                        ../../grammar/keywords.yaml
│   └── keywords.py          Generated file — do NOT edit by hand
└── tests/
    ├── test_lexer.py
    └── corpus/              MVL example files for visual smoke-testing

Design notes

  • Keyword sets come from grammar/keywords.yaml via tools/generators/gen_pygments.py.
  • Handle effect syntax (! Console + Net), refinements (where x > 0), contracts (requires, ensures, invariant, decreases), capabilities (iso, val, ref), IFC labels (Tainted[T], Secret[T], and the capability labels ConfigPath[T] / DbUrl[T] / ApiEndpoint[T] / AuditTarget[T]). There is no Public label — unlabeled is public by default.
  • String literals: single-line, triple-quoted, raw (r"..."), raw triple.
  • Comments: // line, /// doc.

Publishing

git tag pygments-v0.1.5
git push --tags

.github/workflows/publish-pygments.yml builds and uploads via PyPI Trusted Publishing (OIDC) — no API token. It refuses to publish unless mvl_pygments/keywords.py carries the generated banner, so hand-written keyword tables cannot reach PyPI.

Downstream consumers

  • mvl-lang.org — swaps ```rust fences back to ```mvl once this ships (tracked in mvl-lang.github.io#5)
  • Any static-site generator using Pygments (Sphinx, mkdocs, Hugo with Chroma)
  • Jupyter notebook code blocks

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygments_mvl-0.1.5.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygments_mvl-0.1.5-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file pygments_mvl-0.1.5.tar.gz.

File metadata

  • Download URL: pygments_mvl-0.1.5.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pygments_mvl-0.1.5.tar.gz
Algorithm Hash digest
SHA256 5b31a78ceda765a259001dd7201901edbe6dff944bfd1b33ef06511c0c4e9333
MD5 429391c6e19d0e960b101181f534a1f6
BLAKE2b-256 d1e61a1299f62163a06697e272f68bb8c15113c5f5277daed12fb22f55c1d242

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygments_mvl-0.1.5.tar.gz:

Publisher: publish-pygments.yml on mvl-lang/mvl-spec

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pygments_mvl-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: pygments_mvl-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pygments_mvl-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8b8a1186a747c2c548a797d44f233fc4cc263f199e9358fb0dd276fdb308a5fd
MD5 cb4503c88c99eea264d168d2a35255fd
BLAKE2b-256 fe344871c1bbd75a25c3fadc3234352b3543cb2c3906ca32257b07c5ef602272

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygments_mvl-0.1.5-py3-none-any.whl:

Publisher: publish-pygments.yml on mvl-lang/mvl-spec

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page