Lecture Note 6 Flashcards
What is specification of programming
a programming language specification (or standard or definition) is a documentation artifact that defines a programming language so that users and implementors (language translators) can agree on what programs in that language mean.
What are the main translator for programming language translations
The assembler
The compiler
The interpereter
Describe syntactic analysis
The syntactic analyser(parser) costruct a derivation tree for the list
Describe semantic analysis
The derivation tree is subjected to checks of the language’s various context-based constraints.
Descirbe Code optimization
Optimizes the code obtained from the preceding phases
Describe code generation
Generates the final object code
What is an interpreter
An Interpreter is also a program that translates high-level source code into executable code.
What are the two parts of language specification
The syntax of a programming language is the part of the language definition that says what programs look like; their form and structure.
The semantics of a programming language is the part of the language definition that says what programs do; their behavior and meaning.
The syntax of a programming language is usually described using a combination of two components??
i. A regular expression describing its lexemes,
ii. A context-free grammar which describes how lexemes may be combined to form a syntactically correct program.
What are forms of programming language specification
i. Formal Language Specification
ii) ii. A description of the behavior of a compiler (sometimes called “translator”) for the language (e.g., the C++ language and FORTRAN).
iii)A model implementation, sometimes written in the language being specified
What is programming language translation
Programming language translation is the conversion of statements written in one language to statements in another language e.g converting assembly language to machine code.
What is a compiler
A compiler translates a program written in one high level language, the source code into another language which is the object code.
What is an assembler
The assembler translates mnemonic operation codes into machine code, and symbolic addresses into machine addresses
What is documentation
Documentation is any communicable material that is used to describe, explain or instruct regarding some attributes of an object or system such as its parts, assembly, installation, maintenance and use.
Compilers are organized into three stages:
A front end
An optimizers
A back end