Chapter 2 - The Function and Purpose of Translators

Beschreibung

1 Computing - F453 Karteikarten am Chapter 2 - The Function and Purpose of Translators, erstellt von Jamie_472 am 10/06/2013.
Jamie_472
Karteikarten von Jamie_472, aktualisiert more than 1 year ago
Jamie_472
Erstellt von Jamie_472 vor mehr als 11 Jahre
55
0

Zusammenfassung der Ressource

Frage Antworten
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)
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Chapter 1 - The Function of Operating Systems
Jamie_472
3.1 - The Function of Operating Systems
Jamie_472
Untitled
Jamie_472
Untitled
Jamie_472
Berufe der Zukunft
JohannesK
AOW - Psych
Aydan Altuner
Übung Aussprache und Tiere
Gamze Ü
Vetie - Biochemie - Formelsammlung
Fioras Hu
Vetie - Pharma 2017
Fioras Hu
MEKO WS 18/19
max knoll
AVO 2015 Vetie
Schmolli Schmoll