SLE SS 2013 Assignment 1

Topic

Language processing basics

Description

You can pick one of two major options:

  • Parsing: Learn more about a parsing technology.
  • Translation: Learn more about a translation scenario.

Parsing

Rationale

Remember the lecture on parsing where ANTLR's grammar class was demonstrated by means of tiny examples that would cause ANTLR to complain (or not) upon parser-generation time or parser time. This sort of example-driven investigation can be applied to any parsing technology. Pick one of the following technology options or propose another technology option, if you like, and explain the characteristics of this option by means of TINY examples as it was done for ANTLR. There is no need to be conclusive here; you only need to be able to convey some insights about parsing.

Foundation

https://github.com/slecourse/slecourse/tree/master/sources/grammarClassesForANTLR

Technology/language options

Translation

Rationale

Remember the lecture on language processors where the simple imperative language Pico was implemented in Haskell while also covering different translation scenarios: translation to bytecode and translation to flowcharts. Those demonstrated translation scenarios may be insightfully implemented with other technologies and languages. Also, additional translation scenarios may be worth studying. So re-implement an existing scenario or define and reimplement another translation scenario.

Foundation

https://github.com/slecourse/slecourse/tree/master/sources/pico

Technology/language options

  • JastAdd (see lab; 8 May)
  • ASM (see lab; 8 May)
  • ANTLR (when using tree grammars, not covered in the lecture)
  • Scala (possibly using Kiama, covered by a later lab)
  • Clojure (when finding an argument as to why this may be of interest)
  • Java (when finding an argument as to why this may be of interest)
  • Python (when finding an argument as to why this may be of interest)

General logistics

See the course page for deadlines and conditions on successfully completing the assignments.