Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339023 - simple grammar produces an parser that is inable to resolve references
Summary: simple grammar produces an parser that is inable to resolve references
Status: CLOSED INVALID
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 1.0.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-05 19:39 EST by Olaf Bigalk CLA
Modified: 2011-03-06 04:42 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olaf Bigalk CLA 2011-03-05 19:39:44 EST
Build Identifier: 

The following grammar produces a parser that is not able to resolve references to objects of C

A: (a+=B)+
    "cr" c=[C];	
B: "b" name=ID "(" (b+=C)* ")";
C: name=ID;


Reproducible: Always

Steps to Reproduce:
1. Create an Xtext project.
2. Enter the above grammar
3. Generate the model and the editor
4. Open the editor and enter some objects "b b1 (c1 c2 c3) b b2 (c4 c5) cr  "
5. Try to enter a reference to C
Comment 1 Michael Clay CLA 2011-03-06 04:42:02 EST
the following should do the 'trick'  (from http://www.eclipse.org/Xtext/documentation/1_0_1/xtext.html 'Adding a Namespace Concept') pls. reopen if i have missed the point.


A:
	(a+=B)+
	"cr" c=[C|QualifiedName];

B:
	"b" name=ID "(" (b+=C)* ")";

C:
	name=ID;
	

QualifiedName:
	ID ('.' ID)*;