Community
Participate
Working Groups
Build Identifier: M20100909-0800 The first grammar in the tutorial has a bug: http://www.eclipse.org/Xtext/documentation/1_0_0/xtext.html Fere is the complete grammar (with the bug): grammar org.eclipse.xtext.example.Domainmodel with org.eclipse.xtext.common.Terminals generate domainmodel "http://www.eclipse.org/xtext/example/Domainmodel" DomainModel : (elements+=Entity)*; Type: DataType | Entity; DataType: 'datatype' name=ID; Entity: 'entity' name=ID ('extends' superType=[Entity])? '{' (features+=Feature)* '}'; Feature: name=ID ':' type=TypeRef; TypeRef: referenced=[Type] (multi?='*')?; This whould be axchanged: DomainModel : (elements+=Entity)*; with this: DomainModel: (elements+=AbstractElement)*; AbstractElement : Entity | DataType; This bug should be fixed soon cause it's very frustrating for new users who want to try out Xtext. Reproducible: Always Steps to Reproduce: Just follow the tutorial and you will see...
There is a more simple solution. Just replace this: DomainModel : (elements+=Entity)*; with this: DomainModel: (elements+=Type)*;
Fixed in HEAD
Closing all bugs that were set to RESOLVED before Neon.0