Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320921 - Bug in the generation of the package from a grammar
Summary: Bug in the generation of the package from a grammar
Status: CLOSED DUPLICATE of bug 303415
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 1.0.0   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: SR1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-26 11:23 EDT by Victor Noël CLA
Modified: 2010-08-01 08:16 EDT (History)
1 user (show)

See Also:
sebastian.zarnekow: helios+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***