The EBNF Parser & Syntax Diagram Renderer can be used stand-alone or as Dokuwiki-Plugin.
<ebnf> "EBNF defined in itself" { syntax = [ title ] "{" { production } "}" [ comment ]. production = identifier "=" expression ( "." | ";" ) . expression = term { "|" term } . term = factor { factor } . factor = identifier | literal | "[" expression "]" | "(" expression ")" | "{" expression "}" . identifier = character { character } . title = literal . comment = literal . literal = "'" character { character } "'" | '"' character { character } '"' . }</ebnf>
The script is also available as stand-alone version under: your_dokuwiki/lib/plugins/ebnf/ebnf.php
.../ebnf.php?syntax="EBNF"{ hello = "Hello World". }"Some additional Comments"
Note: The stand-alone script supports also XML output
.../ebnf.php?syntax={ hello = "EBNF Hello World in XML". }&format=xml
digits
: function render_node($node, $lefttoright)
... else { if ($text!="...") rr($im, UNIT, 0, $w-UNIT-1, $h-1, UNIT/2, $black); imagestring($im, FONT, 2*UNIT, ($h-imagefontheight(FONT))/2, $text, $text!="..."?$blue:$black); } ...
? … ?