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

Release files for pygments-mvl 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pygments-mvl 0.1.5
File Size Uploaded
pygments_mvl-0.1.5.tar.gz 12.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pygments-mvl 0.1.5
File Interpreter ABI Platform
pygments_mvl-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 23.8 kB

Release files / pygments_mvl-0.1.5.tar.gz

Download URL pygments_mvl-0.1.5.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5b31a78ceda765a259001dd7201901edbe6dff944bfd1b33ef06511c0c4e9333
BLAKE2b-256 checksum
How to use checksums
d1e61a1299f62163a06697e272f68bb8c15113c5f5277daed12fb22f55c1d242
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.

Transparency log

Release files / pygments_mvl-0.1.5-py3-none-any.whl

Download URL pygments_mvl-0.1.5-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b8a1186a747c2c548a797d44f233fc4cc263f199e9358fb0dd276fdb308a5fd
BLAKE2b-256 checksum
How to use checksums
fe344871c1bbd75a25c3fadc3234352b3543cb2c3906ca32257b07c5ef602272
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page