Skip to content

marcioAlmada/railroad-diagram-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

This is a tool for generating railroad diagrams.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published