Skip to main content

Sphinx domain and autodoc for Antlr4 grammars

Project description

Sphinx plugin for Antlr4

A4Doc is a sphinx plugin for documenting Antlr4 grammars.

It’s primary target is to provide some overview for DSL users (generated documentation may not include some nuances essential for compiler developers).

A4Doc's features are:

  • a new domain with grammar and rule directives called a4;
  • directives for rendering railroad diagrams;
  • directive for extracting documentation comments and rendering docs and diagrams from .g4 source files.

Resources

Requirements

  • python >= 3.7
  • sphinx >= 1.8.0

Installation

pip3 install sphinx-a4doc

Use cases

Changelog

v1.6.0

  • Support LaTeX builder.

v1.5.0

  • Fixed position of text in diagram nodes in Firefox.
  • Added an option to set custom classes to diagram nodes: //@ doc:css-class.

v1.4.0

  • Fixed compatibility with singlehtml mode (see #15).

v1.3.0

  • Fixed python 3.9 compatibility issue (by @sandrotosi).

v1.2.2, v1.2.3, v1.2.4

  • No functional changes, just setting up CI to push PyPI releases automatically.

v1.2.1

  • Fixed integration with intersphinx.

v1.2.0:

  • Renamed conf.py settings: a4_autodoc_* became a4_autogrammar_*.
  • Added support for section comments in grammar files.
  • Added flexible settings to control how literal lexer rules are rendered.
  • Added setting to convert rule names from CamelCase to dash-case.
  • Fixed documentation comments are parsed incorrectly in some cases.

v1.0.1:

  • Fixed absence of .css file for railroad diagrams.

v1.0.0:

  • Initial release.

Project details


Download files

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

Source Distribution

sphinx-a4doc-1.6.0.tar.gz (98.1 kB view details)

Uploaded Source

Built Distribution

sphinx_a4doc-1.6.0-py3-none-any.whl (99.0 kB view details)

Uploaded Python 3

File details

Details for the file sphinx-a4doc-1.6.0.tar.gz.

File metadata

  • Download URL: sphinx-a4doc-1.6.0.tar.gz
  • Upload date:
  • Size: 98.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for sphinx-a4doc-1.6.0.tar.gz
Algorithm Hash digest
SHA256 7457f14143970f48c7be41bad5b862af7621922f17086015aa1ec8a5ad96a02f
MD5 85594e3bdd65985968f076ef076c1195
BLAKE2b-256 9f63c8a7973815bf7f2cef0f3dc30f1206f16e3722be036b3fad7cb9702e5252

See more details on using hashes here.

File details

Details for the file sphinx_a4doc-1.6.0-py3-none-any.whl.

File metadata

  • Download URL: sphinx_a4doc-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 99.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for sphinx_a4doc-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6eed513469becf0abb9f3443adcf427faf9af629e9b90222c1b3d44044fa165d
MD5 7075482c681636835f71b472061d7f6e
BLAKE2b-256 1f88f204567a6560d3f15fa1203e2c7aabfedaa9640a0cdb62cf79d5008d8463

See more details on using hashes here.

Supported by

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