All scripts and input files required to generate these examples are shipped with the MarpaX::Grammar::GraphViz2 distro. Output files are shipped too.
Note 1: The SVG file for c.ast.bnf has been omitted from this demo page because of its size.
It takes Graphviz's 'dot' program 6 m 25 s to generate (off-line), and is 1.4 Mb in size.
These are not problems, only facts. The problem is the width of the image. So I skipped it.
Note 2: Some images have a tiny subgraph whose root is, e.g., 'comma'. This is due to the author using
both 'comma' and '<comma>' as tokens within the grammar. So far this module does not handle that.
Note 3: A similar thing (as in Note 2) can happen elsewhere, e.g. with named event statements,
when the rhs name uses (say) '<xyz>' and the rule referred to uses just 'xyz'.
In all such cases, there will be 2 nodes, with 2 names differing in just the brackets.
Note 4: Some characters are replaced by similar Unicode characters, because Graphviz teats those characters
as special. These characters are: <, >, " and :. Indeed, the " char is replaced by 2 single quotes.
Note 5: The legend is experimental, and it's form may change at any time. It is displayed here on all
images, but is of course optional.
Note 6: There is a problem displaying any grammar, when a token is used on the right-hand side of a rule
both with and without a qualifier. An example is 'value' in these 2 rules in the json.1.bnf:
|pair||::=||string ':' value||action => do_pair|
|elements||::=||value+||separator => comma action => do_list|
There is no way to display the text 'value' both with and without that '+' sign.
Note 7: Numbers on nodes are rule numbers within the input stream.
Table of Contents
|Input file # 1 - json.1.bnf|
|Input file # 2 - json.2.bnf|
|Input file # 3 - stringparser.bnf|
|Input file # 4 - termcap.info.bnf|
Due to its width, the SVG file for the c.ast.bnf case is not in this table, but can be viewed here.
|Input file # 1 - json.1.bnf||
Output file # 1 - html/json.1.svg
|Input file # 2 - json.2.bnf||
Output file # 2 - html/json.2.svg
|Input file # 3 - stringparser.bnf||
Output file # 3 - html/stringparser.svg
|Input file # 4 - termcap.info.bnf||
Output file # 4 - html/termcap.info.svg
Debian V 6