Skip to content

mobileFX/railroad-diagram-generator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 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

Languages

  • C++ 54.1%
  • HTML 42.4%
  • C 2.3%
  • Makefile 1.2%