Question: 2. (22 points) Consider the Statement component family and answer the questions below. 2.1. (10 points) Draw the abstract syntax tree corresponding the following BL

 2. (22 points) Consider the Statement component family and answer the

2. (22 points) Consider the Statement component family and answer the questions below. 2.1. (10 points) Draw the abstract syntax tree corresponding the following BL statement. WHILE true DO IF next-is-enemy THEN WHILE TRUE infect ELSE skip BLOCK END IF move turnleft IF Move turnleft END WHILE HexF_IS_Empty Block / / BLOCK - 2 CALL ! CALL " infact " "STV 2.2. (4 points) What is the initial value of a statement object s initialized with the statement Statement( s = new Statement1 ( )? Provide a precise value using mathematical notation. s = compose

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!