click below
click below
Normal Size Small Size show me how
1.3
Translation Process Compiler Construction Principles Practice Kenneth Louden
| Question | Answer |
|---|---|
| key terms | phases |
| what does a compiler consist of internally | a number of steps (phases) that perform distinct logical operations |
| how are the phases of a compiler coded | may be written as separately coded operations although in practice they are often grouped together |
| phases of a compiler | scanner, parser, semantic analyzer, source code optimizer, code generator, target code optimizer, |
| auxiliary components that interact with some or all of the phases of a compiler | literal table, symbol table, error handler |
| what does the scanner phase of a compiler do | this phase of the compiler does the actual reading of the source program |
| what is the source program usually in the form of | a stream of characters |
| what does the scanner perform | lexical analysis |
| what is lexical analysis | scanner collects sequences of characters into meaningful units called tokens |
| what are tokens | like the words of a natural language |
| what does each token consist of | one or more characters that are collected into a unit before further processing takes place |
| what other functions can a scanner perform along with the recognition of tokens | may enter identifiers into the symbol table, and it may enter literals into the literal table |
| what is a literal | include numeric constants such as 3.14... and quoted strings of text such as "Hello, World!" |
| what does the parser recieve | the source code in the form of tokens from the scanner |
| what does the parser perform | syntax analysis |
| what is syntax analysis | determines the structure of the program |