Syntrax / JSyntrax

Syntrax is a railroad diagram generator. It creates a visual illustration of the grammar used for programming languages. A specification file describes the syntax as a hierarchy of basic elements. This is processed into an image representing the same syntax with interconnected nodes.

JSyntrax is a reimplementation of Syntrax in Java in order to simplify installation, get rid of required libraries and make it easily portable to any operating system.

Supported Image Formats

  • PDF

  • PNG

  • SVG

Attributes

Name Default value Description

syntrax

syntrax

The path to the syntrax executable. This attribute is used for the Syntrax implementation.

java

java

The path to the java executable. This attribute is used for the JSyntrax implementation. The DIAGRAM_JSYNTRAX_HOME environment variable should then also be defined and point to the JSyntrax installation directory. The installation directory can also be specified using the diagram.jsyntrax.home Java system property.

heading

unspecified

Diagram title

scale

1

A scale factor that is applied to the image.

style-file

unspecified

Path to a style config file to pass to Syntrax.

transparent

false

Makes the background of the image transparent instead of opaque white.