Bug 479574 - Content Assist Parser not working as Expected
Summary: Content Assist Parser not working as Expected
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.8.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-12 10:56 EDT by Christian Dietrich CLA
Modified: 2016-12-14 23:04 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Dietrich CLA 2015-10-12 10:56:25 EDT
Considering the following grammar

generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"
import "http://www.eclipse.org/emf/2002/Ecore" as ecore

Model:
	(disabled?='@Disabled')? 'signal' name=Identifier '{'
	(((elements+=Element)*
	(elements2=Element2)?))
	'}';

Element2:
	{Element2}
	'element2' '{'
	(assignments+=Assignment2)*
	'}';

Assignment2:
	'element' numbr=INT '{'
	(def+=Definition)+
	'}';

Definition:
	someRef=SomeRef '='
	(intState=INT) ';';

SomeRef:
	value=Identifier;

Element:
	'element' numbr=INT '{'
	(value=BlaValue? &
	properties+=PropertyAssignment*)
	'}';

BlaValue:
	'bla' '=' expr=BlaLiteral ';';

BlaLiteral:
	value=INT;

PropertyAssignment:
	ref=PropertyReference '=' propertyValue=PropertyAssignmentValue ';';

PropertyReference:
	value=Identifier;

Identifier:
	ID | "xxx";

PropertyAssignmentValue:
	(negativeValue?='-')? value=(PhysicsQuantityLiteral | StringLiteral);

StringLiteral:
	value=STRING;

PhysicsQuantityLiteral:
	LengthLiteral;

LengthLiteral:
	value=INT unit=Metre;

Metre:
	'nm' | 'um' | 'mm' | 'm';


and the following model

signal x {
	
	element 1 {
		propertyReference = "xxxxx";|
	}
}

i dont the the "bla" keyword proposed at the cusor position
Comment 1 Sebastian Zarnekow CLA 2015-10-13 02:52:24 EDT
(In reply to Christian Dietrich from comment #0)
> 
> i dont the the "bla" keyword proposed at the cusor position

Sorry, I didn't get that. What is your expectation and what is the actual result?
Comment 2 Christian Dietrich CLA 2015-10-13 02:54:42 EDT
i expect to get the keyword bla proposed but the only thing i get is the ; keyword
Comment 3 Christian Dietrich CLA 2015-10-13 03:19:06 EDT
p.s:

i get the "bla" keyword proposed if i insert a blank right after the previos semincolon. but the grammar does not require a space here
Comment 4 Sebastian Zarnekow CLA 2015-10-13 03:48:58 EDT
(In reply to Christian Dietrich from comment #3)
> p.s:
> 
> i get the "bla" keyword proposed if i insert a blank right after the previos
> semincolon. but the grammar does not require a space here

Got it.