
-----------------------------------
iopusstarr1
Wed Mar 12, 2008 5:57 pm

[b]Help on parse (derivation) tree!...[/b]
-----------------------------------
I was given a question of the follwing: 

Consider the Baby Programming Language (BPL). It is a very simple programming language, 
whose syntax is given by the following grammar: 

S &#8594; WHILE B DO S ENDWHILE; | SS | A | P 
A &#8594; I := E; 
I &#8594; char(char)&#1645; 
E &#8594; digit | E + E | I 
P &#8594; PRINT I; 
B &#8594; TRUE | FALSE | E == E 

Give the parse (derivation) tree for : 
WHILE 4==3 DO PRINT x; x:=4; ENDWHILE; 
ex := 4; 

I'm really stuck. Somebody help!

-----------------------------------
md
Wed Mar 12, 2008 6:13 pm

RE:[b]Help on parse (derivation) tree!...[/b]
-----------------------------------
You already made a thread about this very thing [url=http://compsci.ca/v3/viewtopic.php?t=17513]here. Duplicate threads are bad, m'kay?
