Skip to content

Under the Hood

The commands you use every day — plcc-scan, plcc-parse, plcc-rep, and plcc-diagram — each orchestrate a pipeline of lower-level commands. This page shows how the pieces fit together.

Dependency diagram

The diagram below shows which commands call which. An arrow from A to B means A calls B.

language-extensionsplcc-javaplcc-pythonparser-extensionsplcc-parser-tablediagram-extensionsplcc-mermaid-diagramplcc-plantuml-diagramcoreplcc-diagramplcc-java-emitplcc-java-buildplcc-java-runplcc-python-emitplcc-python-buildplcc-python-runplcc-parser-tableplcc-mermaid-diagram-emitplcc-mermaid-diagram-buildplcc-mermaid-diagram-runplcc-plantuml-diagram-emitplcc-plantuml-diagram-buildplcc-plantuml-diagram-runplcc-versionplcc-lang-listplcc-parser-listplcc-scanplcc-makeplcc-tokensplcc-parseplcc-treesplcc-repplcc-lang-runplcc-specplcc-ll1plcc-modelplcc-lang-emitplcc-lang-buildplcc-diagram-listplcc-diagramplcc-diagram-emitplcc-diagram-buildplcc-diagram-runLanguage Author

The core pipeline

plcc-make is the build orchestrator at the centre of the core package. Every author-facing command calls it before doing its own work.

Command Input → Output
plcc-make .plcc spec file → build artifacts in build/
plcc-spec .plcc file → spec JSON
plcc-ll1 spec JSON → LL(1) analysis JSON
plcc-tokens spec JSON + source files → token JSONL
plcc-trees token JSONL + LL(1) JSON → parse tree JSON (dispatches to parser plugin)
plcc-model spec JSON → language-neutral model JSON
plcc-lang-emit model JSON → language source files (dispatches to language plugin)
plcc-lang-build language source files → compiled output (dispatches to language plugin)
plcc-lang-run compiled output + parse tree JSON → evaluation result (dispatches to language plugin)

The diagram pipeline

plcc-diagram (in the plcc-diagram package) calls plcc-make to build the model, then runs its own sub-pipeline:

Command Input → Output
plcc-diagram-emit model JSON → diagram source (dispatches to diagram plugin)
plcc-diagram-build diagram source → PNG image (dispatches to diagram plugin)
plcc-diagram-run PNG path → prints path to stdout (dispatches to diagram plugin)