Selasa, 17 November 2015

TEKNIK KOMPILASI (TUGAS MID)

TEKNIK KOMPILASI


Buat Notasi Prefix, Postfix, N-Tuples (Triples & 4-Tuples)
K = (5^2*2+4/3)/6

Prefix
   <operator>     <operand>     <operand>
  /(*/ 5^2 2 + 4 3) 6

Postfix
   <operand>     <operand>     <operator>
   (5^2 2 + 4 3 * /) 6/

N-Tuples  Triples
    1.   *, 5^2, 2
    2.   /, 4, 3
    3.   +, /, 6

N-Tuples 4- Tuples
    1.   *, 5^2, 2, T1
    2.   /, 4, 3, T2
    3.   +, /, 6, T3

Tidak ada komentar:

Posting Komentar