Xtext unordered group [message #1062350] |
Fri, 07 June 2013 11:01 |
junior developer Messages: 354 Registered: January 2013 |
Senior Member |
|
|
Hi all,
I Wrote a grammar but I have a problem with Crossreference.When I write language in the editor.
Screen1: If I define field (lookup or boolean) in the contenttype->(ownedField+=Field (ownedField+=Field)*)?
not cames ct3 in the contenttype parent's ,onlly comes cttype3 (any defined contenttype not comes)
Screen2:if I dont write any field ,comes all defined contenttype in the contenttype's parent.
not:ct3 and cttype3 in the same scope(defined in the CustomList)
CustomList returns CustomList:
'CustomList'
name=QualifiedName
'{'
'guID' '=' guID=STRING
'displayName' '=' displayName=STRING
'type' '=' type=ListType
('description' '=' description=STRING)?
(ownedContentType+=ContentType (ownedContentType+=ContentType)*)?
(ownedView+=View (ownedView+=View)*)?
'}';
ContentType returns ContentType:
'ContentType'
name=QualifiedName
'{'
'guID' '=' guID=STRING
'displayName' '=' displayName=STRING
('description' '=' description=STRING)?
('group' '=' group=STRING)?
[color=red]('parent' '=' parentContentType=[ContentType|QualifiedName])?
(ownedField+=Field (ownedField+=Field)*)?[/color] //I have problem this line
'}';
Field returns Field:
LookUp | BooleanField ;
I try change ordered :
FIRSTLY :screen3 ->I defined Contenttype's parent end of the Field ,comes all contenttypes
changed grammar :
ContentType returns ContentType:
'ContentType'
name=ID
'{'
(('guID' '=' guID=STRING)
('displayName' '=' displayName=STRING )
('description' '=' description=STRING)?
('group' '=' group=STRING)?
(ownedField+=Field (ownedField+=Field)*)?
(('parent' '=' parentContentType=[ContentType|ID])*)?)
'}';
SECOND:screen4 ->if I define parent end of the defined fields,comes all contenttype,
if I defined parent before create field,comes onlly cttype3,
used unorderedgroup ,but I take warning
As a result, alternative(s) 2 were disabled for that input
Semantic predicates were present but were hidden by actions.
ContentType returns ContentType:
'ContentType'
name=ID
'{'
('guID' '=' guID=STRING)
('displayName' '=' displayName=STRING )
('description' '=' description=STRING)?
('group' '=' group=STRING)?
( (('parent' '=' parentContentType=[ContentType|ID])*)? &
(ownedField+=Field (ownedField+=Field)*)? )
'}';
I can't solved please help me.How can I solved this problem in the grammar
-
Attachment: screen1.png
(Size: 43.70KB, Downloaded 132 times) -
Attachment: screen2.png
(Size: 39.00KB, Downloaded 139 times) -
Attachment: screen3.png
(Size: 51.16KB, Downloaded 117 times) -
Attachment: screen4.png
(Size: 44.26KB, Downloaded 128 times)
[Updated on: Fri, 07 June 2013 11:15] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04610 seconds