Language processing programs like compilers and interpreters go through the phases of scanning, parsing,
and code generation. Scanning is also known as lexical analysis, and the output of the scanner is a stream of
tokens in the language (key words, variable names, etc.). Parsing is also known as syntactical analysis, and the
parser must verify that the stream of tokens conforms to the rules of the language grammar. The output of the
parser is a parse tree. Finally, code generation, also known as semantic analysis, consists of traversing the parse
tree from the bottom up, creating the necessary machine instructions.
Half a century into the computer age, the world of software encompasses a wide variety of general-purpose
and special-purpose languages based on formal definitions and grammars. Interpreters, compilers, virtual
machines, or all three, support the myriad programs written in these languages. The future will probably bring
further differentiation and specialization of languages and programs as computer scientists further refine their
thinking about how best to translate human intention into machine instructions.
REVIEW QUESTIONS
4.1 Why was it important to the history of programming languages that, even at its introduction, FORTRAN
generated efficient programs?
4.
Pages:
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184