Computer Science Canada

[b]Help on parse (derivation) tree!...[/b]

Author:  iopusstarr1 [ Wed Mar 12, 2008 5:57 pm ]
Post subject:  [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 → WHILE B DO S ENDWHILE; | SS | A | P
A → I := E;
I → char(char)٭
E → digit | E + E | I
P → PRINT I;
B → 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!

Author:  md [ Wed Mar 12, 2008 6:13 pm ]
Post subject:  RE:[b]Help on parse (derivation) tree!...[/b]

You already made a thread about this very thing here. Duplicate threads are bad, m'kay?


: