-
Notifications
You must be signed in to change notification settings - Fork 2
/
EBNF.html
2 lines (2 loc) · 4.03 KB
/
EBNF.html
1
2
<!DOCTYPE HTML>
<html><head><title>EBNF</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1"><style>body{background-color:#f4f2ef}h1{font-family:sans-serif;font-size:1em}</style><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/railroad-diagrams.css"><script src="https://cdn.jsdelivr.net/npm/[email protected]/railroad-diagrams.min.js"></script></head><body><h1>syntax</h1><div><script>Diagram(Choice(0, Sequence(NonTerminal('syntax-rule'), ZeroOrMore(Choice(0, Sequence(NonTerminal('syntax-rule'))), '', 'skip')))).addTo()</script></div><h1>syntax-rule</h1><div><script>Diagram(Choice(0, Sequence(NonTerminal('meta-identifier'), Terminal('='), NonTerminal('definitions-list'), Terminal(';')))).addTo()</script></div><h1>definitions-list</h1><div><script>Diagram(Choice(0, Sequence(NonTerminal('single-definition'), ZeroOrMore(Choice(0, Sequence(Terminal('|'), NonTerminal('single-definition'))), '', 'skip')))).addTo()</script></div><h1>single-definition</h1><div><script>Diagram(Choice(0, Sequence(NonTerminal('term'), ZeroOrMore(Choice(0, Sequence(Terminal(','), NonTerminal('term'))), '', 'skip')))).addTo()</script></div><h1>term</h1><div><script>Diagram(Choice(0, Sequence(NonTerminal('factor'), Optional(Choice(0, Sequence(Terminal('-'), NonTerminal('terminal'))), 'skip')))).addTo()</script></div><h1>factor</h1><div><script>Diagram(Choice(0, Sequence(Optional(Choice(0, Sequence(NonTerminal('integer'), Terminal('*'))), 'skip'), NonTerminal('primary')))).addTo()</script></div><h1>primary</h1><div><script>Diagram(Choice(0, Sequence(NonTerminal('terminal')), Sequence(NonTerminal('non-terminal')))).addTo()</script></div><h1>non-terminal</h1><div><script>Diagram(Choice(0, Sequence(NonTerminal('optional-sequence')), Sequence(NonTerminal('repeated-sequence')), Sequence(NonTerminal('grouped-sequence')), Sequence(NonTerminal('meta-identifier')))).addTo()</script></div><h1>terminal</h1><div><script>Diagram(Choice(0, Sequence(NonTerminal('special-sequence')), Sequence(NonTerminal('terminal-string')), Sequence(NonTerminal('empty')))).addTo()</script></div><h1>empty</h1><div><script>Diagram(Choice(0, Sequence(Terminal('')))).addTo()</script></div><h1>optional-sequence</h1><div><script>Diagram(Choice(0, Sequence(Terminal('['), NonTerminal('definitions-list'), Terminal(']')))).addTo()</script></div><h1>repeated-sequence</h1><div><script>Diagram(Choice(0, Sequence(Terminal('{'), NonTerminal('definitions-list'), Terminal('}')))).addTo()</script></div><h1>grouped-sequence</h1><div><script>Diagram(Choice(0, Sequence(Terminal('('), NonTerminal('definitions-list'), Terminal(')')))).addTo()</script></div><h1>terminal-string</h1><div><script>Diagram(Choice(0, Sequence(Terminal("\'"), NonTerminal("character - \"\'\""), ZeroOrMore(Choice(0, Sequence(NonTerminal("character - \"\'\""))), '', 'skip'), Terminal("\'")), Sequence(Terminal('\"'), NonTerminal("character - \'\"\'"), ZeroOrMore(Choice(0, Sequence(NonTerminal("character - \'\"\'"))), '', 'skip'), Terminal('\"')))).addTo()</script></div><h1>meta-identifier</h1><div><script>Diagram(Choice(0, Sequence(NonTerminal('letter'), ZeroOrMore(Choice(0, Sequence(NonTerminal('letter')), Sequence(NonTerminal('decimal-digit'))), '', 'skip')))).addTo()</script></div><h1>integer</h1><div><script>Diagram(Choice(0, Sequence(NonTerminal('decimal-digit'), ZeroOrMore(Choice(0, Sequence(NonTerminal('decimal-digit'))), '', 'skip')))).addTo()</script></div><h1>special-sequence</h1><div><script>Diagram(Choice(0, Sequence(Terminal('?'), ZeroOrMore(Choice(0, Sequence(NonTerminal("character - \'?\'"))), '', 'skip'), Terminal('?')))).addTo()</script></div><h1>comment</h1><div><script>Diagram(Choice(0, Sequence(Terminal('(*'), ZeroOrMore(Choice(0, Sequence(NonTerminal('comment-symbol'))), '', 'skip'), Terminal('*)')))).addTo()</script></div><h1>comment-symbol</h1><div><script>Diagram(Choice(0, Sequence(NonTerminal('comment')), Sequence(NonTerminal('terminal-string')), Sequence(NonTerminal('special-sequence')), Sequence(NonTerminal('character')))).addTo()</script></div></body></html>