Jump to content

Help on parse trees!

Featured Replies

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 tree for :

WHILE 4==3 DO PRINT x; x:=4; ENDWHILE;

ex := 4;

 

I'm really stuck. Somebody help!

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.