?????(intermediate code) - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

?????(intermediate code)

Description:

Title: 1 1 1 Author: shirai Last modified by: shirai – PowerPoint PPT presentation

Number of Views:42
Avg rating:3.0/5.0
Slides: 10
Provided by: shir105
Category:

less

Transcript and Presenter's Notes

Title: ?????(intermediate code)


1
5.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)????????????
  • A ( X Y - Z ) / ( X Y )

?????
(, X, Y, r1) (-, r1, Z, r2) (, X, Y,
r3) (/, r2, r3, A )
(, X, Y, r1) (-, r1, Z, r2) (/, r2, r1, A )
Write a Comment
User Comments (0)
About PowerShow.com