diff --git a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/util/CheckTestUtil.xtend b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/util/CheckTestUtil.xtend index 9dc87019a4..d97e872b59 100644 --- a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/util/CheckTestUtil.xtend +++ b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/util/CheckTestUtil.xtend @@ -20,7 +20,7 @@ class CheckTestUtil { /* * Gets the first instance of given type in given context object. */ - def T getFirstInstanceOf(EObject context, Class type) { + def T getFirstInstanceOf(EObject context, Class type) { return getInstanceOf(context, type, null, null, 1) } diff --git a/com.avaloq.tools.ddk.check.test.runtime/src/com/avaloq/tools/ddk/check/TestLanguage.xtext b/com.avaloq.tools.ddk.check.test.runtime/src/com/avaloq/tools/ddk/check/TestLanguage.xtext index 0d3c074bab..30eb33eedf 100644 --- a/com.avaloq.tools.ddk.check.test.runtime/src/com/avaloq/tools/ddk/check/TestLanguage.xtext +++ b/com.avaloq.tools.ddk.check.test.runtime/src/com/avaloq/tools/ddk/check/TestLanguage.xtext @@ -3,7 +3,7 @@ grammar com.avaloq.tools.ddk.check.TestLanguage with org.eclipse.xtext.common.Te generate testLanguage "http://www.avaloq.com/tools/ddk/check/TestLanguage" Model: - greetings+=Greeting*; - + greetings+=Greeting*; + Greeting: - 'Hello' name=ID '!'; + 'Hello' name=ID '!'; diff --git a/com.avaloq.tools.ddk.check.test.runtime/src/com/avaloq/tools/ddk/check/generator/TestLanguageGenerator.xtend b/com.avaloq.tools.ddk.check.test.runtime/src/com/avaloq/tools/ddk/check/generator/TestLanguageGenerator.xtend index 99d7b4e6a6..401296aba9 100644 --- a/com.avaloq.tools.ddk.check.test.runtime/src/com/avaloq/tools/ddk/check/generator/TestLanguageGenerator.xtend +++ b/com.avaloq.tools.ddk.check.test.runtime/src/com/avaloq/tools/ddk/check/generator/TestLanguageGenerator.xtend @@ -16,7 +16,7 @@ import org.eclipse.xtext.generator.IFileSystemAccess class TestLanguageGenerator implements IGenerator { - override void doGenerate(Resource resource, IFileSystemAccess fsa) { - //TODO implment me - } + override void doGenerate(Resource resource, IFileSystemAccess fsa) { + //TODO implment me + } } diff --git a/com.avaloq.tools.ddk.check.test.runtime/src/com/avaloq/tools/ddk/check/generator/TestLanguageGeneratorMWE.mwe2 b/com.avaloq.tools.ddk.check.test.runtime/src/com/avaloq/tools/ddk/check/generator/TestLanguageGeneratorMWE.mwe2 index 6bb1e0ab5a..d3ea833576 100644 --- a/com.avaloq.tools.ddk.check.test.runtime/src/com/avaloq/tools/ddk/check/generator/TestLanguageGeneratorMWE.mwe2 +++ b/com.avaloq.tools.ddk.check.test.runtime/src/com/avaloq/tools/ddk/check/generator/TestLanguageGeneratorMWE.mwe2 @@ -8,25 +8,25 @@ var modelPath Workflow { - component = org.eclipse.xtext.mwe.Reader { - // lookup all resources on the classpath - // useJavaClassPath = true - - // or define search scope explicitly - path = modelPath - - // this class will be generated by the xtext generator - register = com.avaloq.tools.ddk.check.TestLanguageStandaloneSetup {} - loadResource = { - slot = "model" - } - } - - component = org.eclipse.xtext.generator.GeneratorComponent { - register = com.avaloq.tools.ddk.check.TestLanguageStandaloneSetup {} - slot = 'model' - outlet = { - path = targetDir - } - } + component = org.eclipse.xtext.mwe.Reader { + // lookup all resources on the classpath + // useJavaClassPath = true + + // or define search scope explicitly + path = modelPath + + // this class will be generated by the xtext generator + register = com.avaloq.tools.ddk.check.TestLanguageStandaloneSetup {} + loadResource = { + slot = "model" + } + } + + component = org.eclipse.xtext.generator.GeneratorComponent { + register = com.avaloq.tools.ddk.check.TestLanguageStandaloneSetup {} + slot = 'model' + outlet = { + path = targetDir + } + } } diff --git a/com.avaloq.tools.ddk.checkcfg.core/src/com/avaloq/tools/ddk/checkcfg/jvmmodel/CheckCfgJvmModelInferrer.xtend b/com.avaloq.tools.ddk.checkcfg.core/src/com/avaloq/tools/ddk/checkcfg/jvmmodel/CheckCfgJvmModelInferrer.xtend index 65c97bf1a3..ec26af0098 100644 --- a/com.avaloq.tools.ddk.checkcfg.core/src/com/avaloq/tools/ddk/checkcfg/jvmmodel/CheckCfgJvmModelInferrer.xtend +++ b/com.avaloq.tools.ddk.checkcfg.core/src/com/avaloq/tools/ddk/checkcfg/jvmmodel/CheckCfgJvmModelInferrer.xtend @@ -33,13 +33,13 @@ class CheckCfgJvmModelInferrer extends AbstractModelInferrer { // Here you explain how your model is mapped to Java elements, by writing the actual translation code. // An example based on the initial hellow world example could look like this: -// acceptor.accept(element.toClass("my.company.greeting.MyGreetings") [ -// for (greeting : element.greetings) { -// members += greeting.toMethod(greeting.name, greeting.newTypeRef(typeof(String))) [ -// it.body [''' -// return "Hello «greeting.name»"; -// '''] -// ] -// } -// ]) +// acceptor.accept(element.toClass("my.company.greeting.MyGreetings") [ +// for (greeting : element.greetings) { +// members += greeting.toMethod(greeting.name, greeting.newTypeRef(typeof(String))) [ +// it.body [''' +// return "Hello «greeting.name»"; +// '''] +// ] +// } +// ]) } diff --git a/com.avaloq.tools.ddk.xtext.expression/src/com/avaloq/tools/ddk/xtext/expression/Expression.xtext b/com.avaloq.tools.ddk.xtext.expression/src/com/avaloq/tools/ddk/xtext/expression/Expression.xtext index e00f04ea47..87ad52828a 100644 --- a/com.avaloq.tools.ddk.xtext.expression/src/com/avaloq/tools/ddk/xtext/expression/Expression.xtext +++ b/com.avaloq.tools.ddk.xtext.expression/src/com/avaloq/tools/ddk/xtext/expression/Expression.xtext @@ -14,7 +14,7 @@ import "http://www.avaloq.com/tools/ddk/xtext/expression/Expression" // to Xtext //expression returns [Expression e]: -// x=letExpression {$e=x;}; +// x=letExpression {$e=x;}; Expression: LetExpression | => CastedExpression | ChainExpression; @@ -34,15 +34,15 @@ LetExpression: //castedExpression returns [Expression e] : // ('(' type ')' castedExpression)=> -// '(' t=type ')' x=chainExpression {$e = factory.createCast(t,x);} -// | x=chainExpression {$e=x;}; +// '(' t=type ')' x=chainExpression {$e = factory.createCast(t,x);} +// | x=chainExpression {$e=x;}; CastedExpression: '(' type=Type ')' target=Expression; //chainExpression returns [Expression e] : -// x=ifExpression {$e=x;} ( '->' right=ifExpression {$e=factory.createChainExpression($e,right);})*; +// x=ifExpression {$e=x;} ( '->' right=ifExpression {$e=factory.createChainExpression($e,right);})*; ChainExpression returns Expression: ChainedExpression ({ChainExpression.first=current} '->' next=ChainedExpression)*; @@ -52,8 +52,8 @@ ChainedExpression returns Expression: IfExpressionKw | IfExpressionTri | SwitchExpression; //ifExpression returns [Expression e] : -// x=switchExpression {$e=x;}('?' thenPart=switchExpression ':' elsePart=switchExpression {$e=factory.createIf($e,thenPart,elsePart);})? -//| 'if' condition=switchExpression 'then' thenPart=switchExpression ('else' elsePart=expression)? {$e=factory.createIf(condition,thenPart,elsePart);}; +// x=switchExpression {$e=x;}('?' thenPart=switchExpression ':' elsePart=switchExpression {$e=factory.createIf($e,thenPart,elsePart);})? +//| 'if' condition=switchExpression 'then' thenPart=switchExpression ('else' elsePart=expression)? {$e=factory.createIf(condition,thenPart,elsePart);}; IfExpressionTri returns Expression: OrExpression ({IfExpression.condition=current} '?' thenPart=ChainedExpression ':' elsePart=ChainedExpression)?; @@ -83,36 +83,36 @@ Case: //orExpression returns [Expression e] : -// x=andExpression {$e=x;} (name='||' r=andExpression {$e = factory.createBooleanOperation(id(name),$e,r);})*; +// x=andExpression {$e=x;} (name='||' r=andExpression {$e = factory.createBooleanOperation(id(name),$e,r);})*; OrExpression returns Expression: AndExpression ({BooleanOperation.left=current} operator='||' right=AndExpression)*; -//andExpression returns [Expression e] : -// x=impliesExpression {$e=x;} (name='&&' r=impliesExpression {$e = factory.createBooleanOperation(id(name),$e,r);})*; +//andExpression returns [Expression e] : +// x=impliesExpression {$e=x;} (name='&&' r=impliesExpression {$e = factory.createBooleanOperation(id(name),$e,r);})*; AndExpression returns Expression: ImpliesExpression ({BooleanOperation.left=current} operator='&&' right=ImpliesExpression)*; //impliesExpression returns [Expression e] : -// x=relationalExpression {$e=x;} (name='implies' r=relationalExpression {$e = factory.createBooleanOperation(id(name),$e,r);})*; +// x=relationalExpression {$e=x;} (name='implies' r=relationalExpression {$e = factory.createBooleanOperation(id(name),$e,r);})*; ImpliesExpression returns Expression: RelationalExpression ({BooleanOperation.left=current} operator='implies' right=RelationalExpression)*; //relationalExpression returns [Expression e] : -// x=additiveExpression {$e=x;} -// (name=('==' | '!=' | '>=' | '<=' | '>' | '<') r=additiveExpression {$e = factory.createBinaryOperation(id(name),$e,r);})*; +// x=additiveExpression {$e=x;} +// (name=('==' | '!=' | '>=' | '<=' | '>' | '<') r=additiveExpression {$e = factory.createBinaryOperation(id(name),$e,r);})*; RelationalExpression returns Expression: AdditiveExpression ({BooleanOperation.left=current} operator=('==' | '!=' | '>=' | '<=' | '>' | '<') right=AdditiveExpression)*; //additiveExpression returns [Expression e] : -// x=multiplicativeExpression {$e=x;} +// x=multiplicativeExpression {$e=x;} // (name=('+'| '-') r=multiplicativeExpression {$e = factory.createBinaryOperation(id(name),$e,r);})*; AdditiveExpression returns Expression: @@ -120,17 +120,17 @@ AdditiveExpression returns Expression: //multiplicativeExpression returns [Expression e]: -// x=unaryExpression {$e=x;} -// (name=('*' | '/') r=unaryExpression {$e = factory.createBinaryOperation(id(name),$e,r);})*; +// x=unaryExpression {$e=x;} +// (name=('*' | '/') r=unaryExpression {$e = factory.createBinaryOperation(id(name),$e,r);})*; MultiplicativeExpression returns Expression: UnaryOrInfixExpression ({OperationCall.params+=current} name=('*' | '/') params+=UnaryOrInfixExpression)*; //unaryExpression returns [Expression e] : -// x=infixExpression {$e=x;} -//| name='!' x=infixExpression {$e = factory.createOperationCall(id(name),x);} -//| name='-' x=infixExpression {$e = factory.createOperationCall(id(name),x);}; +// x=infixExpression {$e=x;} +//| name='!' x=infixExpression {$e = factory.createOperationCall(id(name),x);} +//| name='-' x=infixExpression {$e = factory.createOperationCall(id(name),x);}; UnaryOrInfixExpression returns Expression: UnaryExpression | InfixExpression; @@ -140,7 +140,7 @@ UnaryExpression returns OperationCall: //infixExpression returns [Expression e] : -// x=primaryExpression {$e=x;} ( '.' op=featureCall { if (op!=null) { op.setTarget($e);$e=op;}} )*; +// x=primaryExpression {$e=x;} ( '.' op=featureCall { if (op!=null) { op.setTarget($e);$e=op;}} )*; // having support for fragments could avoid the redundancy at this point InfixExpression returns Expression: @@ -152,7 +152,7 @@ InfixExpression returns Expression: )*; -//primaryExpression returns [Expression e] : +//primaryExpression returns [Expression e] : // c=StringLiteral { $e = factory.createStringLiteral(id(c));} //| x=featureCall {$e=x;} //| x=booleanLiteral {$e=x;} @@ -198,7 +198,7 @@ GlobalVarExpression: //featureCall returns [FeatureCall e] : -// id1=identifier '(' (l=parameterList)? ')' {$e = factory.createOperationCall(id1,l);} +// id1=identifier '(' (l=parameterList)? ')' {$e = factory.createOperationCall(id1,l);} //| t=type {$e=factory.createFeatureCall(t,null);} //| x=collectionExpression {$e=x;}; @@ -212,15 +212,15 @@ OperationCall: name=Identifier '(' (params+=Expression (',' params+=Expression)*)? ')'; //listLiteral returns [Expression e] : -// '{' (l=parameterList)? '}' {$e=factory.createListLiteral(l);}; +// '{' (l=parameterList)? '}' {$e=factory.createListLiteral(l);}; ListLiteral: {ListLiteral} '{' (elements+=Expression (',' elements+=Expression)*)? '}'; //constructorCall returns [Expression e] : -// 'new' t=simpleType -// {$e= factory.createConstructorCallExpression(t);}; +// 'new' t=simpleType +// {$e= factory.createConstructorCallExpression(t);}; ConstructorCallExpression: 'new' type=SimpleType; @@ -248,8 +248,8 @@ CollectionExpression: //type returns [Identifier id] : -// a = collectionType {$id=a;}| -// b = simpleType {$id=b;}; +// a = collectionType {$id=a;}| +// b = simpleType {$id=b;}; Type returns Identifier: CollectionType | SimpleType; @@ -264,8 +264,8 @@ CollectionType returns Identifier: //simpleType returns [Identifier id] : -// x=identifier {$id=x;} -// (d='::' end=identifier {$id.append(id(d)); $id.append(end);})*; +// x=identifier {$id=x;} +// (d='::' end=identifier {$id.append(id(d)); $id.append(end);})*; SimpleType returns Identifier: id+=Identifier ('::' id+=Identifier)*; diff --git a/com.avaloq.tools.ddk.xtext.format.test/resource/com/avaloq/tools/ddk/xtext/format/formatting/FormatFormattingTestExpected.format b/com.avaloq.tools.ddk.xtext.format.test/resource/com/avaloq/tools/ddk/xtext/format/formatting/FormatFormattingTestExpected.format index 1a963a11b1..b354e135cc 100644 --- a/com.avaloq.tools.ddk.xtext.format.test/resource/com/avaloq/tools/ddk/xtext/format/formatting/FormatFormattingTestExpected.format +++ b/com.avaloq.tools.ddk.xtext.format.test/resource/com/avaloq/tools/ddk/xtext/format/formatting/FormatFormattingTestExpected.format @@ -4,41 +4,41 @@ const String SOME_STRING = ""; const int SOME_INT = 2; Greeting { - rule : column 10 before, column 0 after; - "Hello" : linewrap 1 2 3 before; - ["hello", "HELLO", "you"] : increment before, decrement after; - ("Hello" "!") : right.no_space before, left.no_linewrap around; - "Hello" : right_padding 5 after; + rule : column 10 before, column 0 after; + "Hello" : linewrap 1 2 3 before; + ["hello", "HELLO", "you"] : increment before, decrement after; + ("Hello" "!") : right.no_space before, left.no_linewrap around; + "Hello" : right_padding 5 after; } Person { } Person { - "," : no_space before; - group 1 => group 1 : linewrap before; - =firstName(2,2) : linewrap before; - =^left : linewrap before; - group 1 => group 1 { - @ID(1,2) : linewrap before; - =firstName : increment 3 before; - =lastName : decrement 2 before; - "," : no_space before; - } - =age : space " " before; - @ID(3,3) : increment before; + "," : no_space before; + group 1 => group 1 : linewrap before; + =firstName(2,2) : linewrap before; + =^left : linewrap before; + group 1 => group 1 { + @ID(1,2) : linewrap before; + =firstName : increment 3 before; + =lastName : decrement 2 before; + "," : no_space before; + } + =age : space " " before; + @ID(3,3) : increment before; } Days { - rule : linewrap before; - "Monday" : space " " after, offset 2 after; + rule : linewrap before; + "Monday" : space " " after, offset 2 after; } STRING { - rule : no_space around; + rule : no_space around; } * { - ["Keywords"] : no_linewrap before; - [ID, INT] : space " " around; + ["Keywords"] : no_linewrap before; + [ID, INT] : space " " around; } \ No newline at end of file diff --git a/com.avaloq.tools.ddk.xtext.format.test/resource/com/avaloq/tools/ddk/xtext/format/scoping/A.xtext b/com.avaloq.tools.ddk.xtext.format.test/resource/com/avaloq/tools/ddk/xtext/format/scoping/A.xtext index 11de84bc74..3485edbce1 100644 --- a/com.avaloq.tools.ddk.xtext.format.test/resource/com/avaloq/tools/ddk/xtext/format/scoping/A.xtext +++ b/com.avaloq.tools.ddk.xtext.format.test/resource/com/avaloq/tools/ddk/xtext/format/scoping/A.xtext @@ -4,7 +4,7 @@ generate a "http://www.example.org/A" import "http://www.eclipse.org/emf/2002/Ecore" as ecore RuleA: - a=INT ('-' b=STRING | ('-'c=ID ('-'d=INT | '-'e=STRING)))? ';'; + a=INT ('-' b=STRING | ('-'c=ID ('-'d=INT | '-'e=STRING)))? ';'; RuleAA: - a=RuleA ';'; \ No newline at end of file + a=RuleA ';'; \ No newline at end of file diff --git a/com.avaloq.tools.ddk.xtext.format.test/resource/com/avaloq/tools/ddk/xtext/format/scoping/B.xtext b/com.avaloq.tools.ddk.xtext.format.test/resource/com/avaloq/tools/ddk/xtext/format/scoping/B.xtext index 7a532410d9..9cdf44ded0 100644 --- a/com.avaloq.tools.ddk.xtext.format.test/resource/com/avaloq/tools/ddk/xtext/format/scoping/B.xtext +++ b/com.avaloq.tools.ddk.xtext.format.test/resource/com/avaloq/tools/ddk/xtext/format/scoping/B.xtext @@ -4,4 +4,4 @@ generate b "http://www.example.org/B" import "http://www.eclipse.org/emf/2002/Ecore" as ecore RuleB: - a=INT | b=STRING | (c=ID (d=INT | e=STRING)) ';'; \ No newline at end of file + a=INT | b=STRING | (c=ID (d=INT | e=STRING)) ';'; \ No newline at end of file diff --git a/com.avaloq.tools.ddk.xtext.format.test/resource/com/avaloq/tools/ddk/xtext/format/scoping/C.xtext b/com.avaloq.tools.ddk.xtext.format.test/resource/com/avaloq/tools/ddk/xtext/format/scoping/C.xtext index b4e714e5b1..1d0b765621 100644 --- a/com.avaloq.tools.ddk.xtext.format.test/resource/com/avaloq/tools/ddk/xtext/format/scoping/C.xtext +++ b/com.avaloq.tools.ddk.xtext.format.test/resource/com/avaloq/tools/ddk/xtext/format/scoping/C.xtext @@ -4,4 +4,4 @@ generate c "http://www.example.org/C" import "http://www.eclipse.org/emf/2002/Ecore" as ecore RuleC: - a=INT | b=STRING | (c=ID (d=INT | e=STRING)) ';'; \ No newline at end of file + a=INT | b=STRING | (c=ID (d=INT | e=STRING)) ';'; \ No newline at end of file diff --git a/com.avaloq.tools.ddk.xtext.generator/src/com/avaloq/tools/ddk/xtext/generator/BundleVersionStripperFragment.xtend b/com.avaloq.tools.ddk.xtext.generator/src/com/avaloq/tools/ddk/xtext/generator/BundleVersionStripperFragment.xtend index 2a26eb1198..8780b6d8ed 100644 --- a/com.avaloq.tools.ddk.xtext.generator/src/com/avaloq/tools/ddk/xtext/generator/BundleVersionStripperFragment.xtend +++ b/com.avaloq.tools.ddk.xtext.generator/src/com/avaloq/tools/ddk/xtext/generator/BundleVersionStripperFragment.xtend @@ -32,7 +32,7 @@ class BundleVersionStripperFragment extends AbstractXtextGeneratorFragment { } override generate() { - projectConfig.enabledProjects.filter(typeof(IBundleProjectConfig)).map[manifest].filterNull.forEach[stripBundleVersions] + projectConfig.enabledProjects.filter(typeof(IBundleProjectConfig)).map[manifest].filterNull.forEach[stripBundleVersions] } def stripBundleVersions(ManifestAccess manifest) { diff --git a/com.avaloq.tools.ddk.xtext.generator/src/com/avaloq/tools/ddk/xtext/generator/resourceFactory/ResourceFactoryFragment2.xtend b/com.avaloq.tools.ddk.xtext.generator/src/com/avaloq/tools/ddk/xtext/generator/resourceFactory/ResourceFactoryFragment2.xtend index 8b7306a7b0..d1a299e871 100644 --- a/com.avaloq.tools.ddk.xtext.generator/src/com/avaloq/tools/ddk/xtext/generator/resourceFactory/ResourceFactoryFragment2.xtend +++ b/com.avaloq.tools.ddk.xtext.generator/src/com/avaloq/tools/ddk/xtext/generator/resourceFactory/ResourceFactoryFragment2.xtend @@ -41,34 +41,34 @@ class ResourceFactoryFragment2 extends AbstractXtextGeneratorFragment { override generate() { language.runtimeGenSetup.registrations.add(''' - «IResourceFactory» resourceFactory = injector.getInstance(«IResourceFactory».class); - «IResourceServiceProvider» serviceProvider = injector.getInstance(«IResourceServiceProvider».class); + «IResourceFactory» resourceFactory = injector.getInstance(«IResourceFactory».class); + «IResourceServiceProvider» serviceProvider = injector.getInstance(«IResourceServiceProvider».class); - «FOR fileExtension : getFileExtensions» - «Resource».Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("«fileExtension»", resourceFactory); - «IResourceServiceProvider».Registry.INSTANCE.getExtensionToFactoryMap().put("«fileExtension»", serviceProvider); - «ENDFOR» - ''') + «FOR fileExtension : getFileExtensions» + «Resource».Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("«fileExtension»", resourceFactory); + «IResourceServiceProvider».Registry.INSTANCE.getExtensionToFactoryMap().put("«fileExtension»", serviceProvider); + «ENDFOR» + ''') if (projectConfig.eclipsePlugin?.pluginXml !== null) { projectConfig.eclipsePlugin.pluginXml.entries += ''' - - «FOR fileExtension : getFileExtensions» - - - - - - - - - «ENDFOR» - ''' + + «FOR fileExtension : getFileExtensions» + + + + + + + + + «ENDFOR» + ''' } } diff --git a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/formatter/FormatterTestLanguage.xtext b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/formatter/FormatterTestLanguage.xtext index b0d32075e0..1e8483cfd1 100644 --- a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/formatter/FormatterTestLanguage.xtext +++ b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/formatter/FormatterTestLanguage.xtext @@ -3,87 +3,87 @@ grammar com.avaloq.tools.ddk.xtext.formatter.FormatterTestLanguage with org.ecli generate formatterTestLanguage "http://www.avaloq.com/tools/ddk/xtext/formatter/FormatterTestLanguage" Root: - "test" (TestLinewrap | TestIndentation | TestLinewrapMinMax | TestColumn | TestOffset | TestRightPadding); + "test" (TestLinewrap | TestIndentation | TestLinewrapMinMax | TestColumn | TestOffset | TestRightPadding); Line: - (Decl | Assign | Meth | FqnObj | FqnRef | Enumeration | SuppressedHidden "post" | Space | Datatypes) ";"; + (Decl | Assign | Meth | FqnObj | FqnRef | Enumeration | SuppressedHidden "post" | Space | Datatypes) ";"; Decl: - type+=ID name+=ID; + type+=ID name+=ID; Assign: - var=ID op=("=" | "+=") "[" (val+=INT ("," val+=INT)*)? "]"; + var=ID op=("=" | "+=") "[" (val+=INT ("," val+=INT)*)? "]"; Meth: - "void" name=ID "(" (param+=Param ("," param+=Param)*)? ")"; + "void" name=ID "(" (param+=Param ("," param+=Param)*)? ")"; Param: - name+=ID ":" type+=ID; + name+=ID ":" type+=ID; Space: - "space" val=ID; + "space" val=ID; TestLinewrap: - {TestLinewrap} - "linewrap" items+=Line*; + {TestLinewrap} + "linewrap" items+=Line*; TestLinewrapMinMax: - {TestLinewrapMinMax} - "wrapminmax" items+=Line*; + {TestLinewrapMinMax} + "wrapminmax" items+=Line*; TestIndentation: - {TestIndentation} - "indentation" "{" (sub+=TestIndentation | items+=Line)* "}" semi?=";"?; + {TestIndentation} + "indentation" "{" (sub+=TestIndentation | items+=Line)* "}" semi?=";"?; TestColumn: - {TestColumn} - "column" (name=ID)? - ("item" items+=Line)*; + {TestColumn} + "column" (name=ID)? + ("item" items+=Line)*; TestOffset: - {TestOffset} - "offset" - "value" value=ID - "pair" first=ID second=ID; + {TestOffset} + "offset" + "value" value=ID + "pair" first=ID second=ID; TestRightPadding: - "padding" p1=ID p2=ID ";"; + "padding" p1=ID p2=ID ";"; FqnObj: - "fqn" name=FQN; + "fqn" name=FQN; FQN: - ID ("." ID)*; + ID ("." ID)*; FqnRef: - "fqnref" ref=[FqnObj|FQN]; + "fqnref" ref=[FqnObj|FQN]; Enumeration: - "enum" val+=Enum1+ (',' val+=Enum1)*; + "enum" val+=Enum1+ (',' val+=Enum1)*; enum Enum1: - lit1 | lit2 | lit3; + lit1 | lit2 | lit3; SuppressedHidden hidden(): - {SuppressedHidden} "`" (vals+=SuppressedHiddenSub ('%' vals+=SuppressedHiddenSub)*)? "`"; + {SuppressedHidden} "`" (vals+=SuppressedHiddenSub ('%' vals+=SuppressedHiddenSub)*)? "`"; SuppressedHiddenSub: - SuppressedHiddenSubSub | SuppressedHiddenSubID; + SuppressedHiddenSubSub | SuppressedHiddenSubID; SuppressedHiddenSubSub hidden(WS): - '<' idval=ID '>'; + '<' idval=ID '>'; SuppressedHiddenSubID: - idval=ID; + idval=ID; Datatype1: - FQN; + FQN; Datatype2: - FQN; + FQN; Datatype3: - FQN; + FQN; Datatypes: - "datatypes" val1=Datatype1 "kw1" val2=Datatype2 val3=Datatype3 "kw3"; \ No newline at end of file + "datatypes" val1=Datatype1 "kw1" val2=Datatype2 val3=Datatype3 "kw3"; \ No newline at end of file