Title: ?????(intermediate code)
15.4 ????(1)??????
?????(intermediate code)
- ???????????????????????????????????????????
????( intermediate language )
????????????
2(2)???????
??????????
- ? ????(???????????)
- ?? BASIC ??
- ? ???(?????????????????????)
- ???????????
- ? ?????????????
- ???????????????
- ? ????????
- ????????????????????
??????????????????????????????????????????????????
???????? (C??????White Smith???)
3(3)???(Syntax tree)
- ???(leaf)?????(operand)
- ???(node)????(operation)
???(AB)C
C
A
B
??????????????
4(3)?????
- ?????(prefix notation) A B
- ???????????Lisp????????
- ???????(Polish Notation)?????
- ?????(infix notation)A B
- ?????????????????????
- ??????????????????????
- ?????(postfix notation)A B
- ???????????????????
- ????????( Inverse Polish Notation)?????
????????????????????????? ??????????????
5???????
- ???? A B C
- ???? (A B) C
- ???? A B C (A?B???????C????)
???(AB)C
C
A
B
6(4)???(triple)
- 2???????????
- (2????two address code????)
??(???, ????1,????2 ) ???A 20 / B - C D 1.
( /, 20, B) 2. ( , C, D) 3. ( -, _at_1, _at_2)
4. ( , _at_3, A) (???????????????????????)
7(5)???(quadruple)
- ????2??????????????
- ?????????????????????????
- (3????three address code????)
(???, ????1,????2,????? ) ???A 20 / B - C D
( /, 20, B, R1) ( , C, D, R2) ( -, R1,
R2,A)
8(6)???????????
??????
- ??????????????????????????????
- ????????????????????
- ????????????????????????????
- ????????????????????????????????????????
?????
????????????????????????? ??????????????? ???????F
ORTRAN??????????
9(7)????????????
?????
(, X, Y, r1) (-, r1, Z, r2) (, X, Y,
r3) (/, r2, r3, A )
(, X, Y, r1) (-, r1, Z, r2) (/, r2, r1, A )