The Function of a Scanner Reading characters from the source code and form them into logical units called tokens Tokens are logical entities defined as an enumerated type – Typedef enum {IF, THEN, ELSE, PLUS, MINUS, NUM, ID,…} TokenType;
Function of a Parser Takes the sequence of tokens produced by the scanner as its input and produces the syntax tree as its output. Parser Sequence of tokens Syntax-Tree
Attributes – Any property of a programming language construct such as The data type of a variable The value of an expression The location of a variable in memory
A stack-based environment will result in a dangling reference when the procedure is exited if a local variable in a procedure can be returned to the caller The simplest example:
The memory of a typical computer: A register area; Addressable Random access memory (RAM): A code area; A data area. The code area is fixed prior to execution, and can be visualized as follows:
Assuming two bytes for integers, four bytes for addresses, one byte for character and eight bytes for double-precision floating point, we would have the following offset values:
Molecular Principles of Biomaterials Spring 2003 Lecture 2: Molecular Design and Synthesis of Biomaterials I: Biodegradable Materials Chemistry of Biodegradable Materials Hydrolytically degraded biomaterials Common hydrolytically unstable linkages Ester