1.5.2 Intermediate Representation

Intermediate representation, sometimes called Intermediate Language (IL) or Intermediate Code (IC), is an alternative form to a parse tree. Sometimes the parser creates this intermediate form directly; sometimes the parse tree is converted.

Here, we show an abstract syntax tree (or abstract structure tree. It removes some of the intermediate categories and captures the elementary structure. . Each leaf and non-leaf represents a token; leaves are operands and non-leaves are operators. The assignment statement:

X := X + 1

has an abstract syntax tree:

Send questions and comment to: Karen Lemone