I refer to this link for the following grammar,
[1] document ::= prolog element Misc*
[39] element ::= STag content ETag
[43] content ::= CharData? ((element | Reference | CDSect | PI | Comment) CharData?)*
Obviously, we can produce elements (like, <p>hello world</p>) by decomposing
elementto<p> content </p>, and thencontenttohello world
But, what I am wondering is how to produce a sequence of parallel elements, like below,
<p>hello world</p>
<p>hello world</p>
<p>hello world</p>
<p>hello world</p>
It seems that we can only decompose the element in the grammar into nested elements, like below,
<p>
<p>
<p>hello world</p>
</p>
</p>
From what I understand, in order to produce a sequence of parallel elements, we need to use a grammar like the following one,
document ::= prolog elements Misc*
elements ::= STag content ETag (STag content ETag)*
content ::= CharData? ((element | Reference | CDSect | PI | Comment) CharData?)*
So, did I miss anything?