Example: a grammar for HTML list structures

S->T<ul>L</ul>|T<ol>L</ol>
L-><li>TL|<li> SL|<li> T
T->aT|bT|...|zT|a|...|z

S=whole sentence, T=text part (at least one letter), L=list content (at least one <li> text). Now we require that there must always be some text before beginning a new list. Number of nested lists is not limited.