Backus Naur Grammar Tree Syntax?
<p>So I'm taking a class in Programming Languages and we are going over the BNG (Backus Naur Grammar) and Grammar Tree Syntax. The problem is that the professor just mumbles and really can't explain anything well. If you guy can help make sure that I've got this right, I would greatly appreciate it!</p>

<p>Here's what I'm trying to understand.</p>

<ul>
<li>Given The BNG Grammar</li>
</ul>

<p>&lt; S > ::= &lt; X > &lt; Y > &lt; Z > | &lt; Y > &lt; Z ></p>

<p>&lt; X > ::= &lt; X > &lt; T > | &lt; T > &lt; W ></p>

<p>&lt; Y > ::= run | throw | jump</p>

<p>&lt; Z > ::= &lt; Z > &lt; K > | &lt; K ></p>

<p>&lt; T > ::= mike | sue | ted</p>

<p>&lt; W > ::= smith | jones | miller</p>

<p>&lt; K > ::= fence | rope | ball</p>

<hr>

<p>a) Draw a grammar tree with all tip node terminals.</p>

<p>My understanding here is that "tip nodes" means the part of the branch before the "leaf nodes" (so s, x, y, z, t, w, and k). So I got something like this... Using all the "tip nodes".</p>

<p><a href="https://i.stack.imgur.com/GyZxg.png" rel="nofollow"><img src="https://i.stack.imgur.com/GyZxg.png" alt="enter image description here"></a></p>

<hr>

<p>b) Draw another grammar tree using at least three different rules.</p>

<p>My understanding here is that for each "rule" of S, X, Y ..etc I have to choose a different terminal and non terminal. This is what I got.</p>

<p><a href="https://i.stack.imgur.com/RTqmw.png" rel="nofollow"><img src="https://i.stack.imgur.com/RTqmw.png" alt="enter image description here"></a></p>

<p>I appreciate anyone trying to help explain this to me, I've spent too long trying to read though my book and notes to understand this, but unfortunately the words and descriptions that my professor uses does not correlate to anything in my book or online.</p>

<p>Thank you! </p>