Formal Languages and Compilers course
JFlex & Cup
Home
Highlights:
2019/07/13: Intership in Luxembourg (Luxembourg Institute of Science and Technology  LIST)
For student at the end of an engineering cycle (Master of Science or Master 2) in Electronic Engineering, Computer Science or Applied Mathematics.
The intership will be paid.
Please contact stefano.scanzio [at] ieiit.cnr.it and mariarita.palattella [at] list.lu
Details:Intership_LIST_5G_IoT_satellite_networks.pdf, theses
Please, if interested express your interest quickly!
Communications:
 [2019/06/07]: All the material has been added
 [2019/05/31]: Added EXAMS that will be discussed in the seventh classroom lesson, correction of the sixth laboratory, and text of the seventh laboratory
 [2019/05/29]: Added slides of the sixth classroom lesson
 [2019/05/23]: Added text of the sixth laboratory.
 [2019/05/14]: Added slides of the fifth classroom lesson and corrections of the fifth laboratory.
 [2019/05/14]: Added text of the fifth laboratory.
 [2019/05/10]: Modified the 6  Proposed Theses section. Added direct link to theses: https://www.skenz.it/ss/theses
 [2019/05/08]: Added slides of the fourth classroom lesson and corrections of the fourth laboratory
 [2019/04/30]: Added text of the fourth laboratory.
 [2019/04/17]: Added slides of the third classroom lesson and corrections of the third laboratory
 [2019/04/08]: Added text of the third laboratory
 [2019/04/03]: Added slides of the second classroom lesson and corrections of the second laboratory
 [2019/03/25]: Added text of the second laboratory and corrections of the first laboratory
 [2019/03/19]: Added the text of the first laboratory
 [2019/03/15]: The installation guide was modified adding the rules to compile cup.
Calendar
The calendar of the next practices in classroom and in laboratory
 [2019/06/06] from 14:30 to 16:30/17:00 room 2P > Seventh classroom lesson (Exams)
 [2019/06/06] from 13:00 to 14:30 LABINF > Seventh laboratory
 [2019/05/31] from 14:30 to 16:00 room 3I > Sixth classroom lesson
 [2019/05/30] from 13:00 to 14:30 LABINF > Sixth laboratory
 [2019/05/24] from 14:30 to 16:00 room 3I > Fifth classroom lesson
 [2019/05/16] from 13:00 to 14:30 LABINF > Fifth laboratory
 [2019/05/10] from 14:30 to 16:00 room 3I > Fourth classroom lesson
 [2019/05/02] from 13:00 to 14:30 LABINF > Fourth laboratory
 [2019/04/18] from 14:30 to 16:30 room 2P > Third classroom lesson
 [2019/04/11] from 13:00 to 14:30 LABINF > Third laboratory
 [2019/04/05] from 14:30 to 16:00 room 3I > Second classroom lesson
 [2019/03/28] from 13:00 to 14:30 LABINF > Second laboratory
 [2019/03/21] from 13:00 to 14:30 LABINF > First laboratory
 [2019/03/15] from 14:30 to 16:00 room 3I > First classroom lesson
0  Index
1  Practice in classroom
2  Laboratory
3  Useful resources
4  Pseudo Assembler interpreter
5  Exams examples
6  Proposed Thesis
0  How to install tools
Linux installation (Bash shell):
How to download, install and configurate Java, JFlex and Cup in a Ubuntu Linux operating system with bash shell
1  Practice in classroom
2  Laboratory
 Laboratory 1: laboratory_1.pdf
Regular expression and the scanner JFlex
Before starting try to compile and to understand the example analyzed in class: exp.jflex, es_expr.txt
To execute the scanner type the following commands on a terminal: jflex exp.jflex; javac Calc.java; java Calc es_expr.txt
Solutions: Exercise 1, Exercise 2, Exercise 3

Laboratory 2: laboratory_2.pdf
Exercises regarding the JFlex scanner.
Solutions: Exercise 1, Exercise 2.

Laboratory 3: laboratory_3.pdf
Implement a parser for a simplified version of the C programming language (mini C), and a parser for all the C programming language
Provided code: for the first exercise the scanner, the main file, the makefile and part of the parser are provided (compiler_es3_before.zip)
Solutions: Exercise 1, Exercise 2, Exercise 3

Laboratory 4: laboratory_4.pdf
Parsing of a logic program and error handling for the mini C programming language.
Solutions: Exercise 1, Exercise 2

Laboratory 5: laboratory_5.pdf
Simple calculator.
An example regarding synthesized attributes: exClass4b.zip
Solution: Exercise 1

Laboratory 6: laboratory_6.pdf
Realize a translator from mini C to Pseudo Assembler.
Description of the Pseudo Assembler language: interpreter.pdf
Download the interpreter: interpreter.jar
To solve the exercise start from the solution of the second exercise of laboratory 4: Exercise 2
Solution: Exercise 1

Laboratory 7: laboratory_7.pdf
Type checking
Solutions: Exercise 1, Exercise 2
3  Useful Resources
3.1  Flex
3.2  Cup
4  Pseudo Assembler interpreter
5  Exams examples
6  Proposed Theses
Thesis proposals can be downloaded here: https://www.skenz.it/ss/theses
Other information and contacts about theses can be found in these slides: thesis_web.pdf
If interested contact: stefano.scanzio [ AT ] polito.it (tel. 011 090 5438) www: https://www.skenz.it/ss.

