1.0 Introduction

1.1 History

1.2 Characteristics

1.3 Scanner Generators

1.4 Parser Generators

1.5 Semantic Analyzer Generators

1.6 Optimization

1.7 Code Generation

1.8 Summary

Web References

Exercises

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: