The triples have three fields to implement the three address code. The field of triples contains the name of the operator, the first source operand and the second source operand.
In triples, the results of respective sub-expressions are denoted by the position of expression. Triple is equivalent to DAG while representing expressions.
Fig: Triples field
Three address code is as follows:
t1 := -b t2 := c + dM t3 := t1 * t2 a := t3
These statements are represented by triples as follows: