|
Compilers & Interpreters jacques.menu@unige.ch |
| |
|
|
This site supports the Compilers & Interpreters course lectured by the author at the Faculté des Sciences of the University of Geneva, Switzerland, in its fall 2011 occurrence. This course relies on the implementation of the Lista language, both as a case study for the presentation and as the basis of the project assignment. Lista evolved from Formula, whose implementation is described in French in Compilateurs avec C++. A sample Lista program can be found below. The current Lista implementation (tar.gz) in version 2006-1.11 is available for you to use it, as well as You can also download: as well as various versions of the Doxygen-generated documentation: Don't hesitate, and enjoy! Lista is a very simple language inspired from SML (http://www.smlnj.org//index.html), allowing the user to define and call functions in a very math-like syntax.
Strangely enough, there are Strangely enough, there are NO lists in the language: this is left to the students' project. A typical program showing the power of Lista and call by name/need is:
The implementation of the two Lista compilers and the Pilum virtual machine is done with C++, Flex and Bison. The identifiers's language is French: it would have too much work to translate all that to English! However, the language and the implementation's user interface are multilingual. French and English are supplied, and other languages can be added easily (see the Langue* source files). NeverEnding.rb is a Ruby 1.8.x program roughly equivalent to the Lista sample above. It uses transitive closures, that generalize the traditional so-called thunk approach used to implement call by name/need. More details on Lista and its current implementation can be found in 99BottlesOfBeer.README. |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
© 2010 CUI Uni-GE, webmaster@cui.unige.ch Dernière mise à jour de cette page: vendredi 11 juin 2010 à 21:33 Dernière page du site mise à jour: Accueil.html, vendredi 11 juin 2010 à 21:33 |