|M.Sc Student||Zmiry Iddo|
|Subject||Lola - A Programming Language for Augmenting Programming|
|Department||Department of Computer Science||Supervisor||Professor Joseph Gil|
|Full Thesis text|
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.