Beruflich Dokumente
Kultur Dokumente
Objectives
COMPILATION
Automata
Lexical analysis
Parser
Version 1.0
Last update: 04/15/2018
Use: Students/Staff
Author: Cyril-Alexandre Pachon
2CMP – SCE
Languages and Translators - Compilation
Table of contents
Page 2 sur 4
© SUPINFO International University – http://www.supinfo.com
2CMP – SCE
Languages and Translators - Compilation
To become certified, you need to get the average in each of the 4 parts.
Question 1.2: There is advantages to make the compilation with a typed language, which? Give 4 advantages.
Question 1.3: Define the notions of treatment to preprocessor, compilation, assembling and link editing. Give the file
type produces to each treatment.
Question 1.4: Write the derivation tree definition. Why do we use it?
+ +
Question 2.2: Draw the deterministic automaton of the following expression: (v(b)* |(f|d)|a(b) )|ad(g) d(g)*
Question 2.3: Write the regular expression for the following automaton:
Page 3 sur 4
© SUPINFO International University – http://www.supinfo.com
2CMP – SCE
Languages and Translators - Compilation
Question 3.2: Write the G grammar in the Chomsky Normal Form: G = (SbA | aB, AbAA | aS | a, BaBB | bS | b).
S A | "e" | S"t""t""r" | B
A A"a"
B "b"B | "i""h"
Question 4: Write the lexical analyzer (Lex) and parser (Yacc), using the G grammar.
Page 4 sur 4
© SUPINFO International University – http://www.supinfo.com