|
1 | | - |
| 1 | +# convert - Grammar Converter |
2 | 2 |
|
3 | | -# RR - Railroad Diagram Generator |
4 | | - |
5 | | -RR is a generator of syntax diagrams, also known as railroad diagrams. It is |
6 | | -a self-contained tool with both a browser-based GUI and a batch mode. |
7 | | - |
8 | | -Besides generating diagrams from EBNF rules, RR also can perform some grammar transformation, e.g. factorization |
9 | | -and elimination of direct recursion. To some extent this transforms BNF to EBNF, yielding more compact diagrams. |
10 | | - |
11 | | -# Examples |
12 | | - |
13 | | -Here are two examples of generated diagrams (taken from the [Python grammar][PYTHON]): |
14 | | - |
15 | | -**if_stmt:** |
16 | | - |
17 | | - |
18 | | - |
19 | | -**try_stmt:** |
20 | | - |
21 | | - |
22 | | - |
23 | | -# Grammar syntax |
24 | | - |
25 | | -RR accepts grammars in [W3C-style EBNF][W3C-EBNF]. Some other representations, including |
26 | | -some parser generator input notations, can be converted to W3C-style using |
27 | | -[Grammar Conversion][CONVERT]. |
| 3 | +This is an experimental version of RR - Railroad Diagram Generator, that includes |
| 4 | +convert, the Grammar Converter. It builds both an experimental rr.war and convert.war. |
28 | 5 |
|
29 | 6 | # Distribution |
30 | 7 |
|
31 | | -RR comes as a .zip, containing a .war file. The .war file can be deployed |
32 | | -in servlet containers like Tomcat or Jetty for serving the GUI. This makes up the webapp |
33 | | -that is running on the original website, <https://bottlecaps.de/rr/ui>. |
34 | | - |
35 | | -The .war file is a Java "executable war", i.e. it can also be started |
36 | | -standalone from command line. Two different tasks can be performed in standalone mode: |
37 | | - |
38 | | -- serving the GUI, e.g. |
| 8 | +convert comes in a .war file, convert.war. This can be deployed |
| 9 | +in servlet containers like Tomcat or Jetty for serving the GUI, and it makes up the webapp |
| 10 | +that is running on the original website, <https://bottlecaps.de/convert>. |
39 | 11 |
|
40 | | -```bash |
41 | | - java -jar rr.war -gui |
42 | | -``` |
43 | | -- batch diagram generation, e.g. |
44 | | - |
45 | | -```bash |
46 | | - java -jar rr.war grammar.ebnf |
47 | | -``` |
| 12 | +convert.war file is a Java "executable war", i.e. it can also be started |
| 13 | +standalone from command line. |
48 | 14 |
|
49 | | -For listing the full set of available options, run |
| 15 | +For listing the set of available command line options, run |
50 | 16 |
|
51 | 17 | ```bash |
52 | | - java -jar rr.war |
| 18 | + java -jar convert.war |
53 | 19 | ``` |
54 | | -without further command line arguments. |
55 | 20 |
|
56 | | -## Building RR |
57 | | -For building RR, JDK 8 (or higher) must be available. In the |
| 21 | +## Building convert |
| 22 | +For building convert, JDK 8 (or higher) must be available. In the |
58 | 23 | project folder, run this command to build the distribution .zip file: |
59 | 24 |
|
60 | 25 | ```bash |
61 | 26 | gradlew |
62 | 27 | ``` |
63 | | - |
64 | | -## Thanks |
65 | | - |
66 | | -This project makes use of |
67 | | - * [Saxon-HE][SAXON], |
68 | | - * [TagSoup][TAGSOUP], |
69 | | - * [Apache Batik][BATIK], |
70 | | - * [Gradle][GRADLE], and |
71 | | - * [Gradle-License-Report][GRADLE-LICENSE-REPORT]. |
72 | | - |
73 | | -## License |
74 | | - |
75 | | -RR is released under the [Apache 2 License][ASL]. |
76 | | - |
77 | | -## Links |
78 | | - |
79 | | -The official website for RR is <https://bottlecaps.de/rr/ui>. |
80 | | - |
81 | | -[ASL]: http://www.apache.org/licenses/LICENSE-2.0 |
82 | | -[PYTHON]: https://docs.python.org/3/reference/grammar.html |
83 | | -[W3C-EBNF]: http://www.w3.org/TR/2010/REC-xquery-20101214/#EBNFNotation |
84 | | -[CONVERT]: http://bottlecaps.de/convert/ |
85 | | -[SAXON]: http://www.saxonica.com/products/products.xml |
86 | | -[TAGSOUP]: http://vrici.lojban.org/~cowan/XML/tagsoup/ |
87 | | -[BATIK]: https://xmlgraphics.apache.org/batik/ |
88 | | -[GRADLE]: https://gradle.org/ |
89 | | -[GRADLE-LICENSE-REPORT]: https://github.com/jk1/Gradle-License-Report |
0 commit comments