Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcioAlmada/railroad-diagram-generator
This is a tool for generating railroad diagrams.
https://github.com/marcioAlmada/railroad-diagram-generator
Last synced: 5 days ago
JSON representation
This is a tool for generating railroad diagrams.
- Host: GitHub
- URL: https://github.com/marcioAlmada/railroad-diagram-generator
- Owner: marcioAlmada
- License: gpl-2.0
- Created: 2014-09-14T20:43:18.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-19T15:56:16.000Z (almost 7 years ago)
- Last Synced: 2024-11-01T02:34:52.833Z (8 days ago)
- Language: C++
- Size: 87.9 KB
- Stars: 12
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
- awesome-starred - marcioAlmada/railroad-diagram-generator - This is a tool for generating railroad diagrams. (others)
README
# railroad-diagram-generator
A tool for generating railroad diagrams. The EBNF grammar used by the tool is described in doc/introduction/grammar.txt, and you can find some samples under directory sample/.
## Sample
The EBNF grammar of `EBNF`:
syntax ::= ( rule )+
rule ::= 'id' ( '::=' | '->' ) expression
expression ::= term ( '|' term )* ( '|' | )
term ::= ( factor )+
factor ::= ( 'id' | 'text' | '(' expression ')' ) ( '+' | '*' | )id is any string of alpha([a-zA-Z]) characters or number([0-9]) characters or underscores ('_')
text is any double-quoted string("...") or signle-quoted string('...') without newline('\n')The railroad diagrams of `EBNF`:
![railroad diagrams](./doc/introduction/railroad_diagrams.png)