Draw the parse tree of the following Arithlang programs. Next, draw ASTs for the same programs. Finally,

Question:

Draw the parse tree of the following Arithlang programs.1. (+ 515) 2. (* (+43) (+4 0)) 3. (/ (+ 4 3 4 9) (+ 515) 9)

Next, draw ASTs for the same programs. Finally, report on the compression ratio achieved by the AST representation. The compression ratio is defined as (the number of nodes in the parse tree –the number of nodes in the AST) / the number of nodes in the parse tree.

Step by Step Answer:

Question Posted: