Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 320921

Summary: Bug in the generation of the package from a grammar
Product: [Modeling] TMF Reporter: Victor Noël <victor.noel.irit>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: major    
Priority: P3 CC: sebastian.zarnekow
Version: 1.0.0Flags: sebastian.zarnekow: helios+
Target Milestone: SR1   
Hardware: All   
OS: All   
Whiteboard:

Description Victor Noël CLA 2010-07-26 11:23:33 EDT
Hi,

I noticed a bug when using such a grammar (using a clean new Xtext project):
Model:
	('y' Parent1) | ('z' Parent2) | Test;

Test:
	l=ID;

Parent1:
	Sub1 | Sub2;

Parent2:
	Sub2 | Sub3;

Sub1:
	'a' x=ID;

Sub2:
	'b' x=ID;

Sub3:
	'c' x=ID;

The problem here is that Parent1 and Parent2 get the x property and for a reason I don't really understand, when the ecore implementation are generated, the package for the language contains duplicate features for Sub2:

  int SUB2__X = PARENT1__X;
  int SUB2__X = PARENT1_FEATURE_COUNT + 0;
Comment 1 Sebastian Zarnekow CLA 2010-08-01 08:16:37 EDT

*** This bug has been marked as a duplicate of bug 303415 ***