Define a code generator for this ast structure you may


Assume we add a new kind of looping statement, the exit-when loop. This loop is of the form

974_03557b6b-f704-43e0-ad9f-9d16b46250b5.png

First statements1 are executed. Then expression is evaluated. If it is true, the loop is exited. Otherwise, statements2 followed by statements1 are executed. Then expression is reevaluated, and the loop is conditionally exited. This process repeats until expression eventually becomes true (or else the loop iterates forever). Suggest an AST structure suitable for representing an exit-when loop.

Define a code generator for this AST structure. (You may generate JVM code or code for any other computer architecture).

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Define a code generator for this ast structure you may
Reference No:- TGS01486735

Expected delivery within 24 Hours