Skip to content

Diagram extensions

Diagram extensions implement the emit, build, and run steps for a specific diagram format. plcc-ng ships with PlantUML support.

How diagram extensions plug in

plcc-diagram runs three dispatch commands:

  1. plcc-diagram-emit --format=FMT — calls plcc-diagram-<type>-<fmt>-emit
  2. plcc-diagram-build --format=FMT — calls plcc-diagram-<fmt>-build
  3. plcc-diagram-run --format=FMT — calls plcc-diagram-<fmt>-run

The default format is plantuml. Use plcc-diagram-list to see what is installed.

plcc-plantuml-diagram

Generates a PlantUML class diagram. Rendering is done via the public plantuml.com API — no local PlantUML installation required.

Command What it does
plcc-diagram-class-plantuml-emit Reads model JSON from stdin; writes a .puml PlantUML source file
plcc-diagram-plantuml-build Sends .puml to plantuml.com and writes the returned PNG
plcc-diagram-plantuml-run Prints the path to the rendered PNG

plcc-syntax-diagram

Generates a PlantUML EBNF diagram showing the syntactic grammar rules from a PLCC spec file. Rendering is done via the public plantuml.com API — no local PlantUML installation required.

Command What it does
plcc-diagram-syntax-plantuml-emit Reads spec JSON from stdin; writes a .puml PlantUML EBNF source file
plcc-diagram-plantuml-build Sends .puml to plantuml.com and writes the returned PNG
plcc-diagram-plantuml-run Prints the path to the rendered PNG