Cannot be resolved [message #1763493] |
Tue, 16 May 2017 13:11  |
Eclipse User |
|
|
|
I have written below grammar. In my example model, I want to refer to join J3 after startPoint1 but it always gives me "cannot be resolved" error.
Grammar below:
grammar org.xtext.project.turn.Turn with org.eclipse.xtext.xbase.Xbase
generate turn "http://www.xtext.org/project/turn/Turn"
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
URNspec:
'URNModel' name=QualifiedName
(ucmspec=UCMspec)?;
URNmodelElement: Dependency | UCMmap | Responsibility;
IntentionalElement:
type=IntentionalElementType name=QualifiedName '{'
longName=STRING
('importance' (importance=ImportanceType | importanceQuantitative=QUALITATIVEVALUE))?
'}';
Dependency: 'dependsOn' dest=[IntentionalElement | QualifiedName] ('{'
'}')?;
enum IntentionalElementType: Softgoal | Goal | Task | Resource | Belief | Indicator;
enum ImportanceType: High | Medium | Low | None;
QUALITATIVEVALUE returns ecore::EInt: ('-'|'+')? INT;
UCMspec:{UCMspec} 'UCM''{'
ucmMaps+=UCMmap*
'}';
UCMmap: 'map' name=QualifiedName '{'
paths+=Path*
'}';
Path: 'start' name = QualifiedName
pathBody = PathBody;
PathBody: PathWithRegularEnd | PathWithReferencedEnd;
PathWithRegularEnd:{PathWithRegularEnd}
('->'pathNodes+=PathNode)* '->'
pathEnd=RegularEnd ;
PathWithReferencedEnd:{PathWithReferencedEnd}
('->'pathNodes+=PathNode )* '->'
referencedEnd=[ReferencedEnd | QualifiedName] ;
RegularEnd: EndPoint ;
EndPoint:
'end' name = QualifiedName ';';
PathNode: Responsibility | OrJoin ;
ReferencedEnd: OrJoin ;
Responsibility: 'X' name = QualifiedName ;
OrJoin: 'join' name = QualifiedName;
..................................................................................................................................................
Simple example model :
URNModel Example
UCM{
map TL {
start startPoint1 -> J3
start startPoint3 -> X check -> join J3 -> end fail;
}
}
I don't understand why it does not recognize J3.
[Updated on: Tue, 16 May 2017 13:22] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.21660 seconds