Skip to content

Instantly share code, notes, and snippets.

@vorburger
Last active December 21, 2015 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vorburger/6343639 to your computer and use it in GitHub Desktop.
Save vorburger/6343639 to your computer and use it in GitHub Desktop.
Syntactically invalid EFactory example which causes the OutOfMemoryError at org.eclipse.xtext.ui.editor.syntaxcoloring reported on the Xtext Forum
family.City {
families += family.Family Flintstones {
members = [
family.Person Fred {
age = 45
}
]
members += family.Person Fred {
age = 45
}
members += family.Person Wilma {
gender = :female
}
pet = Dino
}
animals += family.Dinosaur Dino {
height = 1374
}
}
package family
import java.lang.String
class Person {
String name
Gender gender
Integer age
refers Person[] friends
refers Person bestFriend
}
class Family {
String name
String address
contains Person[] members
refers Animal pet
}
abstract class Animal {
}
class Dinosaur extends Animal {
String name
int height
}
enum Gender {
female, male
}
class City {
contains Family[] families
contains Animal[] animals
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment