Skip to content

Explore interest in KGT (railroad diagram generator) as an alternative railroad diagram DSL #3112

@mikesamuel

Description

@mikesamuel

Regarding § 14 Railroad Diagrams

Diagrams are described by a custom DSL that somewhat resembles Python.

If there's interest in using ABNF and other traditional grammar syntaxes, katef/kgt also generates SVG railroad diagrams from those input formats.

As an example, below is an excerpt of a date time example and the laid out diagram.

ABNF of RFC 5322
; date and time format taken from RFC 5322.
; https://tools.ietf.org/html/rfc5322#section-3.3

date-time       =   [ day-of-week "," ] date time [CFWS]

day-of-week     =   ([FWS] day-name) / obs-day-of-week

day-name        =   "Mon" / "Tue" / "Wed" / "Thu" /
                    "Fri" / "Sat" / "Sun"

date            =   day month year

day             =   ([FWS] 1*2DIGIT FWS) / obs-day

month           =   "Jan" / "Feb" / "Mar" / "Apr" /
                    "May" / "Jun" / "Jul" / "Aug" /
                    "Sep" / "Oct" / "Nov" / "Dec"

...
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions