[xtext] mismatched input '{' expecting '{' [message #500639] |
Fri, 27 November 2009 09:30 |
|
I encounteres this strange error message:
mismatched input '{' expecting '{'
with this text:
page MyPage
location body {
}
Language definition:
grammar it.tomassetti.mdwe.PageDsl with org.eclipse.xtext.common.Terminals
generate pageDsl "http://www.tomassetti.it/mdwe/PageDsl"
Page:
'page' name=ID
(locations+=Location)*;
Block:
'#block' name=ID '{'
(elements+=PageElement)*
'}';
Location:
'location' name=ID '{'
(elements+=PageElement)*
'}';
PageElement:
FormEl|TextEl|StringEl|ImageEl|Block|ListEl|TitleEl;
ListEl:
'#list' value=LimitedValue ' {'
(elements+=PageElement)*
'}';
ClassesDecl:
( '(' names+=ID(','names+=ID)* ')')? ;
FormEl:
'#form' name=ID;
TextEl:
'#text' classes=ClassesDecl value=Value;
TitleEl:
'#title' classes=ClassesDecl value=Value;
LimitedValue returns Value:
(ref=Reference)|(var=ID '=''['query=STRING']');
Value:
name=ID|ref=Reference|('['query=STRING']');
Reference:
'$'|('$.'field=CompositeId)|('@'modelName=ID);
CompositeId:
portions+=ID('.'portions+=ID)*;
StringEl:
'#string' classes=ClassesDecl value=Value;
ImageEl:
'#image' name=ID;
website: http://www.federico-tomassetti.it
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06004 seconds