Skip to content
プロジェクト

概要

RR - レールロード図生成ツール

デザイン・メディア

この数値の測り方

計測したスター増加

24時間
0
7日間
0
15日間
+1
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

RR

RR - Railroad Diagram Generator

RR is a generator of syntax diagrams, also known as railroad diagrams. It is a self-contained tool with both a browser-based GUI and a batch mode.

Besides generating diagrams from EBNF rules, RR also can perform some grammar transformation, e.g. factorization and elimination of direct recursion. To some extent this transforms BNF to EBNF, yielding more compact diagrams.

Examples

Here are two examples of generated diagrams (taken from the Python grammar):

if_stmt:

if_stmt

try_stmt:

try_stmt

Grammar syntax

RR accepts grammars in W3C-style EBNF. Some other representations, including some parser generator input notations, can be converted to W3C-style using the ebnf-convert Grammar Converter. This tool is also available on GitHub.

Distribution

RR comes as a .zip, containing a .war file. The .war file can be deployed in Jakarta EE servlet containers like Tomcat 10.1 (or higher) or Jetty 12 for serving the GUI. This makes up the webapp that is running on the original website, https://www.bottlecaps.de/rr/ui. Older containers using the javax.servlet namespace, such as Tomcat 9 or earlier, are not supported.

Running RR requires Java 17 or higher.

The .war file is a Java "executable war", i.e. it can also be started standalone from command line. Two different tasks can be performed in standalone mode:

  • serving the GUI, e.g.
   java -jar rr.war -gui
  • batch diagram generation, e.g.
   java -jar rr.war grammar.ebnf

For listing the full set of available options, run

   java -jar rr.war

without further command line arguments.

Building RR

For building RR, JDK 17 (or higher) must be available. In the project folder, run this command to build the distribution .zip file:

gradlew

RR on Maven Central

RR is available on Maven Central with groupId de.bottlecaps.rr and artifactIds

  • rr-webapp for rr.war,
  • rr-lib for rr.jar, which can be added to other projects as a dependency.

Thanks

This project makes use of

License

Copyright (c) 2010-2026 Gunther Rademacher. RR is provided under the Apache 2 License.

Links

The official website for RR is https://www.bottlecaps.de/rr/ui.

関連プロジェクトを探す

読み込み中…