Chapter 2 - The Function and Purpose of Translators

Description

1 Computing - F453 Flashcards on Chapter 2 - The Function and Purpose of Translators, created by Jamie_472 on 10/06/2013.
Jamie_472
Flashcards by Jamie_472, updated more than 1 year ago
Jamie_472
Created by Jamie_472 over 11 years ago
56
0

Resource summary

Question Answer
What is the purpose of a translator? To convert source code into object code (machine code)
What is an opcode? A particular binary operation that a computer can carry out, e.g. additional, division
What is a mnemonic? Key words representing opcodes, e.g. ADD, SUB, MULT, DIV
What table is used to convert mnemonics to opcodes? The lookup table
What is the difference between a compiler and an interpreter? A compiler translates a program's source code into object code all at once. An interpreter translates a programs source code into object code one line at a time, running each line as soon as it is translated
What are the three phases of compilation? 1) Lexical analysis 2) Syntax analysis 3) Code generation and optimisation
What is the process of lexical analysis? 1) All comments and whitespace are removed 2) Simple error checking is performed 3) Tokens are created from the input characters 4) Identifiers (variable names) are placed in a symbol table
What are tokens? Symbolic representations of the input characters. They are usually represented by numbers
What is it called when there are a specific group of characters that represent a token? A lexeme
What is the slowest phase of compilation? Lexical analysis
What is the purpose of syntax analysis? To determine whether the sequence of input characters, symbols, items and tokens form a valid sequence in the language as defined by BNF or syntax diagrams
Which semantic checks are carried out during syntax analysis? 1) Label checks 2) Flow of control checks (Makes sure statements are used in the correct place and order) 3) Declaration checks (Makes sure all variables have been properly declared)
Show full summary Hide full summary

Similar

Chapter 1 - The Function of Operating Systems
Jamie_472
3.1 - The Function of Operating Systems
Jamie_472
Untitled
Jamie_472
Untitled
Jamie_472
IMPERFECT TENSE - French
T W
GRE Word of the Day
SAT Prep Group
English Language
livbennett
Biology AQA 3.1.3 Cells
evie.daines
GCSE Maths Conversions
EmilieT
Conferences of the Cold War
Alina A
Microbiology MCQs 3rd Year Final- PMU
Med Student