Wednesday, January 6, 2016

Compiler Desgining

  • Test Next Week
  • This and Next Week are Advising Weeks or Else!!

DATA STRUCTURES
  1. Array ---> Computed Offsets
  2. Object
  3. Dynamic Structures (Linked List)
  4. Union Structure --> Named of sets
  5. Record / Struct -->


  1. Array: 
.
.
.
ARR[5] = 7; Compute
. ADDR ARR ==> B.A + 100  ==> "x"

2. oBJECT
3. dYNAMIC Structures (Link List)
4. UNION Structure
5. Record / Struct
example:
Record Student Record:
NAMEchar[20]    offset is 0
AGEint    offset is 20
GPAFLOAT    offset is 24
..



StudentRecord s;
s.AGE = 14; // what address should be interpreted for AGE (its called Name Offset)
     |
     |
     code to 
complete LHS address?    Lets say X = BaseAddress + 200

 (take X and start adding the sizes of other data types )


Quote of the Day:
"Blowing up is better than getting Garbage" 


The Quote is in reference to dangaling reference pointers.



"Don't step up to the plate unless you'v got sholders"



-= xxx END oF Data Structures xxx =-

ERRORS
- Detection Issues
- Recovery Issues  (when illegal character is found show error and discard) 
- Reporting Issues

Compile Time view Run Time View






No comments: