EOL Syntax Updates

In 0.8.8 we extended the syntax of EOL so that it looks and feels a bit more like Java(script). As the majority of Eclipse/EMF audience are Java programmers, this will hopefully make their (and our) lives a bit easier. Of course, all these changes also affect all languages built on top of EOL.

More specifically, we have introduced:

  • double quotes (" ") for string literals,
  • backticks (` `) for reserved words,
  • Java-like comments (// and /**/),
  • == as a comparison operator,
  • = as an assignment opperator (in 0.8.7)
All these changes (except for the double quotes which have now been replaced by ` `) are non-breaking: the old syntax ('' for strings, = for comparison, := for assignment and -- and -**- for comments still work). Below is an example demonstrating the new syntax:

 This is a multi line comment
// This is a single line comment
var i = 1;
if (i == 1) {
  "Hello World".println();

i = 2; // Assigns the value 2 to i

var `variable with spaces` = 3;
`variable with spaces`.println(); // Prints 3

If you have suggestions for further Java-ifications of the EOL syntax, please post your comments to the Epsilon forum or add them to bug 292403.