Teknik kompilasi
Buat Notasi Prefix, Postfix, N-Tuples (Triples &
4-Tuples)
·
Prefix
K = (52 * 2 + 4 / 3) /6
K = (52 * 2 + 4 / 3) /6
<operator>
<operand> <operand>
/(*/ 5^2 2 + 4 3) 6
/(*/ 5^2 2 + 4 3) 6
·
Postfix
K = (52 * 2 + 4 / 3) /6
K = (52 * 2 + 4 / 3) /6
<operand>
<operand> <operator>
(5^2 2 + 4 3 * /) 6/
(5^2 2 + 4 3 * /) 6/
·
Triples
K = (52 * 2 + 4 / 3) /6
List Instruksi
1.
* 5 , 5
2.
* 2, (1)
3.
/ 4, 3
4.
+ (2), (3)
5.
/ (4) , 6
6.
= K , (5)
|
List Eksekusi
(1)
(2)
(3)
(4)
(5)
|
·
4-Tuples
K
= (52 * 2 + 4 / 3) /6
Last Instruksi
1.
* 5 , 5
2.
* T1, 2
3.
/ 4, 3
4.
+ (T2), (T3)
5.
/ T(4) , 6
|
Last Eksekusi
(T1)
(T2)
(T3)
(T4)
(K)
|
Komentar
Posting Komentar