1
1 2 0 4 8 -
- J. Neira – University of Zaragoza
1 2 0 4 8 Com pilers I I 1 2 0 4 8 Com pilers I I Computer - - PowerPoint PPT Presentation
1 2 0 4 8 Com pilers I I 1 2 0 4 8 Com pilers I I Computer Science Engineering, 8 semester Mandatory, 2 Cycle Theoretical credits: 3.0 Theoretical credits: 3.0 Lab credits: 1.5 Lab credits: 1.5 Theory: Jos Neira Labs: David
1
1 2 0 4 8 -
2
1 2 0 4 8 -
Monday Tuesday Wednesday Thursday Friday
3
1 2 0 4 8 -
4
1 2 0 4 8 -
C C++ ADA Fortran .... Compiler 68000 80386 SPARC ....
5
1 2 0 4 8 -
regular LR(0) SLR(1) LALR(1) LR(1) LR(k) unambiguous Context free
6
1 2 0 4 8 -
Activation block BP Dynamic link Size of static link of
Return address Parameter 1 Parameter n local 1 local m display p display p-l+1 display p-1 + 1 + 2 + 3 + 4 l
STC n push(n) SRF n1 n2 push(display[DP - n1] + n2) DRF push (frames[pop()]) ASG frames[pop2()] = pop1() ASGI frames[pop1()] = pop2()
7
1 2 0 4 8 -
program main { int W; int X; void A() { int W; int Y; int Z; void B() { int X ; ... } void C() { int X; int Y ;...} ... } - end of A void D() { int Z ; ... } }
X 2 X 1 Λ W 1 A W 2 Z 1Λ Λ B 2 A 1Λ Λ W 1 C 1 W 2
Λ
8
1 2 0 4 8 -
9
1 2 0 4 8 -
10
1 2 0 4 8 -
Compiladores II Curso 2007-2008 Lunes Martes Miércoles Jueves Viernes 8-9 9-10 10-11 11-12 Pr 3,6 Pr 1,2 12-13 Pr 3,6 Pr 1,2 13-14 Pr 3,6 Pr 1,2 14-15 15-16 Pr 4,5 Pr 7,8 16-17 Pr 4,5 Pr 7,8 17-18 Pr 4,5 Pr 7,8 18-19 19-20 20-21
11
1 2 0 4 8 -
12
1 2 0 4 8 -
13
1 2 0 4 8 -
14
1 2 0 4 8 -
15
1 2 0 4 8 -
16
1 2 0 4 8 -
17
1 2 0 4 8 -