人类大脑与五官(甚至包括第六感)对大千世界的观察是 立体的、联想的、开放的,也可以说是全息的。在技术的限制 下,人们只能制造出各种仅能表达形形式式的单媒体来近似表 达不完全的信息。随着人类社会的进步,多媒体信息系统将负 担起运用多媒体手段来表达完整信息的任务
文件格式: PPT大小: 318.5KB页数: 34
Main Purpose Study an algorithm: – Translating a regular expression into a DFA via NFA
文件格式: PPT大小: 296KB页数: 79
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;
文件格式: PPT大小: 237KB页数: 72
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
文件格式: PPT大小: 397KB页数: 108
Symbol table: major inherited attribute and major data structure in a compiler Principal operations: – Insert: store the information provided by name declarations when processing these declarations – Lookup: retrieve the information associated to a name when that name is used in the associated code
文件格式: PPT大小: 264.5KB页数: 75
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
文件格式: PPT大小: 663.5KB页数: 87
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:
文件格式: PPT大小: 197KB页数: 49
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:
文件格式: PPT大小: 421KB页数: 72
Why Compiler Writing machine language-numeric codes is time consuming and tedious
文件格式: PPT大小: 318.5KB页数: 68
Main idea LL(1) Parsing uses an explicit stack rather than recursive calls to perform a parse An example: – a simple grammar for the strings of balanced parentheses: S→(S) S∣ε The following table shows the actions of a topdown parser given this grammar and the string ( )
文件格式: PPT大小: 569KB页数: 104










