You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: spec/index.html
+44-44
Original file line number
Diff line number
Diff line change
@@ -657,9 +657,51 @@ <h3>Result</h3>
657
657
</aside>
658
658
</emu-clause>
659
659
660
+
<emu-clauseid="emu-grammar">
661
+
<h1>emu-grammar</h1>
662
+
<p>Text inside emu-grammar elements is parsed using <ahref="https://github.com/rbuckton/grammarkdown">Grammarkdown</a>. The syntax is essentially identical to the notational conventions in ECMAScript (minus formatting). See the <ahref="https://github.com/rbuckton/grammarkdown">Grammarkdown readme</a>.</p>
663
+
<p>Grammar will be displayed as an inline element flowing with text unless it is the immediate child of an emu-clause-like element.</p>
664
+
665
+
<h2>Attributes</h2>
666
+
<p><b>collapsed:</b> If present, productions are displayed in collapsed format with LHS and RHS on the same line.</p>
667
+
<p><b>example:</b> If present, the element is an example.</p>
668
+
<p><b>primary:</b> Optional: Deprecated in favor of type="definition".</p>
669
+
<p><b>type:</b> Optional: Disposition of the grammar. If absent, it is considered to reference productions defined elsewhere.</p>
670
+
<ul>
671
+
<li>"definition": The grammar is an authoritative source for productions which should be the target of references.</li>
672
+
<li>"example": Deprecated in favor of the <b>example</b> attribute.</li>
<p>There are two ways to specify grammar in Ecmarkup: using the <ahref="#emu-production">emu-production</a> element and related elements, or by using the <ahref="#emu-grammar">emu-grammar</a> element which allows specifying grammar using a plaintext format.</p>
703
+
<h1>Directly Specifying Grammar</h1>
704
+
<p>Although discouraged, it is possible to directly specify grammar using the <ahref="#emu-production">emu-production</a> element and related elements emitted by <ahref="https://github.com/rbuckton/grammarkdown">Grammarkdown</a>.</p>
663
705
664
706
<h2>Lexical Grammar Examples</h2>
665
707
<pre><codeclass="language-html">
@@ -733,48 +775,6 @@ <h3>Result</h3>
733
775
</emu-production>
734
776
</aside>
735
777
736
-
<emu-clauseid="emu-grammar">
737
-
<h1>emu-grammar</h1>
738
-
<p>Text inside emu-grammar elements is parsed using <ahref="https://github.com/rbuckton/grammarkdown">Grammarkdown</a>. The syntax is essentially identical to the notational conventions in ECMAScript (minus formatting). See the <ahref="https://github.com/rbuckton/grammarkdown">Grammarkdown readme</a>.</p>
739
-
<p>Grammar will be displayed as an inline element flowing with text unless it is the immediate child of an emu-clause-like element.</p>
740
-
741
-
<h2>Attributes</h2>
742
-
<p><b>collapsed:</b> If present, productions are displayed in collapsed format with LHS and RHS on the same line.</p>
743
-
<p><b>example:</b> If present, the element is an example.</p>
744
-
<p><b>primary:</b> Optional: Deprecated in favor of type="definition".</p>
745
-
<p><b>type:</b> Optional: Disposition of the grammar. If absent, it is considered to reference productions defined elsewhere.</p>
746
-
<ul>
747
-
<li>"definition": The grammar is an authoritative source for productions which should be the target of references.</li>
748
-
<li>"example": Deprecated in favor of the <b>example</b> attribute.</li>
<p>This is the top level element that contains a grammar production associating a shared <dfn>LHS</dfn> (left-hand side) <emu-xrefhref="#emu-nt"title></emu-xref> non-terminal symbol with one or more <emu-xrefhref="#emu-rhs"title></emu-xref> elements containing arbitrary <dfn>RHS</dfn> (right-hand side) sequences of terminal and non-terminal symbols.</p>
0 commit comments