Railroad Diagram Generator

2 min read Original article ↗
Show EBNF
  The corresponding EBNF will be shown next to generated diagrams. If this option is unchecked, the EBNF display will be suppressed.
 
Color
º Hue < > Select base color from the palette above, or enter color data into the fields on the left. Adjust hue, saturation, or lightness by clicking, or holding their respective controls. Arrange other colors by setting hue offset, 0 is for a monochromatic color scheme.
% Saturation < >
% Lightness < >
º Hue offset < >
 
px Graphics width
  When the graphics exceeds this width, attempts will be made to break it and start a continuation line.
px Padding
  The number of pixels between text and the surrounding box.
px Stroke width
  The width of lines and frames in pixels.
Direct recursion elimination
  Unless disabled, direct recursion will be replaced by repetition. This applies to nonterminals, whose directly recursive references are either left- or right-recursive only. Upon success, productions are inlined, when a single reference remains.
Factoring
  When checked, left and right factoring will be applied to right-hand sides of all productions individually, in order to achieve more compact diagrams.
Inline literals
  Replace nonterminal references by their definition, when they derive to a single string literal.
Keep epsilon nonterminals
  Keep references to nonterminals, that derive to epsilon only. When unchecked, they will be removed.