Technical Report MSC-2016-12

Title: Lola 0.064 A Programming Language for Augmenting Programming Languages
Authors: Iddo Zmiry
Supervisors: Yossi Gil
PDFCurrently accessibly only within the Technion network
Abstract: Lola, the Language Of Language Augmentation, is the topic of this master of science in computer science thesis. Lola is a modern, language-independent, preprocessor, for language extension. Inspired by the island grammars trend, Lola makes many non-trivial language extensions possible with no more than a handful lines of code.

Lola was used for tasks such as augmenting Java with keywords This (bound to the name of current class) and Super (invoke the overridden method), and positional arguments, for adding a range based for loop construct to C, for AOP like features and even for computing code metrics.

In fact, Lola is expressive enough for users to define their own variant of the C-preprocessor and other preprocessors, including the immediate and delayed semantics of the preprocessor of Unix "make". A user-accessible configuration file defines the tokens of the host language. Lola analyzes the token stream (rather than the raw character stream) with extended regular expressions, and employs "generating expressions" to replace, delete, or otherwise amend pieces of its input.

A language is augmented by appropriate use of "lexies", where each lexi is a semi-declarative module describing a certain code-transformation.

Underlying Lola is a Python engine, and Lola programmers are allowed full access to Python language features. With this model the definition of Lola can be kept short, concentrating in weaving together, as seamlessly as possible, Lola keywords, the stream of tokens of the augmented language, and the Python code the programmer chooses to use.

CopyrightThe above paper is copyright by the Technion, Author(s), or others. Please contact the author(s) for more information

Remark: Any link to this technical report should be to this page (, rather than to the URL of the PDF files directly. The latter URLs may change without notice.

To the list of the MSC technical reports of 2016
To the main CS technical reports page

Computer science department, Technion