I am not sure that the question belongs here - if not, please tell me where I am in the right place for such Questions.
I am currently developing an online API documentation for js-Software that parses Textfiles.
Each line of a text file is one “command”, and the syntax of each command must be described.
This is an example of the output I want to generate:

The input generated by this diagram is as follows:
CREATE [ UNIQUE | BITMAP ] INDEX [ schema. ]index
ON { cluster_index_clause
| table_index_clause
| bitmap_join_index_clause
} ;
This example is from Oracle SQL-Documentation, and I wonder if there is a tool that automatically creates such a diagram? Maybe even written in Javascript?
source
share