![]() | ![]() | ![]() | Intermediate Representations |
Now that we have an understanding of the basic phases of a compiler, we will discuss the types of data that flows between these phases. I will not attempt to describe every scheme for representing the intermediate results of the compilation process. I just want to show you one way to give you a concrete picture of what goes on. The organization I will outline corresponds closely to what will be used in the course project.
The first element of a pair used to represent a token provides all the information the parser needs.
The second element of a token pair encodes this information. The parser typically just passes this on to the later phases without examining it.
if ( x <= 0 ) { flag = ; }
![]() | ![]() | ![]() | Intermediate Representations |