Notices
Results 1 to 2 of 2

Thread: HELP on parse trees..

  1. #1 HELP on parse trees.. 
    New Member
    Join Date
    Mar 2008
    Posts
    2
    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


    Question 1: Parse Trees
    Give the parse tree for
    WHILE 4==3 DO PRINT x; x:=4; ENDWHILE;
    ex := 4;

    I'm really stuck. Somebody help!


    Reply With Quote  
     

  2.  
     

  3. #2  
    WYSIWYG Moderator marnixR's Avatar
    Join Date
    Apr 2007
    Location
    Cardiff, Wales
    Posts
    5,810
    wtf is a parse tree ?


    "Reality is that which, when you stop believing in it, doesn't go away." (Philip K. Dick)
    Reply With Quote  
     

Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •