← Indietro
Altro

Tema 190717

Altro di Formal Languages and Compilers per il corso di Computer Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Formal Languages and CompilersAltro

Informazioni sul documento

Cosa trovi in questo materiale

Altro di Formal Languages and Compilers per il corso di Computer Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Qualità dell’importazione: il testo è stato estratto direttamente dal documento originale.

Contenuti estratti dal documento

Passaggi rappresentativi riconosciuti nelle diverse parti del materiale. Il testo completo resta presente nella pagina per la ricerca, mentre l’anteprima compatta rende più semplice la lettura.

Pagina 1

Formal Languages and Compilers Proff. Breveglieri, Morzenti Written exam1: laboratory question 19/07/2017 SURNAME: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . NAME: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Student ID:. . . . . . . . . . . . . . . . Course:◦ Laurea Specialistica ◦ V. O. ◦ Laurea Triennale ◦ Other: . . . Instructor:◦ Prof. Breveglieri ◦ Prof Morzenti The laboratory question must be answered taking into account the implementation of the Acse compiler given with the exam text. Modify the specification of the lexical analyser ( flex input) and the syntactic analyser (bison input) and any other source file required to allow the support for a software emulated multiplication operation in Lance A software emulated multiplication operation should have the same functional behavior of a regular multiplication, save for the fact that itno MUL operations are emitted by ACSE to handle it. The software emulated multiplication employs the operator [*] instead of the common *. The proposed implementation should perform proper constant folding, taking into account the fact that ACSE will run on a machine which has support for multiplication. Therefore, the * may coexist with the operator [*], as in the following example. int a=3,b=2; if (a*b == a [ *] b) { write (1); } else { write(0); } The software emulated multiplication operator has the same precedence of the common multiplication and must provide the same semantics (proper treatment of signs included). 1Time 60’. Textbooks and notes can be used. Pencil writing is allowed. Write your name on any additional sheet. 1 1. Define the tokens (and the related…

Anteprima

Prima pagina del documento.

Prima pagina: Tema 190717