diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000000..21c43dd84a --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,105 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +name: Java CI with Maven + +on: + push: + branches: [ "develop" ] + pull_request: + branches: [ "develop" ] + +permissions: + contents: write + pages: write + id-token: write + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + cache: maven + + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven + + - name: Build with Maven + run: mvn -B compile --file pom.xml + + build-update-site: + runs-on: ubuntu-latest + needs: build + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + cache: maven + + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven + + - name: Build update site only + run: mvn -B -Pnu package + + - name: Upload update site artifact + uses: actions/upload-artifact@v4 + with: + name: update-site + path: deploy/NightlyUpdate/target/repository + + + deploy-update-site: + runs-on: ubuntu-latest + needs: build-update-site + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Create artifact download directory + run: mkdir update-site + + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: update-site + path: update-site/ + + - name: Add .nojekyll + run: touch .nojekyll + + - name: Setup Pages + uses: actions/configure-pages@v5 + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: update-site/ + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/deploy/NightlyUpdate/category.xml b/deploy/NightlyUpdate/category.xml index aaea1c2023..6051a932f3 100644 --- a/deploy/NightlyUpdate/category.xml +++ b/deploy/NightlyUpdate/category.xml @@ -1,60 +1,59 @@ - - + + ]> FeatureIDE v3.x - 3.8.0 + 3.11.1 - - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - diff --git a/experimental/de.ovgu.featureide.core.typecheck/.classpath b/experimental/de.ovgu.featureide.core.typecheck/.classpath index 2ed1eb2a29..e7d2b4b940 100644 --- a/experimental/de.ovgu.featureide.core.typecheck/.classpath +++ b/experimental/de.ovgu.featureide.core.typecheck/.classpath @@ -1,6 +1,6 @@ - + diff --git a/experimental/de.ovgu.featureide.core.typecheck/.settings/org.eclipse.jdt.core.prefs b/experimental/de.ovgu.featureide.core.typecheck/.settings/org.eclipse.jdt.core.prefs index 7341ab1683..92dd3c26a8 100644 --- a/experimental/de.ovgu.featureide.core.typecheck/.settings/org.eclipse.jdt.core.prefs +++ b/experimental/de.ovgu.featureide.core.typecheck/.settings/org.eclipse.jdt.core.prefs @@ -1,11 +1,14 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.7 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 diff --git a/experimental/de.ovgu.featureide.core.typecheck/META-INF/MANIFEST.MF b/experimental/de.ovgu.featureide.core.typecheck/META-INF/MANIFEST.MF index 83ecce5eb0..08cfdf7a4d 100644 --- a/experimental/de.ovgu.featureide.core.typecheck/META-INF/MANIFEST.MF +++ b/experimental/de.ovgu.featureide.core.typecheck/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Type Checking Plug-in Bundle-SymbolicName: de.ovgu.featureide.core.typecheck;singleton:=true Bundle-Version: 2.6.0.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.eclipse.core.resources, diff --git a/experimental/de.ovgu.featureide.fm.extended.ui/.classpath b/experimental/de.ovgu.featureide.fm.extended.ui/.classpath index cca544780e..1da000f8d6 100644 --- a/experimental/de.ovgu.featureide.fm.extended.ui/.classpath +++ b/experimental/de.ovgu.featureide.fm.extended.ui/.classpath @@ -1,6 +1,6 @@ - + diff --git a/experimental/de.ovgu.featureide.fm.extended.ui/.settings/org.eclipse.jdt.core.prefs b/experimental/de.ovgu.featureide.fm.extended.ui/.settings/org.eclipse.jdt.core.prefs index b98ad066db..3a79233b13 100644 --- a/experimental/de.ovgu.featureide.fm.extended.ui/.settings/org.eclipse.jdt.core.prefs +++ b/experimental/de.ovgu.featureide.fm.extended.ui/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,10 @@ -#Thu Mar 31 17:38:21 CEST 2011 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 diff --git a/experimental/de.ovgu.featureide.fm.extended.ui/META-INF/MANIFEST.MF b/experimental/de.ovgu.featureide.fm.extended.ui/META-INF/MANIFEST.MF index 178aefd215..fbc175e930 100644 --- a/experimental/de.ovgu.featureide.fm.extended.ui/META-INF/MANIFEST.MF +++ b/experimental/de.ovgu.featureide.fm.extended.ui/META-INF/MANIFEST.MF @@ -11,8 +11,6 @@ Require-Bundle: org.eclipse.ui, de.ovgu.featureide.fm.core, de.ovgu.featureide.fm.ui, org.sat4j.core;bundle-version="2.2.0", - org.sat4j.pb;bundle-version="2.2.0", - org.antlr.runtime;bundle-version="3.2.0", - org.junit4;bundle-version="4.5.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 + org.sat4j.pb;bundle-version="2.2.0" +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy diff --git a/experimental/de.ovgu.featureide.ui.ahead/.gitignore b/experimental/de.ovgu.featureide.ui.ahead/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/experimental/de.ovgu.featureide.ui.ahead/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJConstraintGeneratorHelper.java b/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJConstraintGeneratorHelper.java index 7de8774e4c..81d3db66f4 100644 --- a/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJConstraintGeneratorHelper.java +++ b/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJConstraintGeneratorHelper.java @@ -9,153 +9,144 @@ import org.deltaj.deltaj.New; import org.deltaj.deltaj.Statement; import org.deltaj.deltaj.Type; -import org.deltaj.generator.DeltaJGeneratorExtensions; -import org.deltaj.generator.DeltaJTypeGenerator; import org.deltaj.util.DeltaJNodeModelUtils; import org.eclipse.xtend2.lib.StringConcatenation; import org.eclipse.xtext.xbase.lib.Extension; import org.eclipse.xtext.xbase.lib.Functions.Function1; import org.eclipse.xtext.xbase.lib.IterableExtensions; import org.eclipse.xtext.xbase.lib.ListExtensions; +import org.eclipse.xtext.xbase.lib.XbaseGenerated; @SuppressWarnings("all") public class DeltaJConstraintGeneratorHelper { @Inject private DeltaJNodeModelUtils nodeModelUtils; - + @Inject @Extension private DeltaJTypeGenerator typeGenerator; - + @Inject @Extension private DeltaJGeneratorExtensions _deltaJGeneratorExtensions; - + protected CharSequence _genComment(final Statement statement) { StringConcatenation _builder = new StringConcatenation(); _builder.append("/* "); String _programText = this.nodeModelUtils.getProgramText(statement); - _builder.append(_programText, ""); + _builder.append(_programText); _builder.append(" */"); return _builder; } - + protected CharSequence _genComment(final JavaVerbatim javaVerbatim) { - List _javaVerbatimLines = this._deltaJGeneratorExtensions.javaVerbatimLines(javaVerbatim); - final Function1 _function = new Function1() { - @Override - public String apply(final String line) { - return ("// " + line); - } + final Function1 _function = (String line) -> { + return ("// " + line); }; - List _map = ListExtensions.map(_javaVerbatimLines, _function); - return IterableExtensions.join(_map, "\n"); + return IterableExtensions.join(ListExtensions.map(this._deltaJGeneratorExtensions.javaVerbatimLines(javaVerbatim), _function), "\n"); } - + public CharSequence genComment(final Expression exp) { StringConcatenation _builder = new StringConcatenation(); _builder.append("// "); String _programText = this.nodeModelUtils.getProgramText(exp); - _builder.append(_programText, ""); + _builder.append(_programText); return _builder; } - + public CharSequence genClassConstraint(final String class_, final New new_) { StringConcatenation _builder = new StringConcatenation(); _builder.append("class("); - _builder.append(class_, ""); + _builder.append(class_); _builder.append(") "); CharSequence _genComment = this.genComment(new_); - _builder.append(_genComment, ""); + _builder.append(_genComment); return _builder; } - + public CharSequence genSubtypeConstraint(final Type candidate, final Type expectedType, final Expression exp) { StringConcatenation _builder = new StringConcatenation(); _builder.append("subtype("); CharSequence _compileType = this.typeGenerator.compileType(candidate); - _builder.append(_compileType, ""); + _builder.append(_compileType); _builder.append(", "); CharSequence _compileType_1 = this.typeGenerator.compileType(expectedType); - _builder.append(_compileType_1, ""); + _builder.append(_compileType_1); _builder.append(") "); CharSequence _genComment = this.genComment(exp); - _builder.append(_genComment, ""); + _builder.append(_genComment); return _builder; } - + public CharSequence genPlusConstraint(final Type left, final Type right, final Type plusType, final Expression exp) { StringConcatenation _builder = new StringConcatenation(); _builder.append("plus("); CharSequence _compileType = this.typeGenerator.compileType(left); - _builder.append(_compileType, ""); + _builder.append(_compileType); _builder.append(", "); CharSequence _compileType_1 = this.typeGenerator.compileType(right); - _builder.append(_compileType_1, ""); + _builder.append(_compileType_1); _builder.append(", "); CharSequence _compileType_2 = this.typeGenerator.compileType(plusType); - _builder.append(_compileType_2, ""); + _builder.append(_compileType_2); _builder.append(") "); CharSequence _genComment = this.genComment(exp); - _builder.append(_genComment, ""); + _builder.append(_genComment); return _builder; } - + public CharSequence genCastConstraint(final String castTo, final Type candidate, final Cast cast) { StringConcatenation _builder = new StringConcatenation(); _builder.append("cast("); - _builder.append(castTo, ""); + _builder.append(castTo); _builder.append(", "); CharSequence _compileType = this.typeGenerator.compileType(candidate); - _builder.append(_compileType, ""); + _builder.append(_compileType); _builder.append(") "); CharSequence _genComment = this.genComment(cast); - _builder.append(_genComment, ""); + _builder.append(_genComment); return _builder; } - + public CharSequence genFieldConstraint(final Type containingType, final String fieldName, final Type fieldType, final Expression exp) { StringConcatenation _builder = new StringConcatenation(); _builder.append("field("); CharSequence _compileType = this.typeGenerator.compileType(containingType); - _builder.append(_compileType, ""); + _builder.append(_compileType); _builder.append(", "); - _builder.append(fieldName, ""); + _builder.append(fieldName); _builder.append(", "); CharSequence _compileType_1 = this.typeGenerator.compileType(fieldType); - _builder.append(_compileType_1, ""); + _builder.append(_compileType_1); _builder.append(") "); CharSequence _genComment = this.genComment(exp); - _builder.append(_genComment, ""); + _builder.append(_genComment); return _builder; } - + public CharSequence genMethodConstraint(final Type receiverType, final String methodName, final Type returnType, final List typesForParams, final Expression exp) { StringConcatenation _builder = new StringConcatenation(); _builder.append("method("); CharSequence _compileType = this.typeGenerator.compileType(receiverType); - _builder.append(_compileType, ""); + _builder.append(_compileType); _builder.append(", "); - _builder.append(methodName, ""); + _builder.append(methodName); _builder.append(", ("); - final Function1 _function = new Function1() { - @Override - public CharSequence apply(final Type t) { - return DeltaJConstraintGeneratorHelper.this.typeGenerator.compileType(t); - } + final Function1 _function = (Type t) -> { + return this.typeGenerator.compileType(t); }; - List _map = ListExtensions.map(typesForParams, _function); - String _join = IterableExtensions.join(_map, ", "); - _builder.append(_join, ""); + String _join = IterableExtensions.join(ListExtensions.map(typesForParams, _function), ", "); + _builder.append(_join); _builder.append(") -> "); CharSequence _compileType_1 = this.typeGenerator.compileType(returnType); - _builder.append(_compileType_1, ""); + _builder.append(_compileType_1); _builder.append(") "); CharSequence _genComment = this.genComment(exp); - _builder.append(_genComment, ""); + _builder.append(_genComment); return _builder; } - + + @XbaseGenerated public CharSequence genComment(final Statement javaVerbatim) { if (javaVerbatim instanceof JavaVerbatim) { return _genComment((JavaVerbatim)javaVerbatim); diff --git a/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJConstraintsGenerator.java b/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJConstraintsGenerator.java index f020ede82c..cd9a0d8b3e 100644 --- a/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJConstraintsGenerator.java +++ b/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJConstraintsGenerator.java @@ -10,50 +10,44 @@ import org.deltaj.deltaj.DeltaAction; import org.deltaj.deltaj.DeltaModule; import org.deltaj.deltaj.Method; -import org.deltaj.deltaj.Statement; -import org.deltaj.deltaj.StatementBlock; -import org.deltaj.generator.DeltaJStatementConstraintGenerator; import org.deltaj.typing.DeltaJTypeSystem; import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.TreeIterator; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.xtend2.lib.StringConcatenation; import org.eclipse.xtext.generator.IFileSystemAccess; import org.eclipse.xtext.generator.IGenerator; import org.eclipse.xtext.xbase.lib.IteratorExtensions; +import org.eclipse.xtext.xbase.lib.XbaseGenerated; @SuppressWarnings("all") public class DeltaJConstraintsGenerator implements IGenerator { @Inject private DeltaJTypeSystem typeSystem; - + @Inject private DeltaJStatementConstraintGenerator statementConstraintGenerator; - + @Override public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { - TreeIterator _allContents = resource.getAllContents(); - Iterable _iterable = IteratorExtensions.toIterable(_allContents); - Iterable _filter = Iterables.filter(_iterable, DeltaModule.class); + Iterable _filter = Iterables.filter(IteratorExtensions.toIterable(resource.getAllContents()), DeltaModule.class); for (final DeltaModule delta : _filter) { this.compile(delta, fsa); } } - + public void compile(final DeltaModule delta, final IFileSystemAccess fsa) { String _name = delta.getName(); String _plus = ("constraints/" + _name); String _plus_1 = (_plus + ".deltajconstraints"); - CharSequence _compile = this.compile(delta); - fsa.generateFile(_plus_1, _compile); + fsa.generateFile(_plus_1, this.compile(delta)); } - + public CharSequence compile(final DeltaModule delta) { StringConcatenation _builder = new StringConcatenation(); _builder.append("delta "); String _name = delta.getName(); - _builder.append(_name, ""); + _builder.append(_name); _builder.append(" with {"); _builder.newLineIfNotEmpty(); { @@ -69,25 +63,23 @@ public CharSequence compile(final DeltaModule delta) { _builder.newLine(); return _builder; } - + protected CharSequence _compile(final DeltaAction action) { StringConcatenation _builder = new StringConcatenation(); _builder.append("/* not yet implemented */"); _builder.newLine(); return _builder; } - + protected CharSequence _compile(final ClassAddition action) { StringConcatenation _builder = new StringConcatenation(); _builder.append("adds "); - org.deltaj.deltaj.Class _class_ = action.getClass_(); - String _name = _class_.getName(); - _builder.append(_name, ""); + String _name = action.getClass_().getName(); + _builder.append(_name); _builder.append(" with {"); _builder.newLineIfNotEmpty(); { - org.deltaj.deltaj.Class _class__1 = action.getClass_(); - EList _methods = _class__1.getMethods(); + EList _methods = action.getClass_().getMethods(); for(final Method method : _methods) { _builder.append("\t"); CharSequence _compile = this.compile(method); @@ -99,24 +91,23 @@ protected CharSequence _compile(final ClassAddition action) { _builder.newLine(); return _builder; } - + public CharSequence compile(final Method method) { StringConcatenation _builder = new StringConcatenation(); String _name = method.getName(); - _builder.append(_name, ""); + _builder.append(_name); _builder.append(" with {"); _builder.newLineIfNotEmpty(); _builder.append("\t"); - StatementBlock _body = method.getBody(); - EList _statements = _body.getStatements(); - CharSequence _genConstraints = this.statementConstraintGenerator.genConstraints(this.typeSystem, _statements); + CharSequence _genConstraints = this.statementConstraintGenerator.genConstraints(this.typeSystem, method.getBody().getStatements()); _builder.append(_genConstraints, "\t"); _builder.newLineIfNotEmpty(); _builder.append("}"); _builder.newLine(); return _builder; } - + + @XbaseGenerated public CharSequence compile(final DeltaAction action) { if (action instanceof ClassAddition) { return _compile((ClassAddition)action); diff --git a/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJExpressionConstraintGenerator.java b/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJExpressionConstraintGenerator.java index 74223b7f4c..e8fe144a65 100644 --- a/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJExpressionConstraintGenerator.java +++ b/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJExpressionConstraintGenerator.java @@ -26,26 +26,26 @@ import org.deltaj.deltaj.TypeVariable; import org.deltaj.deltaj.TypedDeclaration; import org.deltaj.deltaj.VariableAccess; -import org.deltaj.generator.DeltaJConstraintGeneratorHelper; import org.deltaj.typing.DeltaJTypeSystem; import org.deltaj.util.DeltaJTypeUtils; import org.eclipse.emf.common.util.EList; import org.eclipse.xtend2.lib.StringConcatenation; +import org.eclipse.xtext.xbase.lib.XbaseGenerated; @SuppressWarnings("all") public class DeltaJExpressionConstraintGenerator { private DeltaJTypeSystem typeSystem; - + private StringConcatenation buffer; - + @Inject private DeltaJConstraintGeneratorHelper constraintGeneratorHelper; - + public void init(final DeltaJTypeSystem ts, final StringConcatenation buf) { this.typeSystem = ts; this.buffer = buf; } - + public StringConcatenation genConstraints(final DeltaJTypeSystem ts, final Expression exp) { StringConcatenation _xblockexpression = null; { @@ -56,7 +56,7 @@ public StringConcatenation genConstraints(final DeltaJTypeSystem ts, final Expre } return _xblockexpression; } - + public Type genConstraintAndGetType(final DeltaJTypeSystem ts, final StringConcatenation buffer, final Expression exp) { Type _xblockexpression = null; { @@ -65,147 +65,125 @@ public Type genConstraintAndGetType(final DeltaJTypeSystem ts, final StringConca } return _xblockexpression; } - + public Type genConstraintAndGetType(final Expression exp) { return this.genConstraintAndGetTypeCase(exp); } - + protected Type _genConstraintAndGetTypeCase(final Expression exp) { return this.typeSystem.getMethodBodyExpressionType(exp); } - + protected Type _genConstraintAndGetTypeCase(final Plus exp) { TypeVariable _xblockexpression = null; { - Expression _left = exp.getLeft(); - Type leftType = this.genConstraintAndGetType(_left); + Type leftType = this.genConstraintAndGetType(exp.getLeft()); this.buffer.newLineIfNotEmpty(); - Expression _right = exp.getRight(); - Type rightType = this.genConstraintAndGetType(_right); + Type rightType = this.genConstraintAndGetType(exp.getRight()); this.buffer.newLineIfNotEmpty(); TypeVariable plusType = this.typeSystem.createTypeVariable(); - CharSequence _genPlusConstraint = this.constraintGeneratorHelper.genPlusConstraint(leftType, rightType, plusType, exp); - this.buffer.append(_genPlusConstraint); + this.buffer.append(this.constraintGeneratorHelper.genPlusConstraint(leftType, rightType, plusType, exp)); _xblockexpression = plusType; } return _xblockexpression; } - + protected Type _genConstraintAndGetTypeCase(final Minus exp) { IntType _xblockexpression = null; { IntType intType = DeltaJTypeUtils.createIntType(); - Expression _left = exp.getLeft(); - Expression _right = exp.getRight(); - this.genConstraintsForSubexpressions(exp, _left, _right, intType); + this.genConstraintsForSubexpressions(exp, exp.getLeft(), exp.getRight(), intType); _xblockexpression = intType; } return _xblockexpression; } - + protected Type _genConstraintAndGetTypeCase(final MultiOrDiv exp) { IntType _xblockexpression = null; { IntType intType = DeltaJTypeUtils.createIntType(); - Expression _left = exp.getLeft(); - Expression _right = exp.getRight(); - this.genConstraintsForSubexpressions(exp, _left, _right, intType); + this.genConstraintsForSubexpressions(exp, exp.getLeft(), exp.getRight(), intType); _xblockexpression = intType; } return _xblockexpression; } - + protected Type _genConstraintAndGetTypeCase(final AndOrExpression exp) { BooleanType _xblockexpression = null; { BooleanType booleanType = DeltaJTypeUtils.createBooleanType(); - Expression _left = exp.getLeft(); - Expression _right = exp.getRight(); - this.genConstraintsForSubexpressions(exp, _left, _right, booleanType); + this.genConstraintsForSubexpressions(exp, exp.getLeft(), exp.getRight(), booleanType); _xblockexpression = booleanType; } return _xblockexpression; } - + protected Type _genConstraintAndGetTypeCase(final Comparison exp) { BooleanType _xblockexpression = null; { BooleanType booleanType = DeltaJTypeUtils.createBooleanType(); - Expression _left = exp.getLeft(); - Expression _right = exp.getRight(); - IntType _createIntType = DeltaJTypeUtils.createIntType(); - this.genConstraintsForSubexpressions(exp, _left, _right, _createIntType); + this.genConstraintsForSubexpressions(exp, exp.getLeft(), exp.getRight(), DeltaJTypeUtils.createIntType()); _xblockexpression = booleanType; } return _xblockexpression; } - + public void genConstraintsForSubexpressions(final Expression main, final Expression left, final Expression right, final Type expectedType) { Type leftType = this.genConstraintAndGetType(left); this.buffer.newLineIfNotEmpty(); - CharSequence _genSubtypeConstraint = this.constraintGeneratorHelper.genSubtypeConstraint(leftType, expectedType, left); - this.buffer.append(_genSubtypeConstraint); + this.buffer.append(this.constraintGeneratorHelper.genSubtypeConstraint(leftType, expectedType, left)); this.buffer.newLineIfNotEmpty(); Type rightType = this.genConstraintAndGetType(right); this.buffer.newLineIfNotEmpty(); - CharSequence _genSubtypeConstraint_1 = this.constraintGeneratorHelper.genSubtypeConstraint(rightType, expectedType, right); - this.buffer.append(_genSubtypeConstraint_1); + this.buffer.append(this.constraintGeneratorHelper.genSubtypeConstraint(rightType, expectedType, right)); this.buffer.newLineIfNotEmpty(); - CharSequence _genComment = this.constraintGeneratorHelper.genComment(main); - this.buffer.append(_genComment); + this.buffer.append(this.constraintGeneratorHelper.genComment(main)); } - + protected Type _genConstraintAndGetTypeCase(final ArithmeticSigned exp) { IntType _xblockexpression = null; { IntType intType = DeltaJTypeUtils.createIntType(); - Expression _expression = exp.getExpression(); - this.genConstraintsForSubexpressions(exp, _expression, intType); + this.genConstraintsForSubexpressions(exp, exp.getExpression(), intType); _xblockexpression = intType; } return _xblockexpression; } - + protected Type _genConstraintAndGetTypeCase(final BooleanNegation exp) { BooleanType _xblockexpression = null; { BooleanType booleanType = DeltaJTypeUtils.createBooleanType(); - Expression _expression = exp.getExpression(); - this.genConstraintsForSubexpressions(exp, _expression, booleanType); + this.genConstraintsForSubexpressions(exp, exp.getExpression(), booleanType); _xblockexpression = booleanType; } return _xblockexpression; } - + public void genConstraintsForSubexpressions(final Expression main, final Expression subExp, final Type expectedType) { Type subExpType = this.genConstraintAndGetType(subExp); this.buffer.newLineIfNotEmpty(); - CharSequence _genSubtypeConstraint = this.constraintGeneratorHelper.genSubtypeConstraint(subExpType, expectedType, subExp); - this.buffer.append(_genSubtypeConstraint); + this.buffer.append(this.constraintGeneratorHelper.genSubtypeConstraint(subExpType, expectedType, subExp)); this.buffer.newLineIfNotEmpty(); - CharSequence _genComment = this.constraintGeneratorHelper.genComment(main); - this.buffer.append(_genComment); + this.buffer.append(this.constraintGeneratorHelper.genComment(main)); } - + protected Type _genConstraintAndGetTypeCase(final New exp) { Type _xblockexpression = null; { - String _class_ = exp.getClass_(); - CharSequence _genClassConstraint = this.constraintGeneratorHelper.genClassConstraint(_class_, exp); - this.buffer.append(_genClassConstraint); + this.buffer.append(this.constraintGeneratorHelper.genClassConstraint(exp.getClass_(), exp)); _xblockexpression = this.typeSystem.getMethodBodyExpressionType(exp); } return _xblockexpression; } - + protected Type _genConstraintAndGetTypeCase(final Cast exp) { Type _xblockexpression = null; { StringConcatenation tempBuffer = this.buffer; StringConcatenation _stringConcatenation = new StringConcatenation(); this.buffer = _stringConcatenation; - Expression _object = exp.getObject(); - Type objectType = this.genConstraintAndGetType(_object); + Type objectType = this.genConstraintAndGetType(exp.getObject()); int _length = this.buffer.length(); boolean _greaterThan = (_length > 0); if (_greaterThan) { @@ -213,49 +191,41 @@ protected Type _genConstraintAndGetTypeCase(final Cast exp) { } tempBuffer.append(this.buffer); this.buffer = tempBuffer; - String _type = exp.getType(); - CharSequence _genCastConstraint = this.constraintGeneratorHelper.genCastConstraint(_type, objectType, exp); - this.buffer.append(_genCastConstraint); + this.buffer.append(this.constraintGeneratorHelper.genCastConstraint(exp.getType(), objectType, exp)); _xblockexpression = this.typeSystem.getMethodBodyExpressionType(exp); } return _xblockexpression; } - + protected Type _genConstraintAndGetTypeCase(final Paren paren) { - Expression _expression = paren.getExpression(); - return this.genConstraintAndGetTypeCase(_expression); + return this.genConstraintAndGetTypeCase(paren.getExpression()); } - + protected Type _genConstraintAndGetTypeCase(final VariableAccess variableAccess) { - TypedDeclaration _variable = variableAccess.getVariable(); - return this.genConstraintAndGetTypeCase(variableAccess, _variable); + return this.genConstraintAndGetTypeCase(variableAccess, variableAccess.getVariable()); } - + protected Type _genConstraintAndGetTypeCase(final VariableAccess variableAccess, final TypedDeclaration declaration) { return declaration.getType(); } - + protected Type _genConstraintAndGetTypeCase(final VariableAccess variableAccess, final Field field) { TypeForDeclaration _xblockexpression = null; { - Type _thisType = this.typeSystem.getThisType(variableAccess); - String _name = field.getName(); - TypeForDeclaration _type = field.getType(); - CharSequence _genFieldConstraint = this.constraintGeneratorHelper.genFieldConstraint(_thisType, _name, _type, variableAccess); - this.buffer.append(_genFieldConstraint); + this.buffer.append( + this.constraintGeneratorHelper.genFieldConstraint(this.typeSystem.getThisType(variableAccess), field.getName(), field.getType(), variableAccess)); _xblockexpression = field.getType(); } return _xblockexpression; } - + protected Type _genConstraintAndGetTypeCase(final Selection sel) { Type _xblockexpression = null; { StringConcatenation tempBuffer = this.buffer; StringConcatenation _stringConcatenation = new StringConcatenation(); this.buffer = _stringConcatenation; - Expression _receiver = sel.getReceiver(); - Type receiverType = this.genConstraintAndGetType(_receiver); + Type receiverType = this.genConstraintAndGetType(sel.getReceiver()); int _length = this.buffer.length(); boolean _greaterThan = (_length > 0); if (_greaterThan) { @@ -263,28 +233,25 @@ protected Type _genConstraintAndGetTypeCase(final Selection sel) { } tempBuffer.append(this.buffer); this.buffer = tempBuffer; - Message _message = sel.getMessage(); - _xblockexpression = this.genConstraintAndGetTypeCase(receiverType, _message, sel); + _xblockexpression = this.genConstraintAndGetTypeCase(receiverType, sel.getMessage(), sel); } return _xblockexpression; } - + protected Type _genConstraintAndGetTypeCase(final Type receiverType, final Message message, final Selection sel) { return null; } - + protected Type _genConstraintAndGetTypeCase(final Type receiverType, final FieldSelection fieldSel, final Selection sel) { TypeVariable _xblockexpression = null; { TypeVariable fieldType = this.typeSystem.createTypeVariable(); - String _field = fieldSel.getField(); - CharSequence _genFieldConstraint = this.constraintGeneratorHelper.genFieldConstraint(receiverType, _field, fieldType, sel); - this.buffer.append(_genFieldConstraint); + this.buffer.append(this.constraintGeneratorHelper.genFieldConstraint(receiverType, fieldSel.getField(), fieldType, sel)); _xblockexpression = fieldType; } return _xblockexpression; } - + protected Type _genConstraintAndGetTypeCase(final Type receiverType, final MethodCall methodCall, final Selection sel) { TypeVariable _xblockexpression = null; { @@ -297,19 +264,17 @@ protected Type _genConstraintAndGetTypeCase(final Type receiverType, final Metho Type typeOfArg = this.genConstraintAndGetType(arg); this.buffer.newLineIfNotEmpty(); typesForParams.add(typeForParam); - CharSequence _genSubtypeConstraint = this.constraintGeneratorHelper.genSubtypeConstraint(typeOfArg, typeForParam, arg); - this.buffer.append(_genSubtypeConstraint); + this.buffer.append(this.constraintGeneratorHelper.genSubtypeConstraint(typeOfArg, typeForParam, arg)); this.buffer.newLineIfNotEmpty(); } } - String _method = methodCall.getMethod(); - CharSequence _genMethodConstraint = this.constraintGeneratorHelper.genMethodConstraint(receiverType, _method, methodReturnType, typesForParams, sel); - this.buffer.append(_genMethodConstraint); + this.buffer.append(this.constraintGeneratorHelper.genMethodConstraint(receiverType, methodCall.getMethod(), methodReturnType, typesForParams, sel)); _xblockexpression = methodReturnType; } return _xblockexpression; } - + + @XbaseGenerated public Type genConstraintAndGetTypeCase(final Expression exp) { if (exp instanceof AndOrExpression) { return _genConstraintAndGetTypeCase((AndOrExpression)exp); @@ -342,7 +307,8 @@ public Type genConstraintAndGetTypeCase(final Expression exp) { Arrays.asList(exp).toString()); } } - + + @XbaseGenerated public Type genConstraintAndGetTypeCase(final VariableAccess variableAccess, final TypedDeclaration field) { if (field instanceof Field) { return _genConstraintAndGetTypeCase(variableAccess, (Field)field); @@ -353,7 +319,8 @@ public Type genConstraintAndGetTypeCase(final VariableAccess variableAccess, fin Arrays.asList(variableAccess, field).toString()); } } - + + @XbaseGenerated public Type genConstraintAndGetTypeCase(final Type receiverType, final Message fieldSel, final Selection sel) { if (fieldSel instanceof FieldSelection) { return _genConstraintAndGetTypeCase(receiverType, (FieldSelection)fieldSel, sel); diff --git a/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJGenerator.java b/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJGenerator.java index 14a97a5ad0..c2a0418c70 100644 --- a/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJGenerator.java +++ b/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJGenerator.java @@ -3,11 +3,11 @@ */ package org.deltaj.generator; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Inject; import java.util.Arrays; import java.util.List; +import java.util.Objects; import org.deltaj.deltaj.AndOrExpression; import org.deltaj.deltaj.ArithmeticSigned; import org.deltaj.deltaj.Assignment; @@ -44,17 +44,10 @@ import org.deltaj.deltaj.StringConstant; import org.deltaj.deltaj.This; import org.deltaj.deltaj.Type; -import org.deltaj.deltaj.TypeForDeclaration; -import org.deltaj.deltaj.TypeForMethod; -import org.deltaj.deltaj.TypedDeclaration; import org.deltaj.deltaj.VariableAccess; import org.deltaj.deltaj.VoidType; -import org.deltaj.generator.DeltaJConstraintsGenerator; -import org.deltaj.generator.DeltaJGeneratorExtensions; import org.deltaj.util.ClassCollection; import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.TreeIterator; -import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.xtend2.lib.StringConcatenation; @@ -65,54 +58,52 @@ import org.eclipse.xtext.xbase.lib.IterableExtensions; import org.eclipse.xtext.xbase.lib.IteratorExtensions; import org.eclipse.xtext.xbase.lib.ListExtensions; +import org.eclipse.xtext.xbase.lib.XbaseGenerated; @SuppressWarnings("all") public class DeltaJGenerator implements IGenerator { @Inject @Extension private DeltaJGeneratorExtensions generatorExtensions; - + @Inject private DeltaJConstraintsGenerator constraintsGenerator; - + @Override public void doGenerate(final Resource resource, final IFileSystemAccess fsa) { - TreeIterator _allContents = resource.getAllContents(); - Iterable _iterable = IteratorExtensions.toIterable(_allContents); - Iterable _filter = Iterables.filter(_iterable, Product.class); + Iterable _filter = Iterables.filter(IteratorExtensions.toIterable(resource.getAllContents()), Product.class); for (final Product product : _filter) { this.compile(product, fsa); } this.constraintsGenerator.doGenerate(resource, fsa); } - + public void compile(final Product product, final IFileSystemAccess fsa) { ClassCollection _classesToGenerate = this.generatorExtensions.classesToGenerate(product); for (final org.deltaj.deltaj.Class clazz : _classesToGenerate) { this.compile(product, clazz, fsa); } } - + public void compile(final Product product, final org.deltaj.deltaj.Class clazz, final IFileSystemAccess fsa) { - String _fileName = this.generatorExtensions.fileName(product, clazz); - CharSequence _compile = this.compile(product, clazz); - fsa.generateFile(_fileName, _compile); + fsa.generateFile(this.generatorExtensions.fileName(product, clazz), + this.compile(product, clazz)); } - + public CharSequence compile(final Product product, final org.deltaj.deltaj.Class clazz) { StringConcatenation _builder = new StringConcatenation(); _builder.append("package "); String _packageName = this.generatorExtensions.packageName(product); - _builder.append(_packageName, ""); + _builder.append(_packageName); _builder.append(";"); _builder.newLineIfNotEmpty(); _builder.newLine(); _builder.append("public class "); String _name = clazz.getName(); - _builder.append(_name, ""); + _builder.append(_name); _builder.append(" "); String _extendsClause = this.extendsClause(clazz); - _builder.append(_extendsClause, ""); + _builder.append(_extendsClause); _builder.append("{"); _builder.newLineIfNotEmpty(); { @@ -139,11 +130,11 @@ public CharSequence compile(final Product product, final org.deltaj.deltaj.Class _builder.newLine(); return _builder; } - + public String extendsClause(final org.deltaj.deltaj.Class clazz) { String _xifexpression = null; String _extends = clazz.getExtends(); - boolean _notEquals = (!Objects.equal(_extends, null)); + boolean _notEquals = (!Objects.equals(_extends, null)); if (_notEquals) { String _extends_1 = clazz.getExtends(); String _plus = ("extends " + _extends_1); @@ -153,57 +144,54 @@ public String extendsClause(final org.deltaj.deltaj.Class clazz) { } return _xifexpression; } - + public CharSequence fieldRep(final Field field) { StringConcatenation _builder = new StringConcatenation(); - TypeForDeclaration _type = field.getType(); - String _typeRep = this.typeRep(_type); - _builder.append(_typeRep, ""); + String _typeRep = this.typeRep(field.getType()); + _builder.append(_typeRep); _builder.append(" "); String _name = field.getName(); - _builder.append(_name, ""); + _builder.append(_name); _builder.append(";"); _builder.newLineIfNotEmpty(); return _builder; } - + protected String _typeRep(final Type voidType) { return ""; } - + protected String _typeRep(final VoidType voidType) { return "void"; } - + protected String _typeRep(final BasicType basic) { return basic.getBasic(); } - + protected String _typeRep(final ClassType clazz) { return clazz.getClassref(); } - + public CharSequence methodRep(final Method method) { StringConcatenation _builder = new StringConcatenation(); _builder.append("public "); - TypeForMethod _returntype = method.getReturntype(); - String _typeRep = this.typeRep(_returntype); - _builder.append(_typeRep, ""); + String _typeRep = this.typeRep(method.getReturntype()); + _builder.append(_typeRep); _builder.append(" "); String _name = method.getName(); - _builder.append(_name, ""); + _builder.append(_name); _builder.append("("); String _parameterList = this.parameterList(method); - _builder.append(_parameterList, ""); + _builder.append(_parameterList); _builder.append(") {"); _builder.newLineIfNotEmpty(); { StatementBlock _body = method.getBody(); - boolean _notEquals = (!Objects.equal(_body, null)); + boolean _notEquals = (!Objects.equals(_body, null)); if (_notEquals) { _builder.append("\t"); - StatementBlock _body_1 = method.getBody(); - CharSequence _bodyRep = this.bodyRep(_body_1); + CharSequence _bodyRep = this.bodyRep(method.getBody()); _builder.append(_bodyRep, "\t"); _builder.newLineIfNotEmpty(); } @@ -213,34 +201,27 @@ public CharSequence methodRep(final Method method) { _builder.newLine(); return _builder; } - + public String parameterList(final Method m) { - EList _params = m.getParams(); - final Function1 _function = new Function1() { - @Override - public String apply(final Parameter p) { - TypeForDeclaration _type = p.getType(); - String _typeRep = DeltaJGenerator.this.typeRep(_type); - String _plus = (_typeRep + " "); - String _name = p.getName(); - return (_plus + _name); - } + final Function1 _function = (Parameter p) -> { + String _typeRep = this.typeRep(p.getType()); + String _plus = (_typeRep + " "); + String _name = p.getName(); + return (_plus + _name); }; - List _map = ListExtensions.map(_params, _function); - return IterableExtensions.join(_map, ", "); + return IterableExtensions.join(ListExtensions.map(m.getParams(), _function), ", "); } - + public CharSequence bodyRep(final StatementBlock body) { StringConcatenation _builder = new StringConcatenation(); { EList _localvariables = body.getLocalvariables(); for(final LocalVariableDeclaration localvars : _localvariables) { - TypeForDeclaration _type = localvars.getType(); - String _typeRep = this.typeRep(_type); - _builder.append(_typeRep, ""); + String _typeRep = this.typeRep(localvars.getType()); + _builder.append(_typeRep); _builder.append(" "); String _name = localvars.getName(); - _builder.append(_name, ""); + _builder.append(_name); _builder.append(";"); _builder.newLineIfNotEmpty(); } @@ -249,80 +230,73 @@ public CharSequence bodyRep(final StatementBlock body) { EList _statements = body.getStatements(); for(final Statement statement : _statements) { CharSequence _compileStatement = this.compileStatement(statement); - _builder.append(_compileStatement, ""); + _builder.append(_compileStatement); _builder.newLineIfNotEmpty(); } } return _builder; } - + protected CharSequence _compileStatement(final ExpressionStatement expressionStatement) { StringConcatenation _builder = new StringConcatenation(); - Expression _expression = expressionStatement.getExpression(); - CharSequence _compileExp = this.compileExp(_expression); - _builder.append(_compileExp, ""); + CharSequence _compileExp = this.compileExp(expressionStatement.getExpression()); + _builder.append(_compileExp); _builder.append(";"); _builder.newLineIfNotEmpty(); return _builder; } - + protected CharSequence _compileStatement(final ReturnStatement returnStmt) { StringConcatenation _builder = new StringConcatenation(); _builder.append("return "); { Expression _expression = returnStmt.getExpression(); - boolean _notEquals = (!Objects.equal(_expression, null)); + boolean _notEquals = (!Objects.equals(_expression, null)); if (_notEquals) { - Expression _expression_1 = returnStmt.getExpression(); - CharSequence _compileExp = this.compileExp(_expression_1); - _builder.append(_compileExp, ""); + CharSequence _compileExp = this.compileExp(returnStmt.getExpression()); + _builder.append(_compileExp); } } _builder.append(";"); _builder.newLineIfNotEmpty(); return _builder; } - + protected CharSequence _compileStatement(final JavaVerbatim javaVerbatim) { return this.generatorExtensions.extractJavaVerbatimCode(javaVerbatim); } - + protected CharSequence _compileStatement(final Assignment assignment) { StringConcatenation _builder = new StringConcatenation(); - Expression _left = assignment.getLeft(); - CharSequence _compileExp = this.compileExp(_left); - _builder.append(_compileExp, ""); + CharSequence _compileExp = this.compileExp(assignment.getLeft()); + _builder.append(_compileExp); _builder.append(" = "); - Expression _right = assignment.getRight(); - CharSequence _compileExp_1 = this.compileExp(_right); - _builder.append(_compileExp_1, ""); + CharSequence _compileExp_1 = this.compileExp(assignment.getRight()); + _builder.append(_compileExp_1); _builder.append(";"); return _builder; } - + protected CharSequence _compileStatement(final IfStatement ifStatement) { StringConcatenation _builder = new StringConcatenation(); _builder.append("if ("); - Expression _expression = ifStatement.getExpression(); - CharSequence _compileExp = this.compileExp(_expression); - _builder.append(_compileExp, ""); + CharSequence _compileExp = this.compileExp(ifStatement.getExpression()); + _builder.append(_compileExp); _builder.append(") {"); _builder.newLineIfNotEmpty(); _builder.append("\t"); - StatementBlock _thenBlock = ifStatement.getThenBlock(); - Object _bodyRep = this.bodyRep(_thenBlock); + Object _bodyRep = this.bodyRep(ifStatement.getThenBlock()); _builder.append(_bodyRep, "\t"); _builder.newLineIfNotEmpty(); _builder.append("}"); { StatementBlock _elseBlock = ifStatement.getElseBlock(); - boolean _notEquals = (!Objects.equal(_elseBlock, null)); + boolean _notEquals = (!Objects.equals(_elseBlock, null)); if (_notEquals) { _builder.append(" else {"); _builder.newLineIfNotEmpty(); _builder.append("\t"); - StatementBlock _elseBlock_1 = ifStatement.getElseBlock(); - Object _bodyRep_1 = this.bodyRep(_elseBlock_1); + Object _bodyRep_1 = this.bodyRep(ifStatement.getElseBlock()); _builder.append(_bodyRep_1, "\t"); _builder.newLineIfNotEmpty(); _builder.append("}"); @@ -331,242 +305,219 @@ protected CharSequence _compileStatement(final IfStatement ifStatement) { _builder.newLineIfNotEmpty(); return _builder; } - + protected CharSequence _compileExp(final Expression expression) { StringConcatenation _builder = new StringConcatenation(); _builder.append("// "); - EClass _eClass = expression.eClass(); - String _name = _eClass.getName(); - _builder.append(_name, ""); + String _name = expression.eClass().getName(); + _builder.append(_name); _builder.append(" generation not yet implemented"); _builder.newLineIfNotEmpty(); return _builder; } - + protected CharSequence _compileExp(final Plus plus) { StringConcatenation _builder = new StringConcatenation(); - Expression _left = plus.getLeft(); - Object _compileExp = this.compileExp(_left); - _builder.append(_compileExp, ""); + Object _compileExp = this.compileExp(plus.getLeft()); + _builder.append(_compileExp); _builder.append(" + "); - Expression _right = plus.getRight(); - Object _compileExp_1 = this.compileExp(_right); - _builder.append(_compileExp_1, ""); + Object _compileExp_1 = this.compileExp(plus.getRight()); + _builder.append(_compileExp_1); return _builder; } - + protected CharSequence _compileExp(final Minus minus) { StringConcatenation _builder = new StringConcatenation(); - Expression _left = minus.getLeft(); - Object _compileExp = this.compileExp(_left); - _builder.append(_compileExp, ""); + Object _compileExp = this.compileExp(minus.getLeft()); + _builder.append(_compileExp); _builder.append(" - "); - Expression _right = minus.getRight(); - Object _compileExp_1 = this.compileExp(_right); - _builder.append(_compileExp_1, ""); + Object _compileExp_1 = this.compileExp(minus.getRight()); + _builder.append(_compileExp_1); return _builder; } - + protected CharSequence _compileExp(final MultiOrDiv exp) { StringConcatenation _builder = new StringConcatenation(); - Expression _left = exp.getLeft(); - Object _compileExp = this.compileExp(_left); - _builder.append(_compileExp, ""); + Object _compileExp = this.compileExp(exp.getLeft()); + _builder.append(_compileExp); _builder.append(" "); String _op = exp.getOp(); - _builder.append(_op, ""); + _builder.append(_op); _builder.append(" "); - Expression _right = exp.getRight(); - Object _compileExp_1 = this.compileExp(_right); - _builder.append(_compileExp_1, ""); + Object _compileExp_1 = this.compileExp(exp.getRight()); + _builder.append(_compileExp_1); return _builder; } - + protected CharSequence _compileExp(final Comparison exp) { StringConcatenation _builder = new StringConcatenation(); - Expression _left = exp.getLeft(); - Object _compileExp = this.compileExp(_left); - _builder.append(_compileExp, ""); + Object _compileExp = this.compileExp(exp.getLeft()); + _builder.append(_compileExp); _builder.append(" "); String _op = exp.getOp(); - _builder.append(_op, ""); + _builder.append(_op); _builder.append(" "); - Expression _right = exp.getRight(); - Object _compileExp_1 = this.compileExp(_right); - _builder.append(_compileExp_1, ""); + Object _compileExp_1 = this.compileExp(exp.getRight()); + _builder.append(_compileExp_1); return _builder; } - + protected CharSequence _compileExp(final AndOrExpression exp) { StringConcatenation _builder = new StringConcatenation(); - Expression _left = exp.getLeft(); - Object _compileExp = this.compileExp(_left); - _builder.append(_compileExp, ""); + Object _compileExp = this.compileExp(exp.getLeft()); + _builder.append(_compileExp); _builder.append(" "); String _op = exp.getOp(); - _builder.append(_op, ""); + _builder.append(_op); _builder.append(" "); - Expression _right = exp.getRight(); - Object _compileExp_1 = this.compileExp(_right); - _builder.append(_compileExp_1, ""); + Object _compileExp_1 = this.compileExp(exp.getRight()); + _builder.append(_compileExp_1); return _builder; } - + protected CharSequence _compileExp(final BooleanNegation exp) { StringConcatenation _builder = new StringConcatenation(); _builder.append("!"); - Expression _expression = exp.getExpression(); - Object _compileExp = this.compileExp(_expression); - _builder.append(_compileExp, ""); + Object _compileExp = this.compileExp(exp.getExpression()); + _builder.append(_compileExp); return _builder; } - + protected CharSequence _compileExp(final ArithmeticSigned exp) { StringConcatenation _builder = new StringConcatenation(); _builder.append("-("); - Expression _expression = exp.getExpression(); - Object _compileExp = this.compileExp(_expression); - _builder.append(_compileExp, ""); + Object _compileExp = this.compileExp(exp.getExpression()); + _builder.append(_compileExp); _builder.append(")"); return _builder; } - + protected CharSequence _compileExp(final This thiz) { StringConcatenation _builder = new StringConcatenation(); _builder.append("this"); return _builder; } - + protected CharSequence _compileExp(final Null nul) { StringConcatenation _builder = new StringConcatenation(); _builder.append("null"); return _builder; } - + protected CharSequence _compileExp(final Original original) { StringConcatenation _builder = new StringConcatenation(); String _method = original.getMethod(); - _builder.append(_method, ""); + _builder.append(_method); _builder.append("("); - EList _args = original.getArgs(); - String _compileArgs = this.compileArgs(_args); - _builder.append(_compileArgs, ""); + String _compileArgs = this.compileArgs(original.getArgs()); + _builder.append(_compileArgs); _builder.append(")"); return _builder; } - + protected CharSequence _compileExp(final IntConstant c) { StringConcatenation _builder = new StringConcatenation(); int _constant = c.getConstant(); - _builder.append(_constant, ""); + _builder.append(_constant); return _builder; } - + protected CharSequence _compileExp(final StringConstant c) { StringConcatenation _builder = new StringConcatenation(); _builder.append("\""); String _constant = c.getConstant(); - _builder.append(_constant, ""); + _builder.append(_constant); _builder.append("\""); return _builder; } - + protected CharSequence _compileExp(final BoolConstant c) { StringConcatenation _builder = new StringConcatenation(); String _constant = c.getConstant(); - _builder.append(_constant, ""); + _builder.append(_constant); return _builder; } - + protected CharSequence _compileExp(final VariableAccess variable) { StringConcatenation _builder = new StringConcatenation(); - TypedDeclaration _variable = variable.getVariable(); - String _name = _variable.getName(); - _builder.append(_name, ""); + String _name = variable.getVariable().getName(); + _builder.append(_name); return _builder; } - + protected CharSequence _compileExp(final New n) { StringConcatenation _builder = new StringConcatenation(); _builder.append("new "); String _class_ = n.getClass_(); - _builder.append(_class_, ""); + _builder.append(_class_); _builder.append("()"); return _builder; } - + protected CharSequence _compileExp(final Cast cast) { StringConcatenation _builder = new StringConcatenation(); _builder.append("("); String _type = cast.getType(); - _builder.append(_type, ""); + _builder.append(_type); _builder.append(") "); - Expression _object = cast.getObject(); - Object _compileExp = this.compileExp(_object); - _builder.append(_compileExp, ""); + Object _compileExp = this.compileExp(cast.getObject()); + _builder.append(_compileExp); return _builder; } - + protected CharSequence _compileExp(final Paren paren) { StringConcatenation _builder = new StringConcatenation(); _builder.append("("); - Expression _expression = paren.getExpression(); - Object _compileExp = this.compileExp(_expression); - _builder.append(_compileExp, ""); + Object _compileExp = this.compileExp(paren.getExpression()); + _builder.append(_compileExp); _builder.append(")"); return _builder; } - + protected CharSequence _compileExp(final Selection sel) { StringConcatenation _builder = new StringConcatenation(); - Expression _receiver = sel.getReceiver(); - Object _compileExp = this.compileExp(_receiver); - _builder.append(_compileExp, ""); + Object _compileExp = this.compileExp(sel.getReceiver()); + _builder.append(_compileExp); _builder.append("."); - Message _message = sel.getMessage(); - CharSequence _compileMessage = this.compileMessage(_message); - _builder.append(_compileMessage, ""); + CharSequence _compileMessage = this.compileMessage(sel.getMessage()); + _builder.append(_compileMessage); return _builder; } - + protected CharSequence _compileMessage(final Message message) { StringConcatenation _builder = new StringConcatenation(); _builder.append(" "); return _builder; } - + protected CharSequence _compileMessage(final FieldSelection field) { StringConcatenation _builder = new StringConcatenation(); String _field = field.getField(); - _builder.append(_field, ""); + _builder.append(_field); return _builder; } - + protected CharSequence _compileMessage(final MethodCall methodCall) { StringConcatenation _builder = new StringConcatenation(); String _method = methodCall.getMethod(); - _builder.append(_method, ""); + _builder.append(_method); _builder.append("("); - EList _args = methodCall.getArgs(); - String _compileArgs = this.compileArgs(_args); - _builder.append(_compileArgs, ""); + String _compileArgs = this.compileArgs(methodCall.getArgs()); + _builder.append(_compileArgs); _builder.append(")"); return _builder; } - + public String compileArgs(final List args) { - final Function1 _function = new Function1() { - @Override - public Object apply(final Expression arg) { - return DeltaJGenerator.this.compileExp(arg); - } + final Function1 _function = (Expression arg) -> { + return this.compileExp(arg); }; - List _map = ListExtensions.map(args, _function); StringConcatenation _builder = new StringConcatenation(); _builder.append(", "); - return IterableExtensions.join(_map, _builder); + return IterableExtensions.join(ListExtensions.map(args, _function), _builder); } - + + @XbaseGenerated public String typeRep(final Type basic) { if (basic instanceof BasicType) { return _typeRep((BasicType)basic); @@ -581,7 +532,8 @@ public String typeRep(final Type basic) { Arrays.asList(basic).toString()); } } - + + @XbaseGenerated public CharSequence compileStatement(final Statement assignment) { if (assignment instanceof Assignment) { return _compileStatement((Assignment)assignment); @@ -598,7 +550,8 @@ public CharSequence compileStatement(final Statement assignment) { Arrays.asList(assignment).toString()); } } - + + @XbaseGenerated public CharSequence compileExp(final Expression c) { if (c instanceof BoolConstant) { return _compileExp((BoolConstant)c); @@ -643,7 +596,8 @@ public CharSequence compileExp(final Expression c) { Arrays.asList(c).toString()); } } - + + @XbaseGenerated public CharSequence compileMessage(final Message field) { if (field instanceof FieldSelection) { return _compileMessage((FieldSelection)field); diff --git a/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJGeneratorExtensions.java b/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJGeneratorExtensions.java index 47046ec409..73277828a8 100644 --- a/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJGeneratorExtensions.java +++ b/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJGeneratorExtensions.java @@ -1,12 +1,10 @@ package org.deltaj.generator; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.util.List; +import java.util.Objects; import org.deltaj.deltaj.JavaVerbatim; import org.deltaj.deltaj.Product; -import org.deltaj.deltaj.ProductLine; -import org.deltaj.generator.DeltaJClassBuilder; import org.deltaj.util.ClassCollection; import org.eclipse.xtend2.lib.StringConcatenation; import org.eclipse.xtext.util.Strings; @@ -16,35 +14,27 @@ public class DeltaJGeneratorExtensions { @Inject private DeltaJClassBuilder classBuilder; - + public String fileName(final Product product, final org.deltaj.deltaj.Class clazz) { - String _packageName = this.packageName(product); - String _folderName = this.folderName(_packageName); + String _folderName = this.folderName(this.packageName(product)); String _plus = (_folderName + "/"); String _name = clazz.getName(); String _plus_1 = (_plus + _name); return (_plus_1 + ".java"); } - + public String packageName(final Product product) { - ProductLine _productLine = product.getProductLine(); - String _name = _productLine.getName(); - String _nameToPackage = this.nameToPackage(_name); - String _name_1 = product.getName(); - String _nameToPackage_1 = this.nameToPackage(_name_1); - return this.concatPackage(_nameToPackage, _nameToPackage_1); + return this.concatPackage(this.nameToPackage(product.getProductLine().getName()), this.nameToPackage(product.getName())); } - + public String qualifiedName(final Product product, final org.deltaj.deltaj.Class clazz) { - String _packageName = this.packageName(product); - String _name = clazz.getName(); - return this.concatPackage(_packageName, _name); + return this.concatPackage(this.packageName(product), clazz.getName()); } - + public String nameToPackage(final String name) { return name.toLowerCase(); } - + public String concatPackage(final String prefix, final String suffix) { String _xifexpression = null; boolean _isNullOrEmpty = StringExtensions.isNullOrEmpty(prefix); @@ -55,10 +45,10 @@ public String concatPackage(final String prefix, final String suffix) { } return _xifexpression; } - + public String folderName(final String javaPackageName) { String _xifexpression = null; - boolean _notEquals = (!Objects.equal(javaPackageName, null)); + boolean _notEquals = (!Objects.equals(javaPackageName, null)); if (_notEquals) { _xifexpression = javaPackageName.replace(".", "/"); } else { @@ -66,27 +56,23 @@ public String folderName(final String javaPackageName) { } return _xifexpression; } - + public DeltaJClassBuilder classBuilder() { return this.classBuilder; } - + public ClassCollection classesToGenerate(final Product product) { return this.classBuilder.classesToGenerate(product); } - + public String extractJavaVerbatimCode(final JavaVerbatim javaVerbatim) { - String _verbatim = javaVerbatim.getVerbatim(); - String _replace = _verbatim.replace("**Java:", ""); - return _replace.replace(":Java**", ""); + return javaVerbatim.getVerbatim().replace("**Java:", "").replace(":Java**", ""); } - + public List javaVerbatimLines(final JavaVerbatim javaVerbatim) { - String _verbatim = javaVerbatim.getVerbatim(); - String _property = System.getProperty("line.separator"); - return Strings.split(_verbatim, _property); + return Strings.split(javaVerbatim.getVerbatim(), System.getProperty("line.separator")); } - + public StringConcatenation addNewLineIfNotEmpty(final StringConcatenation buffer) { StringConcatenation _xblockexpression = null; { diff --git a/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJStatementConstraintGenerator.java b/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJStatementConstraintGenerator.java index ad07f6e170..d697ac129b 100644 --- a/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJStatementConstraintGenerator.java +++ b/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJStatementConstraintGenerator.java @@ -1,44 +1,39 @@ package org.deltaj.generator; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.util.Arrays; import java.util.List; +import java.util.Objects; import org.deltaj.deltaj.Assignment; import org.deltaj.deltaj.BooleanType; import org.deltaj.deltaj.Expression; import org.deltaj.deltaj.ExpressionStatement; import org.deltaj.deltaj.IfStatement; -import org.deltaj.deltaj.Method; import org.deltaj.deltaj.ReturnStatement; import org.deltaj.deltaj.Statement; import org.deltaj.deltaj.StatementBlock; import org.deltaj.deltaj.Type; -import org.deltaj.deltaj.TypeForMethod; -import org.deltaj.generator.DeltaJConstraintGeneratorHelper; -import org.deltaj.generator.DeltaJExpressionConstraintGenerator; -import org.deltaj.generator.DeltaJGeneratorExtensions; import org.deltaj.typing.DeltaJTypeSystem; import org.deltaj.util.DeltaJTypeUtils; import org.deltaj.util.DeltaJUtils; -import org.eclipse.emf.common.util.EList; import org.eclipse.xtend2.lib.StringConcatenation; import org.eclipse.xtext.xbase.lib.Extension; +import org.eclipse.xtext.xbase.lib.XbaseGenerated; @SuppressWarnings("all") public class DeltaJStatementConstraintGenerator { private DeltaJTypeSystem typeSystem; - + @Inject private DeltaJExpressionConstraintGenerator expressionConstraintGenerator; - + @Inject private DeltaJConstraintGeneratorHelper constraintGeneratorHelper; - + @Inject @Extension private DeltaJGeneratorExtensions generatorExtensions; - + public CharSequence genConstraints(final DeltaJTypeSystem ts, final List statements) { CharSequence _xblockexpression = null; { @@ -47,19 +42,19 @@ public CharSequence genConstraints(final DeltaJTypeSystem ts, final List statements) { StringConcatenation _builder = new StringConcatenation(); { for(final Statement statement : statements) { CharSequence _genConstraints = this.genConstraints(this.typeSystem, statement); - _builder.append(_genConstraints, ""); + _builder.append(_genConstraints); _builder.newLineIfNotEmpty(); } } return _builder; } - + public CharSequence genConstraints(final DeltaJTypeSystem ts, final Statement statement) { CharSequence _xblockexpression = null; { @@ -71,9 +66,9 @@ public CharSequence genConstraints(final DeltaJTypeSystem ts, final Statement st boolean _greaterThan = (_length > 0); if (_greaterThan) { StringConcatenation _builder = new StringConcatenation(); - _builder.append(comment, ""); + _builder.append(comment); _builder.newLineIfNotEmpty(); - _builder.append(constraints, ""); + _builder.append(constraints); _xifexpression = _builder; } else { _xifexpression = comment; @@ -82,36 +77,30 @@ public CharSequence genConstraints(final DeltaJTypeSystem ts, final Statement st } return _xblockexpression; } - + protected CharSequence _genConstraintsCase(final Statement statement) { StringConcatenation _builder = new StringConcatenation(); return _builder; } - + protected CharSequence _genConstraintsCase(final ExpressionStatement statement) { StringConcatenation _builder = new StringConcatenation(); - Expression _expression = statement.getExpression(); - StringConcatenation _genConstraints = this.expressionConstraintGenerator.genConstraints(this.typeSystem, _expression); - _builder.append(_genConstraints, ""); + StringConcatenation _genConstraints = this.expressionConstraintGenerator.genConstraints(this.typeSystem, statement.getExpression()); + _builder.append(_genConstraints); return _builder; } - + protected CharSequence _genConstraintsCase(final ReturnStatement statement) { CharSequence _xifexpression = null; Expression _expression = statement.getExpression(); - boolean _notEquals = (!Objects.equal(_expression, null)); + boolean _notEquals = (!Objects.equals(_expression, null)); if (_notEquals) { StringConcatenation _xblockexpression = null; { StringConcatenation buffer = new StringConcatenation(); - Expression _expression_1 = statement.getExpression(); - final Type expType = this.expressionConstraintGenerator.genConstraintAndGetType(this.typeSystem, buffer, _expression_1); + final Type expType = this.expressionConstraintGenerator.genConstraintAndGetType(this.typeSystem, buffer, statement.getExpression()); this.generatorExtensions.addNewLineIfNotEmpty(buffer); - Method _containingMethod = DeltaJUtils.getContainingMethod(statement); - TypeForMethod _returntype = _containingMethod.getReturntype(); - Expression _expression_2 = statement.getExpression(); - CharSequence _genSubtypeConstraint = this.constraintGeneratorHelper.genSubtypeConstraint(expType, _returntype, _expression_2); - buffer.append(_genSubtypeConstraint); + buffer.append(this.constraintGeneratorHelper.genSubtypeConstraint(expType, DeltaJUtils.getContainingMethod(statement).getReturntype(), statement.getExpression())); _xblockexpression = buffer; } _xifexpression = _xblockexpression; @@ -121,68 +110,56 @@ protected CharSequence _genConstraintsCase(final ReturnStatement statement) { } return _xifexpression; } - + protected CharSequence _genConstraintsCase(final Assignment assignment) { StringConcatenation _xblockexpression = null; { StringConcatenation buffer = new StringConcatenation(); this.expressionConstraintGenerator.init(this.typeSystem, buffer); - Expression _left = assignment.getLeft(); - Type leftType = this.expressionConstraintGenerator.genConstraintAndGetType(_left); + Type leftType = this.expressionConstraintGenerator.genConstraintAndGetType(assignment.getLeft()); this.generatorExtensions.addNewLineIfNotEmpty(buffer); - Expression _right = assignment.getRight(); - Type rightType = this.expressionConstraintGenerator.genConstraintAndGetType(_right); + Type rightType = this.expressionConstraintGenerator.genConstraintAndGetType(assignment.getRight()); this.generatorExtensions.addNewLineIfNotEmpty(buffer); - Expression _right_1 = assignment.getRight(); - CharSequence _genSubtypeConstraint = this.constraintGeneratorHelper.genSubtypeConstraint(rightType, leftType, _right_1); - buffer.append(_genSubtypeConstraint); + buffer.append(this.constraintGeneratorHelper.genSubtypeConstraint(rightType, leftType, assignment.getRight())); _xblockexpression = buffer; } return _xblockexpression; } - + protected CharSequence _genConstraintsCase(final IfStatement statement) { StringConcatenation _xblockexpression = null; { StringConcatenation buffer = new StringConcatenation(); - Expression _expression = statement.getExpression(); - Type expressionType = this.expressionConstraintGenerator.genConstraintAndGetType(this.typeSystem, buffer, _expression); + Type expressionType = this.expressionConstraintGenerator.genConstraintAndGetType(this.typeSystem, buffer, statement.getExpression()); BooleanType booleanType = DeltaJTypeUtils.createBooleanType(); this.generatorExtensions.addNewLineIfNotEmpty(buffer); - Expression _expression_1 = statement.getExpression(); - CharSequence _genSubtypeConstraint = this.constraintGeneratorHelper.genSubtypeConstraint(expressionType, booleanType, _expression_1); - buffer.append(_genSubtypeConstraint); + buffer.append(this.constraintGeneratorHelper.genSubtypeConstraint(expressionType, booleanType, statement.getExpression())); this.generatorExtensions.addNewLineIfNotEmpty(buffer); StringConcatenation _builder = new StringConcatenation(); _builder.append("// then branch"); buffer.append(_builder); this.generatorExtensions.addNewLineIfNotEmpty(buffer); - StatementBlock _thenBlock = statement.getThenBlock(); - EList _statements = _thenBlock.getStatements(); - Object _genConstraints = this.genConstraints(_statements); - buffer.append(_genConstraints); + buffer.append(this.genConstraints(statement.getThenBlock().getStatements())); StatementBlock _elseBlock = statement.getElseBlock(); - boolean _notEquals = (!Objects.equal(_elseBlock, null)); + boolean _notEquals = (!Objects.equals(_elseBlock, null)); if (_notEquals) { buffer.newLineIfNotEmpty(); StringConcatenation _builder_1 = new StringConcatenation(); _builder_1.append("// else branch"); buffer.append(_builder_1); this.generatorExtensions.addNewLineIfNotEmpty(buffer); - StatementBlock _elseBlock_1 = statement.getElseBlock(); - EList _statements_1 = _elseBlock_1.getStatements(); - Object _genConstraints_1 = this.genConstraints(_statements_1); - buffer.append(_genConstraints_1); + buffer.append(this.genConstraints(statement.getElseBlock().getStatements())); } _xblockexpression = buffer; } return _xblockexpression; } - + public StringConcatenation genConstraints(final Expression exp) { return this.expressionConstraintGenerator.genConstraints(this.typeSystem, exp); } - + + @XbaseGenerated public CharSequence genConstraintsCase(final Statement assignment) { if (assignment instanceof Assignment) { return _genConstraintsCase((Assignment)assignment); diff --git a/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJTypeGenerator.java b/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJTypeGenerator.java index 697cfca20d..15da7953ad 100644 --- a/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJTypeGenerator.java +++ b/experimental/org.deltaj/xtend-gen/org/deltaj/generator/DeltaJTypeGenerator.java @@ -6,6 +6,7 @@ import org.deltaj.deltaj.Type; import org.deltaj.deltaj.TypeVariable; import org.eclipse.xtend2.lib.StringConcatenation; +import org.eclipse.xtext.xbase.lib.XbaseGenerated; @SuppressWarnings("all") public class DeltaJTypeGenerator { @@ -13,28 +14,29 @@ protected CharSequence _compileType(final Type type) { StringConcatenation _builder = new StringConcatenation(); return _builder; } - + protected CharSequence _compileType(final TypeVariable type) { StringConcatenation _builder = new StringConcatenation(); String _varName = type.getVarName(); - _builder.append(_varName, ""); + _builder.append(_varName); return _builder; } - + protected CharSequence _compileType(final ClassType type) { StringConcatenation _builder = new StringConcatenation(); String _classref = type.getClassref(); - _builder.append(_classref, ""); + _builder.append(_classref); return _builder; } - + protected CharSequence _compileType(final BasicType type) { StringConcatenation _builder = new StringConcatenation(); String _basic = type.getBasic(); - _builder.append(_basic, ""); + _builder.append(_basic); return _builder; } - + + @XbaseGenerated public CharSequence compileType(final Type type) { if (type instanceof BasicType) { return _compileType((BasicType)type); diff --git a/plugins/br.ufal.ic.colligens/.classpath b/plugins/br.ufal.ic.colligens/.classpath index 19502fa46a..a4da0b5073 100644 --- a/plugins/br.ufal.ic.colligens/.classpath +++ b/plugins/br.ufal.ic.colligens/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/br.ufal.ic.colligens/.settings/org.eclipse.jdt.core.prefs b/plugins/br.ufal.ic.colligens/.settings/org.eclipse.jdt.core.prefs index f3943d75bf..aaa1bad0e2 100644 --- a/plugins/br.ufal.ic.colligens/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/br.ufal.ic.colligens/.settings/org.eclipse.jdt.core.prefs @@ -1,9 +1,9 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -11,8 +11,8 @@ org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -26,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -147,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -218,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -363,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/br.ufal.ic.colligens/META-INF/MANIFEST.MF b/plugins/br.ufal.ic.colligens/META-INF/MANIFEST.MF index 4c01c9f42c..06277d96b2 100644 --- a/plugins/br.ufal.ic.colligens/META-INF/MANIFEST.MF +++ b/plugins/br.ufal.ic.colligens/META-INF/MANIFEST.MF @@ -20,7 +20,7 @@ Require-Bundle: org.eclipse.core.runtime, org.eclipse.ltk.ui.refactoring, org.eclipse.ui.workbench.texteditor Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Import-Package: org.eclipse.cdt.core.model, org.eclipse.cdt.internal.core.model, org.eclipse.cdt.ui.text.contentassist diff --git a/plugins/de.ovgu.featureide.Cloneanalysis/.classpath b/plugins/de.ovgu.featureide.Cloneanalysis/.classpath index 9d41b0c50d..4f7288519b 100644 --- a/plugins/de.ovgu.featureide.Cloneanalysis/.classpath +++ b/plugins/de.ovgu.featureide.Cloneanalysis/.classpath @@ -29,6 +29,7 @@ - + + diff --git a/plugins/de.ovgu.featureide.Cloneanalysis/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.Cloneanalysis/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.Cloneanalysis/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.Cloneanalysis/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.Cloneanalysis/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.Cloneanalysis/META-INF/MANIFEST.MF index 53c9a05974..59d8b63917 100644 --- a/plugins/de.ovgu.featureide.Cloneanalysis/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.Cloneanalysis/META-INF/MANIFEST.MF @@ -15,7 +15,7 @@ Require-Bundle: org.eclipse.ui, org.eclipse.text, org.eclipse.ui.ide Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ClassPath: lib/pmd-core-5.2.2.jar, lib/pmd-java-5.2.2.jar, ., diff --git a/plugins/de.ovgu.featureide.core.ahead/.classpath b/plugins/de.ovgu.featureide.core.ahead/.classpath index e50a50e789..2494221477 100644 --- a/plugins/de.ovgu.featureide.core.ahead/.classpath +++ b/plugins/de.ovgu.featureide.core.ahead/.classpath @@ -2,7 +2,7 @@ - + diff --git a/plugins/de.ovgu.featureide.core.ahead/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.core.ahead/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.core.ahead/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.core.ahead/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.core.ahead/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.core.ahead/META-INF/MANIFEST.MF index acff3e398f..61f6b1a15f 100644 --- a/plugins/de.ovgu.featureide.core.ahead/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.core.ahead/META-INF/MANIFEST.MF @@ -12,7 +12,7 @@ Require-Bundle: org.eclipse.core.runtime, de.ovgu.featureide.fm.core, de.ovgu.featureide.fm.ui Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Vendor: University of Magdeburg Bundle-ClassPath: ., lib/jak2java.jar, diff --git a/plugins/de.ovgu.featureide.core.antenna/.classpath b/plugins/de.ovgu.featureide.core.antenna/.classpath index ffd66a440c..1c740e4fbd 100644 --- a/plugins/de.ovgu.featureide.core.antenna/.classpath +++ b/plugins/de.ovgu.featureide.core.antenna/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.core.antenna/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.core.antenna/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.core.antenna/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.core.antenna/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.core.antenna/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.core.antenna/META-INF/MANIFEST.MF index 05ca99a6c7..4113b34e54 100644 --- a/plugins/de.ovgu.featureide.core.antenna/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.core.antenna/META-INF/MANIFEST.MF @@ -11,7 +11,7 @@ Require-Bundle: org.eclipse.core.runtime, Bundle-ActivationPolicy: lazy Bundle-ClassPath: ., lib/antenna.jar -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Vendor: University of Magdeburg Export-Package: antenna.preprocessor, antenna.preprocessor.v3, diff --git a/plugins/de.ovgu.featureide.core.aspectj/.classpath b/plugins/de.ovgu.featureide.core.aspectj/.classpath index eca7bdba8f..375961e4d6 100644 --- a/plugins/de.ovgu.featureide.core.aspectj/.classpath +++ b/plugins/de.ovgu.featureide.core.aspectj/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.core.aspectj/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.core.aspectj/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.core.aspectj/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.core.aspectj/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.core.aspectj/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.core.aspectj/META-INF/MANIFEST.MF index 92eea84dc9..195f407821 100644 --- a/plugins/de.ovgu.featureide.core.aspectj/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.core.aspectj/META-INF/MANIFEST.MF @@ -10,7 +10,7 @@ Require-Bundle: org.eclipse.core.runtime, de.ovgu.featureide.fm.core, org.eclipse.jdt.core Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Vendor: University of Magdeburg Export-Package: de.ovgu.featureide.aspectj Automatic-Module-Name: de.ovgu.featureide.core.aspectj diff --git a/plugins/de.ovgu.featureide.core.conversion.ahead-featurehouse/.classpath b/plugins/de.ovgu.featureide.core.conversion.ahead-featurehouse/.classpath index eca7bdba8f..375961e4d6 100644 --- a/plugins/de.ovgu.featureide.core.conversion.ahead-featurehouse/.classpath +++ b/plugins/de.ovgu.featureide.core.conversion.ahead-featurehouse/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.core.conversion.ahead-featurehouse/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.core.conversion.ahead-featurehouse/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.core.conversion.ahead-featurehouse/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.core.conversion.ahead-featurehouse/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.core.conversion.ahead-featurehouse/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.core.conversion.ahead-featurehouse/META-INF/MANIFEST.MF index 0b44293334..10e7209db5 100644 --- a/plugins/de.ovgu.featureide.core.conversion.ahead-featurehouse/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.core.conversion.ahead-featurehouse/META-INF/MANIFEST.MF @@ -14,7 +14,7 @@ Require-Bundle: org.eclipse.ui, de.ovgu.featureide.fm.ui, de.ovgu.featureide.core.ahead, de.ovgu.featureide.core.featurehouse -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Bundle-Vendor: University of Magdeburg Export-Package: de.ovgu.featureide.core.conversion.ahead_featurehouse, diff --git a/plugins/de.ovgu.featureide.core.featurecpp/.classpath b/plugins/de.ovgu.featureide.core.featurecpp/.classpath index eca7bdba8f..375961e4d6 100644 --- a/plugins/de.ovgu.featureide.core.featurecpp/.classpath +++ b/plugins/de.ovgu.featureide.core.featurecpp/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.core.featurecpp/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.core.featurecpp/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.core.featurecpp/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.core.featurecpp/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.core.featurecpp/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.core.featurecpp/META-INF/MANIFEST.MF index 4b2b13633f..70c92cd90c 100644 --- a/plugins/de.ovgu.featureide.core.featurecpp/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.core.featurecpp/META-INF/MANIFEST.MF @@ -10,7 +10,7 @@ Require-Bundle: org.eclipse.ui, de.ovgu.featureide.fm.core, de.ovgu.featureide.core Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Vendor: University of Magdeburg Export-Package: de.ovgu.featureide.featurecpp, de.ovgu.featureide.featurecpp.model, diff --git a/plugins/de.ovgu.featureide.core.featurehouse/.classpath b/plugins/de.ovgu.featureide.core.featurehouse/.classpath index 980bd7af20..6077ff9d1b 100644 --- a/plugins/de.ovgu.featureide.core.featurehouse/.classpath +++ b/plugins/de.ovgu.featureide.core.featurehouse/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.core.featurehouse/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.core.featurehouse/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.core.featurehouse/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.core.featurehouse/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.core.featurehouse/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.core.featurehouse/META-INF/MANIFEST.MF index e6a3120eef..dbc660faa6 100644 --- a/plugins/de.ovgu.featureide.core.featurehouse/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.core.featurehouse/META-INF/MANIFEST.MF @@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.ui, de.ovgu.featureide.fm.core, org.eclipse.jdt.core Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ClassPath: lib/FeatureHouse.jar, . Bundle-Vendor: University of Magdeburg diff --git a/plugins/de.ovgu.featureide.core.framework/.classpath b/plugins/de.ovgu.featureide.core.framework/.classpath index eca7bdba8f..375961e4d6 100644 --- a/plugins/de.ovgu.featureide.core.framework/.classpath +++ b/plugins/de.ovgu.featureide.core.framework/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.core.framework/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.core.framework/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.core.framework/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.core.framework/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.core.framework/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.core.framework/META-INF/MANIFEST.MF index 97f8e7a716..41ec56d6aa 100644 --- a/plugins/de.ovgu.featureide.core.framework/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.core.framework/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: FeatureIDE Plug-In for Black-Box Frameworks Bundle-SymbolicName: de.ovgu.featureide.core.framework;singleton:=true Bundle-Version: 3.11.1.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: de.ovgu.featureide.core, de.ovgu.featureide.fm.core, org.eclipse.core.runtime, diff --git a/plugins/de.ovgu.featureide.core.images/.classpath b/plugins/de.ovgu.featureide.core.images/.classpath index eca7bdba8f..375961e4d6 100644 --- a/plugins/de.ovgu.featureide.core.images/.classpath +++ b/plugins/de.ovgu.featureide.core.images/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.core.images/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.core.images/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.core.images/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.core.images/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.core.images/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.core.images/META-INF/MANIFEST.MF index 91af825565..1936ad63c9 100644 --- a/plugins/de.ovgu.featureide.core.images/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.core.images/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: FeatureIDE Plug-In for Image Composition Bundle-SymbolicName: de.ovgu.featureide.core.images;singleton:=true Bundle-Version: 3.11.1.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: de.ovgu.featureide.core, de.ovgu.featureide.fm.core, org.eclipse.core.runtime, diff --git a/plugins/de.ovgu.featureide.core.mpl/.classpath b/plugins/de.ovgu.featureide.core.mpl/.classpath index eca7bdba8f..375961e4d6 100644 --- a/plugins/de.ovgu.featureide.core.mpl/.classpath +++ b/plugins/de.ovgu.featureide.core.mpl/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.core.mpl/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.core.mpl/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.core.mpl/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.core.mpl/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.core.mpl/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.core.mpl/META-INF/MANIFEST.MF index 687839ee19..c1de3100a4 100644 --- a/plugins/de.ovgu.featureide.core.mpl/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.core.mpl/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: FeatureIDE Plug-In for Multi Product Lines Bundle-SymbolicName: de.ovgu.featureide.core.mpl;singleton:=true Bundle-Version: 3.11.1.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: de.ovgu.featureide.core, de.ovgu.featureide.fm.core, org.eclipse.core.resources, diff --git a/plugins/de.ovgu.featureide.core.munge.android/.classpath b/plugins/de.ovgu.featureide.core.munge.android/.classpath index eca7bdba8f..375961e4d6 100644 --- a/plugins/de.ovgu.featureide.core.munge.android/.classpath +++ b/plugins/de.ovgu.featureide.core.munge.android/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.core.munge.android/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.core.munge.android/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.core.munge.android/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.core.munge.android/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.core.munge.android/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.core.munge.android/META-INF/MANIFEST.MF index f394efcb04..d2b7655957 100644 --- a/plugins/de.ovgu.featureide.core.munge.android/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.core.munge.android/META-INF/MANIFEST.MF @@ -10,6 +10,6 @@ Require-Bundle: org.eclipse.core.runtime, de.ovgu.featureide.fm.core, de.ovgu.featureide.core.munge Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: de.ovgu.featureide.munge_android Automatic-Module-Name: de.ovgu.featureide.core.munge.android diff --git a/plugins/de.ovgu.featureide.core.munge/.classpath b/plugins/de.ovgu.featureide.core.munge/.classpath index c4a519dc51..a5c86d21aa 100644 --- a/plugins/de.ovgu.featureide.core.munge/.classpath +++ b/plugins/de.ovgu.featureide.core.munge/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.core.munge/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.core.munge/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.core.munge/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.core.munge/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.core.munge/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.core.munge/META-INF/MANIFEST.MF index 1d5cbdb7b7..9e73d1c3ec 100644 --- a/plugins/de.ovgu.featureide.core.munge/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.core.munge/META-INF/MANIFEST.MF @@ -14,7 +14,7 @@ Require-Bundle: org.eclipse.ui, de.ovgu.featureide.fm.ui, org.eclipse.core.expressions Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Vendor: University of Magdeburg Export-Package: de.ovgu.featureide.munge, de.ovgu.featureide.munge.documentation, diff --git a/plugins/de.ovgu.featureide.core.runtime/.classpath b/plugins/de.ovgu.featureide.core.runtime/.classpath index eca7bdba8f..375961e4d6 100644 --- a/plugins/de.ovgu.featureide.core.runtime/.classpath +++ b/plugins/de.ovgu.featureide.core.runtime/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.core.runtime/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.core.runtime/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.core.runtime/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.core.runtime/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.core.runtime/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.core.runtime/META-INF/MANIFEST.MF index e878f19585..67783f6a1f 100644 --- a/plugins/de.ovgu.featureide.core.runtime/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.core.runtime/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: FeatureIDE Plug-In for Runtime Parameters Bundle-SymbolicName: de.ovgu.featureide.core.runtime;singleton:=true Bundle-Version: 3.11.1.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: de.ovgu.featureide.core, de.ovgu.featureide.fm.core, org.eclipse.core.runtime, diff --git a/plugins/de.ovgu.featureide.core/.classpath b/plugins/de.ovgu.featureide.core/.classpath index 70749767b8..a4d4711b92 100644 --- a/plugins/de.ovgu.featureide.core/.classpath +++ b/plugins/de.ovgu.featureide.core/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.core/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.core/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.core/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.core/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.core/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.core/META-INF/MANIFEST.MF index f065850b46..7c0a028e3b 100644 --- a/plugins/de.ovgu.featureide.core/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.core/META-INF/MANIFEST.MF @@ -30,7 +30,7 @@ Export-Package: de.ovgu.featureide.core.signature.java Bundle-ClassPath: lib/tools.jar, . -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Vendor: University of Magdeburg Bundle-ActivationPolicy: lazy Automatic-Module-Name: de.ovgu.featureide.core diff --git a/plugins/de.ovgu.featureide.examples/.classpath b/plugins/de.ovgu.featureide.examples/.classpath index eca7bdba8f..375961e4d6 100644 --- a/plugins/de.ovgu.featureide.examples/.classpath +++ b/plugins/de.ovgu.featureide.examples/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.examples/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.examples/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.examples/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.examples/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.examples/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.examples/META-INF/MANIFEST.MF index b3e2ff69eb..65ad274a77 100644 --- a/plugins/de.ovgu.featureide.examples/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.examples/META-INF/MANIFEST.MF @@ -10,7 +10,7 @@ Require-Bundle: org.eclipse.core.resources, de.ovgu.featureide.fm.ui, de.ovgu.featureide.core, de.ovgu.featureide.fm.core -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Vendor: University of Magdeburg Bundle-ActivationPolicy: lazy Bundle-Activator: de.ovgu.featureide.examples.ExamplePlugin diff --git a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/DrawPanel.class b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/DrawPanel.class index 3af5072c9f..41ab99e0df 100644 Binary files a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/DrawPanel.class and b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/DrawPanel.class differ diff --git a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Entity.class b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Entity.class index 59e24acc55..5a122f4b17 100644 Binary files a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Entity.class and b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Entity.class differ diff --git a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Environment.class b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Environment.class index 6c1d041345..1f5c1d3a3d 100644 Binary files a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Environment.class and b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Environment.class differ diff --git a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Gui.class b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Gui.class index 7a6de7a8d9..829ecb1c7c 100644 Binary files a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Gui.class and b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Gui.class differ diff --git a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/LoadSave.class b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/LoadSave.class index 089b114d4f..2084e95d43 100644 Binary files a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/LoadSave.class and b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/LoadSave.class differ diff --git a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/PowerUp.class b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/PowerUp.class index dd6cd7d79b..41afb9032f 100644 Binary files a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/PowerUp.class and b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/PowerUp.class differ diff --git a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Profile.class b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Profile.class index 417e70167a..8170ad1093 100644 Binary files a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Profile.class and b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Profile.class differ diff --git a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Proj.class b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Proj.class index d21b915f2b..54e657064e 100644 Binary files a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Proj.class and b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Proj.class differ diff --git a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Schuss.class b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Schuss.class index 91de31d2c8..ed237d2b23 100644 Binary files a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Schuss.class and b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Schuss.class differ diff --git a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Snd.class b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Snd.class index d0977f9ce4..f51f71db73 100644 Binary files a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Snd.class and b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/Snd.class differ diff --git a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/TankInfo.class b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/TankInfo.class index 659472beee..d8238321a3 100644 Binary files a/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/TankInfo.class and b/plugins/de.ovgu.featureide.examples/featureide_examples/TankWar-Antenna/bin/TankInfo.class differ diff --git a/plugins/de.ovgu.featureide.fm.attributes/.classpath b/plugins/de.ovgu.featureide.fm.attributes/.classpath index eca7bdba8f..375961e4d6 100644 --- a/plugins/de.ovgu.featureide.fm.attributes/.classpath +++ b/plugins/de.ovgu.featureide.fm.attributes/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.fm.attributes/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.fm.attributes/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.fm.attributes/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.fm.attributes/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.fm.attributes/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.fm.attributes/META-INF/MANIFEST.MF index 806dcdb91c..406dccbfb2 100644 --- a/plugins/de.ovgu.featureide.fm.attributes/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.fm.attributes/META-INF/MANIFEST.MF @@ -12,7 +12,7 @@ Require-Bundle: org.eclipse.ui, de.ovgu.featureide.fm.core, de.ovgu.featureide.fm.ui, de.ovgu.featureide.core -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: de.ovgu.featureide.fm.attributes, de.ovgu.featureide.fm.attributes.base, de.ovgu.featureide.fm.attributes.base.exceptions, diff --git a/plugins/de.ovgu.featureide.fm.core/.classpath b/plugins/de.ovgu.featureide.fm.core/.classpath index 08f8dc8f32..553596da59 100644 --- a/plugins/de.ovgu.featureide.fm.core/.classpath +++ b/plugins/de.ovgu.featureide.fm.core/.classpath @@ -1,13 +1,14 @@ + + - - + diff --git a/plugins/de.ovgu.featureide.fm.core/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.fm.core/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.fm.core/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.fm.core/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.fm.core/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.fm.core/META-INF/MANIFEST.MF index 55dafb1120..5825c832a0 100644 --- a/plugins/de.ovgu.featureide.fm.core/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.fm.core/META-INF/MANIFEST.MF @@ -7,18 +7,18 @@ Require-Bundle: org.eclipse.core.runtime, org.eclipse.core.resources, org.eclipse.swt Bundle-ClassPath: ., - lib/antlr-3.4.jar, lib/org.sat4j.core.jar, lib/org.sat4j.pb.jar, lib/splar.jar, lib/SPLCAT.jar, + lib/antlr4-runtime-4.13.2.jar, + lib/uvl-parser.jar, lib/commons-math-2.2.jar, - lib/uvl-parser.jar -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 + lib/ST-4.3.4.jar +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Activator: de.ovgu.featureide.fm.core.FMCorePlugin Bundle-Vendor: University of Magdeburg -Export-Package: de.vill.model, - de.ovgu.featureide.fm.core, +Export-Package: de.ovgu.featureide.fm.core, de.ovgu.featureide.fm.core.analysis, de.ovgu.featureide.fm.core.analysis.cnf, de.ovgu.featureide.fm.core.analysis.cnf.analysis, @@ -87,22 +87,16 @@ Export-Package: de.vill.model, de.ovgu.featureide.fm.core.job.util, de.ovgu.featureide.fm.core.localization, de.ovgu.featureide.fm.core.preferences, + de.vill.model, no.sintef.ict.splcatool, org.antlr, - org.antlr.analysis, - org.antlr.codegen, - org.antlr.grammar.v3, - org.antlr.gunit, - org.antlr.gunit.swingui, - org.antlr.gunit.swingui.model, - org.antlr.gunit.swingui.parsers, - org.antlr.gunit.swingui.runner, - org.antlr.misc, - org.antlr.runtime, - org.antlr.runtime.debug, - org.antlr.runtime.misc, - org.antlr.runtime.tree, - org.antlr.tool, + org.antlr.v4.runtime, + org.antlr.v4.runtime.atn, + org.antlr.v4.runtime.dfa, + org.antlr.v4.runtime.misc, + org.antlr.v4.runtime.tree, + org.antlr.v4.runtime.tree.pattern, + org.antlr.v4.runtime.tree.xpath, org.prop4j, org.prop4j.explain.solvers, org.prop4j.explain.solvers.impl, @@ -165,3 +159,5 @@ Export-Package: de.vill.model, splar.samples Bundle-ActivationPolicy: lazy Automatic-Module-Name: de.ovgu.featureide.fm.core +Import-Package: de.ovgu.featureide.fm.core.base, + org.antlr.v4.runtime.tree diff --git a/plugins/de.ovgu.featureide.fm.core/Velvet.g b/plugins/de.ovgu.featureide.fm.core/Velvet.g deleted file mode 100644 index 03b7ef15a6..0000000000 --- a/plugins/de.ovgu.featureide.fm.core/Velvet.g +++ /dev/null @@ -1,299 +0,0 @@ -grammar Velvet; - -options { - ASTLabelType = Tree; - output = AST; -} - -tokens { - IMPORT ='import'; - - MANDATORY ='mandatory'; - ABSTRACT ='abstract'; - SOMEOF ='someOf'; - ONEOF ='oneOf'; - CONCEPT ='concept'; - CINTERFACE ='cinterface'; - CONSTRAINT ='constraint'; - FEATURE ='feature'; - USE ='use'; - IMPORTINSTANCE ='instance'; - IMPORTINTERFACE ='interface'; - DESCRIPTION ='description'; - - VAR_INT ='int'; - VAR_FLOAT ='float'; - VAR_STRING ='string'; - VAR_BOOL ='bool'; - - SEMI =';'; - START_C ='{'; - END_C ='}'; - START_R ='('; - END_R =')'; - EQ ='='; - COMMA =','; - COLON =':'; - PLUS ='+'; - MINUS ='-'; - - OP_NOT ='!'; - OP_AND ='&&'; - OP_OR ='||'; - OP_XOR ='xor'; - OP_IMPLIES ='->'; - OP_EQUIVALENT ='<->'; - - ATTR_OP_EQUALS ='=='; - ATTR_OP_NOT_EQUALS ='!='; - ATTR_OP_GREATER ='>'; - ATTR_OP_LESS ='<'; - ATTR_OP_GREATER_EQ ='>='; - ATTR_OP_LESS_EQ ='<='; - - EMPTY; - CONSTR; - ACONSTR; - BASEEXT; - DEF; - GROUP; - ATTR; - UNARYOP; - OPERAND; -} - -@lexer::header {package de.ovgu.featureide.fm.core.io.velvet;} -@header { -package de.ovgu.featureide.fm.core.io.velvet; - -import de.ovgu.featureide.fm.core.FMCorePlugin;} - -@members { -@Override -public void emitErrorMessage(String msg) { - FMCorePlugin.getDefault().logError(new Exception(msg)); -} -@Override -public void reportError(RecognitionException e) { - throw new InternalSyntaxException(e); -} - -public class InternalSyntaxException extends RuntimeException{ - private final RecognitionException e; - public InternalSyntaxException(RecognitionException e){ - this.e = e; - } - - public RecognitionException getException(){ - return e; - } -} -} - -velvetModel - : imp? (concept|cinterface) EOF - ; - -imp - : (IMPORT name SEMI)+ - -> ^(IMPORT name+) - ; - -concept - : CONCEPT ID - (COLON conceptBaseExt)? (instanceImports interfaceImports | interfaceImports instanceImports | interfaceImports | instanceImports)? - definitions? - -> ^(CONCEPT ID conceptBaseExt? instanceImports? interfaceImports? definitions?) - ; - -cinterface : CINTERFACE ID (COLON conceptBaseExt)? definitions - -> ^(CINTERFACE ID conceptBaseExt? definitions) - ; - -conceptBaseExt - : ID (COMMA ID)* - -> ^(BASEEXT ID+) - ; - -instanceImports - : IMPORTINSTANCE ID name (COMMA ID name)* - -> ^(IMPORTINSTANCE (ID name)+) - ; - -interfaceImports - : IMPORTINTERFACE ID name (COMMA ID name)* - -> ^(IMPORTINTERFACE (ID name)+) - ; - -name: ID - | IDPath - ; - -definitions - : START_C definition END_C - -> ^(DEF definition? EMPTY) - ; - -definition - : nonFeatureDefinition* ( - (featureGroup nonFeatureDefinition*) | (feature (feature | nonFeatureDefinition)*) - )? - ; - -nonFeatureDefinition - : constraint - | use - | attribute - | description - ; - -use : USE name SEMI - -> ^(USE name) - ; - -feature - : (MANDATORY ABSTRACT | ABSTRACT MANDATORY | MANDATORY | ABSTRACT)? - FEATURE name (definitions | SEMI) - -> ^(FEATURE name MANDATORY? ABSTRACT? definitions?) - ; - -featureGroup - : groupType START_C feature+ END_C - -> ^(GROUP groupType feature+) - ; - -groupType - : SOMEOF - | ONEOF - ; - -description - : DESCRIPTION STRING SEMI - -> ^(DESCRIPTION STRING) - ; - -constraint - : CONSTRAINT^ (ID EQ!)? (constraintDefinition | attributeConstraint) SEMI! - ; - -constraintDefinition - : constraintOperand (binaryOp constraintOperand)* - -> ^(CONSTR constraintOperand+ binaryOp*) - ; - -constraintOperand : unaryOp* (START_R constraintDefinition END_R | name ) - -> constraintDefinition? ^(UNARYOP unaryOp)* ^(OPERAND name)? - ; - -attribute - : (intAttribute | floatAttribute | stringAttribute | boolAttribute) SEMI - -> ^(ATTR intAttribute? floatAttribute? stringAttribute? boolAttribute?) - ; - -attributeConstraint - : attribConstraint - -> ^(ACONSTR attribConstraint) - ; - -attribConstraint - : attribNumInstance (attribOperator attribNumInstance)* - attribRelation - attribNumInstance (attribOperator attribNumInstance)* - ; - -attribOperator - : PLUS - | MINUS - ; - -attribNumInstance - : INT -// | FLOAT - | name - ; - -intAttribute: VAR_INT! name (EQ! INT)?; -floatAttribute: VAR_FLOAT! name (EQ! FLOAT)?; -stringAttribute: VAR_STRING! name (EQ! STRING)?; -boolAttribute: VAR_BOOL! name (EQ! BOOLEAN)?; - -unaryOp - : OP_NOT - ; - -binaryOp - : OP_AND - | OP_OR - | OP_XOR - | OP_IMPLIES - | OP_EQUIVALENT - ; - -attribRelation - : ATTR_OP_EQUALS -// | ATTR_OP_NOT_EQUALS -// | ATTR_OP_GREATER -// | ATTR_OP_LESS - | ATTR_OP_GREATER_EQ - | ATTR_OP_LESS_EQ - ; - -BOOLEAN : 'true' - | 'false' - ; - -ID : ('a'..'z'|'A'..'Z'|'_'|'-') ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'-')* - ; - -IDPath : ID ('.' ID)+ - ; - -INT : '0'..'9'+ - ; - -FLOAT - : ('0'..'9')+ '.' ('0'..'9')* EXPONENT? - | '.' ('0'..'9')+ EXPONENT? - | ('0'..'9')+ EXPONENT - ; - -STRING - : '"' ( ESC_SEQ | ~('\\'|'"') )* '"' - ; - -fragment -EXPONENT : ('e'|'E') ('+'|'-')? ('0'..'9')+ ; - -fragment -HEX_DIGIT : ('0'..'9'|'a'..'f'|'A'..'F') ; - -fragment -ESC_SEQ - : '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') - | UNICODE_ESC - | OCTAL_ESC - ; - -fragment -OCTAL_ESC - : '\\' ('0'..'3') ('0'..'7') ('0'..'7') - | '\\' ('0'..'7') ('0'..'7') - | '\\' ('0'..'7') - ; - -fragment -UNICODE_ESC - : '\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT - ; - -WS : ( ' ' - | '\t' - | '\r' - | '\n' - ) {$channel=HIDDEN;} - ; - -SL_COMMENT : ('//' ~('\r'|'\n')*) {skip();}; - -ML_COMMENT : ('/*' ~('*/')*) {skip();}; - diff --git a/plugins/de.ovgu.featureide.fm.core/Velvet.g4 b/plugins/de.ovgu.featureide.fm.core/Velvet.g4 new file mode 100644 index 0000000000..bd5ff25d74 --- /dev/null +++ b/plugins/de.ovgu.featureide.fm.core/Velvet.g4 @@ -0,0 +1,259 @@ +grammar Velvet; + +@header { +package de.ovgu.featureide.fm.core.io.velvet; + +import de.ovgu.featureide.fm.core.FMCorePlugin;} + +@members { +public class InternalSyntaxException extends RuntimeException{ + private final RecognitionException e; + public InternalSyntaxException(RecognitionException e){ + this.e = e; + } + + public RecognitionException getException(){ + return e; + } +} +} + +IMPORT :'import'; + +MANDATORY :'mandatory'; +ABSTRACT :'abstract'; +SOMEOF :'someOf'; +ONEOF :'oneOf'; +CONCEPT :'concept'; +CINTERFACE :'cinterface'; +CONSTRAINT :'constraint'; +FEATURE :'feature'; +USE :'use'; +IMPORTINSTANCE :'instance'; +IMPORTINTERFACE :'interface'; +DESCRIPTION :'description'; + +VAR_INT :'int'; +VAR_FLOAT :'float'; +VAR_STRING :'string'; +VAR_BOOL :'bool'; + +SEMI :';'; +START_C :'{'; +END_C :'}'; +START_R :'('; +END_R :')'; +EQ :'='; +COMMA :','; +COLON :':'; +PLUS :'+'; +MINUS :'-'; + +OP_NOT :'!'; +OP_AND :'&&'; +OP_OR :'||'; +OP_XOR :'xor'; +OP_IMPLIES :'->'; +OP_EQUIVALENT :'<->'; + +ATTR_OP_EQUALS :'=='; +ATTR_OP_NOT_EQUALS :'!='; +ATTR_OP_GREATER :'>'; +ATTR_OP_LESS :'<'; +ATTR_OP_GREATER_EQ :'>='; +ATTR_OP_LESS_EQ :'<='; + +EMPTY : 'EMPTY'; +CONSTR : 'CONSTR'; +ACONSTR : 'ACONSTR'; +BASEEXT : 'BASEEXT'; +DEF : 'DEF'; +GROUP : 'GROUP'; +ATTR : 'ATTR'; +UNARYOP : 'UNARYOP'; +OPERAND : 'OPERAND'; + +velvetModel + : imp? (concept|cinterface) EOF + ; + +imp + : (IMPORT name SEMI)+; + +concept + : CONCEPT ID + (COLON conceptBaseExt)? (instanceImports interfaceImports | interfaceImports instanceImports | interfaceImports | instanceImports)? + definitions?; + +cinterface : CINTERFACE ID (COLON conceptBaseExt)? definitions; + +conceptBaseExt + : ID (COMMA ID)*; + +instanceImports + : IMPORTINSTANCE ID name (COMMA ID name)*; + +interfaceImports + : IMPORTINTERFACE ID name (COMMA ID name)*; + +name: ID + | IDPath + ; + +definitions + : START_C definition END_C + ; + +definition + : nonFeatureDefinition* ( + (featureGroup nonFeatureDefinition*) | (feature (feature | nonFeatureDefinition)*) + )? + ; + +nonFeatureDefinition + : constraint + | use + | attribute + | description + ; + +use : USE name SEMI + ; + +feature + : (MANDATORY ABSTRACT | ABSTRACT MANDATORY | MANDATORY | ABSTRACT)? + FEATURE name (definitions | SEMI) + ; + +featureGroup + : groupType START_C feature+ END_C + ; + +groupType + : SOMEOF + | ONEOF + ; + +description + : DESCRIPTION STRING SEMI + ; + +constraint + : CONSTRAINT (ID EQ) (constraintDefinition | attributeConstraint) SEMI + ; + +constraintDefinition + : constraintOperand (binaryOp constraintOperand)* + ; + +constraintOperand : unaryOp* (START_R constraintDefinition END_R | name ) + ; + +attribute + : (intAttribute | floatAttribute | stringAttribute | boolAttribute) SEMI + ; + + +attributeConstraint + : attribNumExpr + attribRelation + attribNumExpr + ; + +attribNumExpr + : attribNumInstance (attribOperator attribNumInstance)* + ; + +attribOperator + : PLUS + | MINUS + ; + +attribNumInstance + : INT +// | FLOAT + | name + ; + +intAttribute: VAR_INT name (EQ INT)?; +floatAttribute: VAR_FLOAT name (EQ FLOAT)?; +stringAttribute: VAR_STRING name (EQ STRING)?; +boolAttribute: VAR_BOOL name (EQ BOOLEAN)?; + +unaryOp + : OP_NOT + ; + +binaryOp + : OP_AND + | OP_OR + | OP_XOR + | OP_IMPLIES + | OP_EQUIVALENT + ; + +attribRelation + : ATTR_OP_EQUALS +// | ATTR_OP_NOT_EQUALS +// | ATTR_OP_GREATER +// | ATTR_OP_LESS + | ATTR_OP_GREATER_EQ + | ATTR_OP_LESS_EQ + ; + +BOOLEAN : 'true' + | 'false' + ; + +ID : ('a'..'z'|'A'..'Z'|'_'|'-') ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'-')* + ; + +IDPath : ID ('.' ID)+ + ; + +INT : '0'..'9'+ + ; + +FLOAT + : ('0'..'9')+ '.' ('0'..'9')* EXPONENT? + | '.' ('0'..'9')+ EXPONENT? + | ('0'..'9')+ EXPONENT + ; + +STRING + : '"' (ESC_SEQ | ~["\\])* '"' + ; + +fragment +EXPONENT : ('e'|'E') ('+'|'-')? ('0'..'9')+ ; + +fragment HEX_DIGIT + : [0-9a-fA-F] + ; + +fragment ESC_SEQ + : '\\' ('b' | 't' | 'n' | 'f' | 'r' | '\\"' | '\'' | '\\') + | UNICODE_ESC + | OCTAL_ESC + ; + +fragment OCTAL_ESC + : '\\' ('0'..'3') ('0'..'7') ('0'..'7')? + | '\\' ('0'..'7') ('0'..'7')? + | '\\' ('0'..'7') + ; + +fragment UNICODE_ESC + : '\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT + ; + +WS : [ \t\r\n]+ -> skip ; + +SL_COMMENT + : '//' ~[\r\n]* -> skip + ; + +ML_COMMENT + : '/*' .*? '*/' -> skip + ; + diff --git a/plugins/de.ovgu.featureide.fm.core/build.properties b/plugins/de.ovgu.featureide.fm.core/build.properties index 60f15f8114..39031d0210 100644 --- a/plugins/de.ovgu.featureide.fm.core/build.properties +++ b/plugins/de.ovgu.featureide.fm.core/build.properties @@ -5,5 +5,7 @@ bin.includes = META-INF/,\ src/,\ schema/,\ lib/,\ - plugin.xml + plugin.xml,\ + lib/antlr4-runtime-4.13.2.jar,\ + lib/ST-4.3.4.jar bin.excludes = lib/cover.exe diff --git a/plugins/de.ovgu.featureide.fm.core/lib/ST-4.3.4.jar b/plugins/de.ovgu.featureide.fm.core/lib/ST-4.3.4.jar new file mode 100644 index 0000000000..21a2f61f88 Binary files /dev/null and b/plugins/de.ovgu.featureide.fm.core/lib/ST-4.3.4.jar differ diff --git a/plugins/de.ovgu.featureide.fm.core/lib/antlr-3.4.jar b/plugins/de.ovgu.featureide.fm.core/lib/antlr-3.4.jar deleted file mode 100644 index bf0ad01280..0000000000 Binary files a/plugins/de.ovgu.featureide.fm.core/lib/antlr-3.4.jar and /dev/null differ diff --git a/plugins/de.ovgu.featureide.fm.core/lib/antlr4-runtime-4.13.2.jar b/plugins/de.ovgu.featureide.fm.core/lib/antlr4-runtime-4.13.2.jar new file mode 100644 index 0000000000..350c1d0f47 Binary files /dev/null and b/plugins/de.ovgu.featureide.fm.core/lib/antlr4-runtime-4.13.2.jar differ diff --git a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/ExtensionManager.java b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/ExtensionManager.java index dab09456e7..3e5ba899b1 100644 --- a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/ExtensionManager.java +++ b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/ExtensionManager.java @@ -47,7 +47,7 @@ public synchronized final void addExtensions(IExtensionLoader extensionLoader } public synchronized boolean addExtension(T extension) { - if (extension != null) { + if ((extension != null) && (extension.getId() != null)) { for (final T t : extensions) { if (t.getId().equals(extension.getId())) { return false; diff --git a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/constraint/FeatureAttributeMap.java b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/constraint/FeatureAttributeMap.java index 9528c30c01..0e3cf08631 100644 --- a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/constraint/FeatureAttributeMap.java +++ b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/constraint/FeatureAttributeMap.java @@ -24,6 +24,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; +import java.util.Set; /** * Maps a {@link FeatureAttribute} to its name and feature. @@ -38,8 +39,12 @@ public FeatureAttributeMap() { attrs = new HashMap<>(); } + public Set getKeys() { + return attrs.keySet(); + } + public FeatureAttributeMap(FeatureAttributeMap oldMap) { - this.attrs = new HashMap<>((int) (1.5 * oldMap.attrs.size())); + attrs = new HashMap<>((int) (1.5 * oldMap.attrs.size())); for (final Entry>> mapEntry : oldMap.attrs.entrySet()) { final Map> value = mapEntry.getValue(); @@ -48,7 +53,7 @@ public FeatureAttributeMap(FeatureAttributeMap oldMap) { final FeatureAttribute v = attributeEntry.getValue(); newFeatureMap.put(attributeEntry.getKey(), new FeatureAttribute<>(v.getAttributeName(), v.getFeatureName(), v.getValue())); } - this.attrs.put(mapEntry.getKey(), newFeatureMap); + attrs.put(mapEntry.getKey(), newFeatureMap); } } diff --git a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/IPersistentFormat.java b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/IPersistentFormat.java index 52d67a01e5..3e27a9ea28 100644 --- a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/IPersistentFormat.java +++ b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/IPersistentFormat.java @@ -23,6 +23,7 @@ import java.nio.file.Path; import de.ovgu.featureide.fm.core.IExtension; +import de.ovgu.featureide.fm.core.base.impl.MultiFeatureModel; /** * Interface for reading and writing data from and to arbitrary objects. @@ -57,6 +58,11 @@ public interface IPersistentFormat extends IExtension { * @see #supportsRead() */ default ProblemList read(T object, CharSequence source, Path path) { + if (object instanceof MultiFeatureModel) { + final MultiFeatureModel extFeatureModel = (MultiFeatureModel) object; + extFeatureModel.setSourceFile(path); + object = (T) extFeatureModel; + } return read(object, source); } diff --git a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/IVelvetFeatureModelFormat.java b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/IVelvetFeatureModelFormat.java new file mode 100644 index 0000000000..19b36b0fa8 --- /dev/null +++ b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/IVelvetFeatureModelFormat.java @@ -0,0 +1,74 @@ +package de.ovgu.featureide.fm.core.io.velvet; + +import java.io.File; +import java.io.IOException; + +import org.eclipse.core.resources.IProject; + +import de.ovgu.featureide.fm.core.base.IFeatureModel; +import de.ovgu.featureide.fm.core.base.impl.MultiFeatureModel; +import de.ovgu.featureide.fm.core.io.ProblemList; + +public interface IVelvetFeatureModelFormat { + + public boolean supportsRead(); + + public boolean supportsWrite(); + + public String write(IFeatureModel object); + + public ProblemList read(IFeatureModel object, CharSequence source); + + public String getSuffix(); + + public String getId(); + + public String getName(); + + public boolean initExtension(); + + public String getExtFeatureModelName(); + + public MultiFeatureModel getExtFeatureModel(); + + /** + * @param text + */ + public void setExtFeatureModelName(String name); + + /** + * @return + */ + public File getFeatureModelFile(); + + /** + * @return + */ + public boolean isVelvetImport(); + + /** + * @return + */ + public boolean getLocalSearch(); + + /** + * @return + */ + public boolean getIsUsedAsAPI(); + + /** + * @return + */ + public String[] getPaths(); + + /** + * @return + * @throws IOException + */ + public IProject getProject(); + + /** + * @param modelName + * @return + */ +} diff --git a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/SimpleVelvetFeatureModelFormat.java b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/SimpleVelvetFeatureModelFormat.java index 1089078e9b..fd5524cb1e 100644 --- a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/SimpleVelvetFeatureModelFormat.java +++ b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/SimpleVelvetFeatureModelFormat.java @@ -1,5 +1,8 @@ /* FeatureIDE - A Framework for Feature-Oriented Software Development * Copyright (C) 2005-2019 FeatureIDE team, University of Magdeburg, Germany + * 2025 Malte Grave, VaSiCS, LIT CPS Lab, Johannes Kepler University, Linz + * 2025 Oleksandr Kudriavchenko, VaSiCS, LIT CPS Lab, Johannes Kepler University, Linz + * * This file is part of FeatureIDE. * @@ -20,38 +23,31 @@ */ package de.ovgu.featureide.fm.core.io.velvet; -import static de.ovgu.featureide.fm.core.localization.StringTable.IN_FILE; -import static de.ovgu.featureide.fm.core.localization.StringTable.NO_SUCH_ATTRIBUTE_DEFINED_; -import static java.lang.String.format; - import java.io.ByteArrayInputStream; +import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; -import java.nio.file.Path; -import java.util.Collection; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.ListIterator; - -import org.antlr.runtime.ANTLRInputStream; -import org.antlr.runtime.CommonTokenStream; -import org.antlr.runtime.RecognitionException; -import org.antlr.runtime.tree.CommonErrorNode; -import org.antlr.runtime.tree.Tree; -import org.prop4j.And; -import org.prop4j.Choose; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.CharStreams; +import org.antlr.v4.runtime.CommonTokenStream; +import org.antlr.v4.runtime.tree.ParseTree; +import org.eclipse.core.resources.IProject; import org.prop4j.Equals; import org.prop4j.Implies; -import org.prop4j.Literal; import org.prop4j.Node; -import org.prop4j.Not; -import org.prop4j.Or; import de.ovgu.featureide.fm.core.Logger; import de.ovgu.featureide.fm.core.PluginID; import de.ovgu.featureide.fm.core.base.IConstraint; -import de.ovgu.featureide.fm.core.base.IFeature; import de.ovgu.featureide.fm.core.base.IFeatureModel; import de.ovgu.featureide.fm.core.base.IFeatureStructure; import de.ovgu.featureide.fm.core.base.impl.FMFactoryManager; @@ -61,9 +57,7 @@ import de.ovgu.featureide.fm.core.base.impl.MultiFeatureModelFactory; import de.ovgu.featureide.fm.core.constraint.Equation; import de.ovgu.featureide.fm.core.constraint.FeatureAttribute; -import de.ovgu.featureide.fm.core.constraint.Reference; -import de.ovgu.featureide.fm.core.constraint.ReferenceType; -import de.ovgu.featureide.fm.core.constraint.RelationOperator; +import de.ovgu.featureide.fm.core.constraint.FeatureAttributeMap; import de.ovgu.featureide.fm.core.constraint.WeightedTerm; import de.ovgu.featureide.fm.core.io.AFeatureModelFormat; import de.ovgu.featureide.fm.core.io.Problem; @@ -76,17 +70,21 @@ * @author Sebastian Krieter * @author Matthias Strauss * @author Reimar Schroeter + * @author Malte Grave + * @author Oleksandr Kudriavchenko */ -public class SimpleVelvetFeatureModelFormat extends AFeatureModelFormat { +public class SimpleVelvetFeatureModelFormat extends AFeatureModelFormat implements IVelvetFeatureModelFormat { public static final String ID = PluginID.PLUGIN_ID + ".format.fm." + SimpleVelvetFeatureModelFormat.class.getSimpleName(); - - protected Path featureModelFile; + public final boolean velvetImport = false; + MultiFeatureModel extFeatureModel; + String extFeatureModelName; + protected File featureModelFile; protected ProblemList problemList; - private static final String[] SYMBOLS = { "!", "&&", "||", "->", "<->", ", ", "choose", "atleast", "atmost" }; private static final String NEWLINE = System.getProperty("line.separator", "\n"); private final StringBuilder sb = new StringBuilder(); + private static final String[] paths = { "%s.velvet", "%s.xml", "MPL/%s.velvet", "MPL/%s.xml" }; public SimpleVelvetFeatureModelFormat() { super(); @@ -106,60 +104,98 @@ public boolean supportsWrite() { return true; } + void collectAttributes(Map attributesMap, FeatureAttributeMap attributes, String type) { + for (final String key : attributes.getKeys()) { + for (final FeatureAttribute attribute : attributes.getAttributes(key)) { + + attributesMap.put(String.format("%s %s = %s;", type, attribute.getAttributeName(), attribute.getValue()), attribute.getFeatureName()); + } + } + } + @Override public String write(IFeatureModel object) { + final int depth = 0; if (object instanceof MultiFeatureModel) { extFeatureModel = (MultiFeatureModel) object; } + + final Map attributes = new HashMap<>(); + final FeatureAttributeMap intAttrs = extFeatureModel.getIntegerAttributes(); + // final FeatureAttributeMap floatAttrs = extFeatureModel.getIntegerAttributes(); + final FeatureAttributeMap boolAttrs = extFeatureModel.getBooleanAttributes(); + final FeatureAttributeMap strAttrs = extFeatureModel.getStringAttributes(); + List attributeConstraints = null; + collectAttributes(attributes, intAttrs, "int"); + collectAttributes(attributes, boolAttrs, "bool"); + collectAttributes(attributes, strAttrs, "string"); + + final List constraints = new ArrayList<>(extFeatureModel.getConstraints()); final IFeatureStructure root = object.getStructure().getRoot(); sb.delete(0, sb.length()); - sb.append("concept "); - sb.append(root.getFeature().getName()); sb.append(" {"); sb.append(NEWLINE); - if (extFeatureModel != null) { - for (final IFeatureStructure child : root.getChildren()) { - writeNewDefined(child, 1); + attributeConstraints = extFeatureModel.getAttributConstraints(); + + // find parent by looking where new numbers come from + + for (final Entry attr : attributes.entrySet()) { + if (attr.getValue().equals(root.getFeature().getName())) { + writeTab(depth + 1); + sb.append(attr.getKey()); + sb.append(NEWLINE); + } } - for (final IConstraint constraint : object.getConstraints()) { + for (final IFeatureStructure child : root.getChildren()) { + // writeNewDefined(child, 1); + writeFeature(child, 1, constraints, attributes, attributeConstraints); + } + for (final IConstraint constraint : constraints) { if (((MultiConstraint) constraint).getType() == MultiFeature.TYPE_INTERN) { - sb.append("\tconstraint "); - sb.append(constraint.getNode().toString(SYMBOLS)); - sb.append(";"); - sb.append(NEWLINE); + writeConstraint(constraint, depth); } } } else { - writeFeatureGroup(root, 1); - + writeFeatureGroup(root, 1, constraints, attributes, attributeConstraints); for (final IConstraint constraint : object.getConstraints()) { - sb.append("\tconstraint "); - sb.append(constraint.getNode().toString(SYMBOLS)); - sb.append(";"); - sb.append(NEWLINE); + writeConstraint(constraint, depth); } } - sb.append("}"); - return sb.toString(); } - private void writeFeatureGroup(IFeatureStructure root, int depth) { + private void writeConstraint(IConstraint constraint, int depth) { + writeTab(depth + 1); + sb.append("constraint "); + final Node constraintNode = ((Implies) constraint.getNode()).getChildren()[1]; + + final Node[] children = ((Equals) constraintNode).getChildren(); + final Node name = children[0]; + final Node value = children[1]; + sb.append(name.toString(SYMBOLS)); + sb.append(" = "); + sb.append(value.toString(SYMBOLS)); + sb.append(";"); + sb.append(NEWLINE); + } + + private void writeFeatureGroup(IFeatureStructure root, int depth, List constraints, Map attributes, + List attributeConstraints) { if (root.isAnd()) { for (final IFeatureStructure feature : root.getChildren()) { - writeFeature(feature, depth + 1); + writeFeature(feature, depth + 1, constraints, attributes, attributeConstraints); } } else if (root.isOr()) { writeTab(depth + 1); sb.append("someOf {"); sb.append(NEWLINE); for (final IFeatureStructure feature : root.getChildren()) { - writeFeature(feature, depth + 2); + writeFeature(feature, depth + 2, constraints, attributes, attributeConstraints); } writeTab(depth + 1); sb.append("}"); @@ -169,7 +205,7 @@ private void writeFeatureGroup(IFeatureStructure root, int depth) { sb.append("oneOf {"); sb.append(NEWLINE); for (final IFeatureStructure f : root.getChildren()) { - writeFeature(f, depth + 2); + writeFeature(f, depth + 2, constraints, attributes, attributeConstraints); } writeTab(depth + 1); sb.append("}"); @@ -177,7 +213,40 @@ private void writeFeatureGroup(IFeatureStructure root, int depth) { } } - private void writeFeature(IFeatureStructure feature, int depth) { + private void writeAttributeConstraint(Map attributes, Equation attributeConstraint, String featureName, int depth) { + writeTab(depth + 1); + sb.append("constraint "); + sb.append("ID = "); + final List sortedTerms = attributeConstraint.getWeightedTerms(); + sortedTerms.sort(Comparator.comparing(WeightedTerm::isPositive).reversed()); + boolean first = true; + for (final WeightedTerm term : sortedTerms) { + if (!term.isPositive()) { + sb.append(" - "); + } else if (!first) { + sb.append(" + "); + } + + final String name = term.getReference().getAttributeName(); + if (!name.equals("attributeName")) { + sb.append(name); + + } else { + sb.append(term.getWeight()); + } + first = false; + + } + sb.append(" "); + sb.append(attributeConstraint.getOperator()); + sb.append(" 0;"); + sb.append(NEWLINE); + + } + + private void writeFeature(IFeatureStructure feature, int depth, List constraints, Map attributes, + List attributeConstraints) { + final String featureName = feature.getFeature().getName().toString(); writeTab(depth); if (feature.isAbstract()) { sb.append("abstract "); @@ -186,11 +255,53 @@ private void writeFeature(IFeatureStructure feature, int depth) { sb.append("mandatory "); } sb.append("feature "); - sb.append(feature.getFeature().getName()); + sb.append(featureName); + final String description = feature.getFeature().getProperty().getDescription(); + + final List childConstraints = new ArrayList<>(); + final List childAttributeConstraints = new ArrayList<>(); + + final Iterator iteratorC = constraints.iterator(); + while (iteratorC.hasNext()) { + final IConstraint constraint = iteratorC.next(); + final Node constraintNode = constraint.getNode(); + final Node[] children = ((Implies) constraintNode).getChildren(); + final Node parentFeature = children[0]; + if ((parentFeature.toString().equals(featureName))) { + childConstraints.add(constraint); + iteratorC.remove(); + } + } + + final Iterator iteratorAC = attributeConstraints.iterator(); + while (iteratorAC.hasNext()) { + String parentFeature = null; + final Equation attributeConstraint = iteratorAC.next(); + + for (final WeightedTerm term : attributeConstraint.getWeightedTerms()) { + /* + * go through all terms in equation if there is one, that has a parent which is not present in attributes, we see, that it is equations parent + */ + if (!attributes.containsValue(term.getReference().toString())) { + parentFeature = term.getReference().toString(); + break; + } + } + + if (featureName.equals(parentFeature)) { + childAttributeConstraints.add(attributeConstraint); + iteratorAC.remove(); + } + + } + final boolean hasDescription = (description != null) && !description.isEmpty(); + final boolean hasConstraints = (childConstraints != null) && !childConstraints.isEmpty(); + final boolean hasAttributeConstraints = (childAttributeConstraints != null) && !childAttributeConstraints.isEmpty(); + final boolean hasAttributes = attributes.containsValue(featureName); - if ((feature.getChildrenCount() == 0) && !hasDescription) { + if ((feature.getChildrenCount() == 0) && !hasDescription && !hasConstraints && !hasAttributes && !hasAttributeConstraints) { sb.append(";"); } else { sb.append(" {"); @@ -202,20 +313,35 @@ private void writeFeature(IFeatureStructure feature, int depth) { sb.append("\";"); sb.append(NEWLINE); } + if (hasAttributes) { + for (final Entry attr : attributes.entrySet()) { + if (attr.getValue().equals(featureName)) { + writeTab(depth + 1); + sb.append(attr.getKey()); + sb.append(NEWLINE); + } + } + } + if (hasAttributeConstraints) { + for (final Equation attributeConstraint : childAttributeConstraints) { - writeFeatureGroup(feature, depth); + writeAttributeConstraint(attributes, attributeConstraint, featureName, depth); + } + } + if (hasConstraints) { + for (final IConstraint constraint : childConstraints) { + + writeConstraint(constraint, depth); + + } + } + writeFeatureGroup(feature, depth, constraints, attributes, attributeConstraints); writeTab(depth); sb.append("}"); } - sb.append(NEWLINE); - } - private void writeNewDefined(IFeatureStructure child2, int depth) { - writeFeature(child2, 1); - for (final IFeatureStructure child : child2.getChildren()) { - writeNewDefined(child, depth); - } + sb.append(NEWLINE); } private void writeTab(int times) { @@ -230,9 +356,8 @@ public ProblemList read(IFeatureModel object, CharSequence source) { factory = MultiFeatureModelFactory.getInstance(); extFeatureModel = (MultiFeatureModel) object; if (extFeatureModel != null) { - featureModelFile = extFeatureModel.getSourceFile(); + featureModelFile = extFeatureModel.getSourceFile().toFile(); } - final ByteArrayInputStream inputstr = new ByteArrayInputStream(source.toString().getBytes(Charset.availableCharsets().get("UTF-8"))); try { parseInputStream(inputstr); @@ -242,567 +367,134 @@ public ProblemList read(IFeatureModel object, CharSequence source) { return problemList; } - private static class ConstraintNode { - - private final Node computedNode; - private final Tree rawNode; - - public ConstraintNode(Node computedNode, Tree rawNode) { - this.computedNode = computedNode; - this.rawNode = rawNode; - } - } - - private static final int[] binaryOperators = - { VelvetParser.OP_OR, VelvetParser.OP_AND, VelvetParser.OP_XOR, VelvetParser.OP_IMPLIES, VelvetParser.OP_EQUIVALENT }; - - private final LinkedList atrributeConstraintNodes = new LinkedList<>(); - private final LinkedList parentStack = new LinkedList<>(); - private final LinkedList constraintNodeList = new LinkedList<>(); - private final HashSet usedVariables = new HashSet<>(); - - private final boolean velvetImport = false; - - private MultiFeatureModel extFeatureModel; - private String extFeatureModelName; - - private static WeightedTerm createTerm(final int weight, final boolean rightSide, final boolean minus, final Reference reference) { - boolean positive = weight >= 0; - if (rightSide ^ minus) { - positive = !positive; - } - return new WeightedTerm(Math.abs(weight), positive, reference); - } - - private static LinkedList getChildren(final Tree root) { - final LinkedList children = new LinkedList<>(); - - final int childCount = root.getChildCount(); - for (int i = 0; i < childCount; i++) { - children.add(root.getChild(i)); - } - return children; - } - protected synchronized void parseInputStream(final InputStream inputStream) throws UnsupportedModelException { - ANTLRInputStream antlrInputStream = null; + CharStream charStream = null; try { - antlrInputStream = new ANTLRInputStream(inputStream); + charStream = CharStreams.fromStream(inputStream); } catch (final IOException e) { Logger.logError(e); throw new UnsupportedModelException("Error while reading model!", 0); } - final VelvetParser parser = new VelvetParser(new CommonTokenStream(new VelvetLexer(antlrInputStream))); - Tree root = null; - try { - root = (Tree) parser.velvetModel().getTree(); - if (root == null) { - throw new UnsupportedModelException("Error while parsing model!", 0); - } - - init(); - - checkTree(root); - parseModel(root); - parseAttributeConstraints(); - } catch (final RecognitionException e) { - Logger.logError(e); - final UnsupportedModelException unsupportedModelException = new UnsupportedModelException(e.getMessage(), e.line); - unsupportedModelException.addSuppressed(e); - throw unsupportedModelException; - } - } - - private MultiFeature addFeature(final IFeature parent, final String featureName, final boolean isMandatory, final boolean isAbstract, - final boolean isHidden) { - final MultiFeature newFeature = (MultiFeature) factory.createFeature(extFeatureModel, featureName); - newFeature.getStructure().setMandatory(isMandatory); - newFeature.getStructure().setAbstract(isAbstract); - newFeature.getStructure().setHidden(isHidden); + init(); + final VelvetLexer lexer = new VelvetLexer(charStream); + final CommonTokenStream tokens = new CommonTokenStream(lexer); + final VelvetParser parser = new VelvetParser(tokens); + final VelvetVisitorImpl visitor = new VelvetVisitorImpl(this); - final IFeature orgFeature = extFeatureModel.getFeature(featureName); - if ((orgFeature != null) && (orgFeature instanceof MultiFeature)) { - return (MultiFeature) orgFeature; - } else { - extFeatureModel.addFeature(newFeature); - parent.getStructure().addChild(newFeature.getStructure()); - newFeature.setNewDefined(true); - return newFeature; - } - } - - private String checkNode(Node curNode) { - if (curNode instanceof Literal) { - final Literal literal = (Literal) curNode; - final String varString = literal.var.toString(); - if (extFeatureModel.getFeature(varString) == null) { - return literal.var.toString(); - } - } else { - for (final Node child : curNode.getChildren()) { - final String childRet = checkNode(child); - if (childRet != null) { - return childRet; - } - } - } - return null; + final ParseTree tree = parser.velvetModel(); + visitor.visit(tree); } /** * Initializes all variables. */ private void init() { - atrributeConstraintNodes.clear(); - parentStack.clear(); - constraintNodeList.clear(); - usedVariables.clear(); - extFeatureModel.reset(); - extFeatureModelName = null; extFeatureModel.setInterface(false); - } - private void parseAttribute(final Tree root, final IFeature parent) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - - final String name = checkTree(nodeList.poll()).getText(); - final Tree valueNode = nodeList.poll(); - - switch (valueNode.getType()) { - case VelvetParser.FLOAT: - break; - case VelvetParser.INT: - extFeatureModel.addAttribute(parent.getName(), name, Integer.parseInt(valueNode.getText())); - break; - case VelvetParser.BOOLEAN: - extFeatureModel.addAttribute(parent.getName(), name, Boolean.parseBoolean(valueNode.getText())); - break; - case VelvetParser.STRING: - final String valueNodeText = valueNode.getText(); - extFeatureModel.addAttribute(parent.getName(), name, valueNodeText.substring(1, valueNodeText.length() - 1)); - break; - default: - reportSyntaxError(valueNode); - } } - private void parseAttributeConstraints() throws UnsupportedModelException, RecognitionException { - while (!atrributeConstraintNodes.isEmpty()) { - final LinkedList nodeList = getChildren(atrributeConstraintNodes.poll()); - - final LinkedList weightedTerms = new LinkedList<>(); - RelationOperator relationOperator = null; - boolean minus = false; - int degree = 0; - - while (!nodeList.isEmpty()) { - final Tree curNode = nodeList.poll(); - - switch (curNode.getType()) { - case VelvetParser.ID: - case VelvetParser.IDPath: - final String attributeName = curNode.getText(); - - final Collection> attributes = extFeatureModel.getIntegerAttributes().getAttributes(attributeName); - - if (attributes == null) { - throw new UnsupportedModelException(curNode.getLine() + ":" + curNode.getCharPositionInLine() + NO_SUCH_ATTRIBUTE_DEFINED_, - curNode.getLine()); - } - - for (final FeatureAttribute attr : attributes) { - weightedTerms.add(createTerm(attr.getValue(), relationOperator != null, minus, - new Reference(attr.getFeatureName(), ReferenceType.FEATURE, attributeName))); - } - - break; - // case VelvetParser.FLOAT: - // break; - case VelvetParser.INT: - final int value = Integer.parseInt(curNode.getText()); - if ((relationOperator == null) ^ minus) { - degree -= value; - } else { - degree += value; - } - break; - case VelvetParser.PLUS: - minus = false; - break; - case VelvetParser.MINUS: - minus = true; - break; - case VelvetParser.ATTR_OP_EQUALS: - relationOperator = RelationOperator.EQUAL; - break; - case VelvetParser.ATTR_OP_NOT_EQUALS: - relationOperator = RelationOperator.NOT_EQUAL; - break; - case VelvetParser.ATTR_OP_GREATER: - relationOperator = RelationOperator.GREATER; - break; - case VelvetParser.ATTR_OP_GREATER_EQ: - relationOperator = RelationOperator.GREATER_EQUAL; - break; - case VelvetParser.ATTR_OP_LESS: - relationOperator = RelationOperator.LESS; - break; - case VelvetParser.ATTR_OP_LESS_EQ: - relationOperator = RelationOperator.LESS_EQUAL; - break; - default: - reportSyntaxError(curNode); - } - } - final Equation equation = new Equation(weightedTerms, relationOperator, degree); - extFeatureModel.addAttributeConstraint(equation); - } - } - - private void parseConcept(final Tree root) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - - while (!nodeList.isEmpty()) { - final Tree curNode = nodeList.poll(); - - switch (curNode.getType()) { - case VelvetParser.ID: - extFeatureModelName = checkTree(curNode).getText(); - - final MultiFeature rootFeature = (MultiFeature) factory.createFeature(extFeatureModel, extFeatureModelName); - rootFeature.getStructure().setAbstract(true); - rootFeature.getStructure().setMandatory(true); - - extFeatureModel.addFeature(rootFeature); - extFeatureModel.getStructure().setRoot(rootFeature.getStructure()); - parentStack.push(rootFeature); - - break; - case VelvetParser.BASEEXT: - reportWarning(curNode, "Inheritance are not supported."); - break; - case VelvetParser.IMPORTINSTANCE: - reportWarning(curNode, "Instances are not supported."); - break; - case VelvetParser.IMPORTINTERFACE: - reportWarning(curNode, "Interfaces are not supported."); - break; - case VelvetParser.DEF: - parseDefinitions(curNode); - break; - default: - reportSyntaxError(curNode); - } - } - - for (final ConstraintNode constraintNode : constraintNodeList) { - final String nameError = checkNode(constraintNode.computedNode); - if (nameError == null) { - extFeatureModel.addConstraint(factory.createConstraint(extFeatureModel, constraintNode.computedNode)); - } else { - reportWarning(constraintNode.rawNode, format("There is no feature with the name %s.", nameError)); - } - } - } - - private void parseConstraint(final Tree root, final IFeature parent) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - - while (!nodeList.isEmpty()) { - final Tree curNode = nodeList.poll(); - - switch (curNode.getType()) { - case VelvetParser.ID: - // name = curNode.getText(); - break; - case VelvetParser.CONSTR: - Node newNode = parseConstraint_rec(curNode); - newNode = new Implies(new Literal(parent.getName()), newNode); - constraintNodeList.add(new ConstraintNode(newNode, curNode)); - break; - case VelvetParser.ACONSTR: - atrributeConstraintNodes.add(curNode); - break; - default: - reportSyntaxError(curNode); - } - } - } - - private Node parseConstraint_rec(final Tree root) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - final LinkedList nodes = new LinkedList<>(); - final LinkedList operators = new LinkedList<>(); - final LinkedList unaryOp = new LinkedList<>(); - Node n = null; - - while (!nodeList.isEmpty()) { - final Tree curNode = nodeList.poll(); - - switch (curNode.getType()) { - case VelvetParser.UNARYOP: - unaryOp.push(curNode.getChild(0).getType()); - break; - case VelvetParser.CONSTR: - n = parseConstraint_rec(curNode); - break; - case VelvetParser.OPERAND: - n = new Literal(curNode.getChild(0).getText()); - break; - default: - operators.add(curNode.getType()); - } - - if (n != null) { - while (!unaryOp.isEmpty()) { - switch (unaryOp.pop()) { - case VelvetParser.OP_NOT: - n = new Not(n); - } - } - nodes.add(n); - n = null; - } - } - if (!operators.isEmpty()) { - for (final int operator : binaryOperators) { - final ListIterator nodesIt = nodes.listIterator(); - for (final ListIterator opIt = operators.listIterator(); opIt.hasNext();) { - final Node operand1 = nodesIt.next(); - if (opIt.next() == operator) { - opIt.remove(); - nodesIt.remove(); - final Node operand2 = nodesIt.next(); - switch (operator) { - case VelvetParser.OP_AND: - nodesIt.set(new And(operand1, operand2)); - break; - case VelvetParser.OP_OR: - nodesIt.set(new Or(operand1, operand2)); - break; - case VelvetParser.OP_XOR: - nodesIt.set(new Choose(1, operand1, operand2)); - break; - case VelvetParser.OP_IMPLIES: - nodesIt.set(new Implies(operand1, operand2)); - break; - case VelvetParser.OP_EQUIVALENT: - nodesIt.set(new Equals(operand1, operand2)); - break; - } - nodesIt.previous(); - } - } - } - } - if (nodes.isEmpty()) { - return null; - } - - return nodes.getFirst(); - } - - private void parseDefinitions(final Tree root) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - - final IFeature parentFeature = parentStack.pop(); - parentFeature.getStructure().setAnd(); - - while (!nodeList.isEmpty()) { - final Tree curNode = nodeList.poll(); - - switch (curNode.getType()) { - // Feature - case VelvetParser.FEATURE: - parseFeature(curNode, parentFeature); - break; - // Feature-Group - case VelvetParser.GROUP: - parseFeatureGroup(curNode, parentFeature); - break; - // Constraint - case VelvetParser.CONSTRAINT: - parseConstraint(curNode, parentFeature); - break; - // Use - case VelvetParser.USE: - parseUse(curNode, parentFeature); - break; - // Attribute - case VelvetParser.ATTR: - parseAttribute(curNode, parentFeature); - break; - case VelvetParser.DESCRIPTION: - parseDescription(curNode, parentFeature); - break; - case VelvetParser.EMPTY: - break; - default: - reportSyntaxError(curNode); - } - } - - } - - private void parseDescription(Tree root, IFeature parent) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - final Tree valueNode = nodeList.poll(); - - switch (valueNode.getType()) { - case VelvetParser.STRING: - final String valueNodeText = valueNode.getText(); - parent.getProperty().setDescription(valueNodeText.substring(1, valueNodeText.length() - 1).replace("\\\"", "\"")); - break; - default: - reportSyntaxError(valueNode); - } + @Override + public String getSuffix() { + return "velvet"; } - private void parseFeature(final Tree root, IFeature parent) throws RecognitionException { - final LinkedList childList = getChildren(root); - final String featureName; - if (extFeatureModel.isInterface()) { - featureName = checkTree(childList.poll()).getText(); - } else { - if (velvetImport || parent.getStructure().isRoot()) { - featureName = checkTree(childList.poll()).getText(); - } else { - featureName = parent.getName() + "." + checkTree(childList.poll()).getText(); - } - } - boolean isMandatory = false, isAbstract = false, moreDefinitions = false; - - Tree childNode = null; - while (!childList.isEmpty() && !moreDefinitions) { - childNode = childList.poll(); - - switch (childNode.getType()) { - case VelvetParser.MANDATORY: - isMandatory = true; - break; - case VelvetParser.ABSTRACT: - isAbstract = true; - break; - case VelvetParser.DEF: - moreDefinitions = true; - break; - default: - reportSyntaxError(childNode); - } - } - - if ((validator != null) && !validator.isValidFeatureName(featureName)) { - problemList.add(new Problem(featureName + " is not a valid feature name", root.getLine(), de.ovgu.featureide.fm.core.io.Problem.Severity.ERROR)); - } - - final MultiFeature newFeature = addFeature(parent, featureName, isMandatory, isAbstract, false); - if (moreDefinitions) { - parentStack.push(newFeature); - parseDefinitions(childNode); - } + @Override + public SimpleVelvetFeatureModelFormat getInstance() { + return new SimpleVelvetFeatureModelFormat(this); } - private void parseFeatureGroup(final Tree root, final IFeature parent) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - - while (!nodeList.isEmpty()) { - final Tree curNode = nodeList.poll(); - - switch (curNode.getType()) { - case VelvetParser.SOMEOF: - parent.getStructure().setOr(); - break; - case VelvetParser.ONEOF: - parent.getStructure().setAlternative(); - break; - case VelvetParser.FEATURE: - parseFeature(curNode, parent); - break; - default: - reportSyntaxError(curNode); - } - } + @Override + public String getId() { + return ID; } - private void parseModel(final Tree root) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - while (!nodeList.isEmpty()) { - final Tree curNode = nodeList.poll(); - switch (curNode.getType()) { - case VelvetParser.CONCEPT: - parseConcept(curNode); - break; - case VelvetParser.CINTERFACE: - extFeatureModel.setInterface(true); - parseConcept(curNode); - break; - case VelvetParser.EOF: - if (curNode.getTokenStartIndex() > -1) { - break; - } - default: - reportSyntaxError(curNode); - } + @Override + public boolean initExtension() { + if (super.initExtension()) { + FMFactoryManager.getInstance().getDefaultFactoryWorkspace().assignID(SimpleVelvetFeatureModelFormat.ID, MultiFeatureModelFactory.ID); + return true; } + return false; } - private void parseUse(Tree root, IFeature parent) throws RecognitionException { - reportWarning(root, "USE is not supported."); + @Override + public String getName() { + return "Simple Velvet"; } - private void reportWarning(Tree curNode, String message) { - Logger.logWarning(message + " (at line " + curNode.getLine() + ((featureModelFile != null) ? IN_FILE + featureModelFile.getFileName() : "") + ": \"" - + curNode.getText() + "\")"); + /* + * (non-Javadoc) + * @see de.ovgu.featureide.fm.core.io.velvet.IVelvetFeatureModelFormat#getExtFeatureModelName() + */ + @Override + public String getExtFeatureModelName() { + return extFeatureModelName; } - private Tree checkTree(Tree root) throws RecognitionException { - if (root instanceof CommonErrorNode) { - throwException(((CommonErrorNode) root).trappedException, root); - } - return root; + /* + * (non-Javadoc) + * @see de.ovgu.featureide.fm.core.io.velvet.IVelvetFeatureModelFormat#getExtFeatureModel() + */ + @Override + public MultiFeatureModel getExtFeatureModel() { + return extFeatureModel; } - private void reportSyntaxError(Tree curNode) throws RecognitionException { - checkTree(curNode); - final RecognitionException ex = new RecognitionException(); - ex.line = 1; - ex.charPositionInLine = 1; - throwException(ex, curNode); - } + @Override + public void setExtFeatureModelName(String name) { + extFeatureModelName = name; - private void throwException(RecognitionException e, Tree curNode) throws RecognitionException { - throw e; } + /* + * (non-Javadoc) + * @see de.ovgu.featureide.fm.core.io.velvet.IVelvetFeatureModelFormat#getFeatureModelFile() + */ @Override - public String getSuffix() { - return "velvet"; + public File getFeatureModelFile() { + // TODO Auto-generated method stub + return featureModelFile; } @Override - public SimpleVelvetFeatureModelFormat getInstance() { - return new SimpleVelvetFeatureModelFormat(this); + public boolean isVelvetImport() { + return velvetImport; } + /* + * (non-Javadoc) + * @see de.ovgu.featureide.fm.core.io.velvet.IVelvetFeatureModelFormat#getLocalSearch() + */ @Override - public String getId() { - return ID; + public boolean getLocalSearch() { + return false; } + /* + * (non-Javadoc) + * @see de.ovgu.featureide.fm.core.io.velvet.IVelvetFeatureModelFormat#getIsUsedAsAPI() + */ @Override - public boolean initExtension() { - if (super.initExtension()) { - FMFactoryManager.getInstance().getDefaultFactoryWorkspace().assignID(SimpleVelvetFeatureModelFormat.ID, MultiFeatureModelFactory.ID); - return true; - } + public boolean getIsUsedAsAPI() { + // TODO Auto-generated method stub return false; } @Override - public String getName() { - return "Simple Velevet"; + public String[] getPaths() { + + return paths; } + /* + * (non-Javadoc) + * @see de.ovgu.featureide.fm.core.io.velvet.IVelvetFeatureModelFormat#getProject() + */ + @Override + public IProject getProject() { + // TODO Auto-generated method stub + return null; + } } diff --git a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/Velvet.interp b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/Velvet.interp new file mode 100644 index 0000000000..f1cc3fee50 --- /dev/null +++ b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/Velvet.interp @@ -0,0 +1,156 @@ +token literal names: +null +'import' +'mandatory' +'abstract' +'someOf' +'oneOf' +'concept' +'cinterface' +'constraint' +'feature' +'use' +'instance' +'interface' +'description' +'int' +'float' +'string' +'bool' +';' +'{' +'}' +'(' +')' +'=' +',' +':' +'+' +'-' +'!' +'&&' +'||' +'xor' +'->' +'<->' +'==' +'!=' +'>' +'<' +'>=' +'<=' +'EMPTY' +'CONSTR' +'ACONSTR' +'BASEEXT' +'DEF' +'GROUP' +'ATTR' +'UNARYOP' +'OPERAND' +null +null +null +null +null +null +null +null +null + +token symbolic names: +null +IMPORT +MANDATORY +ABSTRACT +SOMEOF +ONEOF +CONCEPT +CINTERFACE +CONSTRAINT +FEATURE +USE +IMPORTINSTANCE +IMPORTINTERFACE +DESCRIPTION +VAR_INT +VAR_FLOAT +VAR_STRING +VAR_BOOL +SEMI +START_C +END_C +START_R +END_R +EQ +COMMA +COLON +PLUS +MINUS +OP_NOT +OP_AND +OP_OR +OP_XOR +OP_IMPLIES +OP_EQUIVALENT +ATTR_OP_EQUALS +ATTR_OP_NOT_EQUALS +ATTR_OP_GREATER +ATTR_OP_LESS +ATTR_OP_GREATER_EQ +ATTR_OP_LESS_EQ +EMPTY +CONSTR +ACONSTR +BASEEXT +DEF +GROUP +ATTR +UNARYOP +OPERAND +BOOLEAN +ID +IDPath +INT +FLOAT +STRING +WS +SL_COMMENT +ML_COMMENT + +rule names: +velvetModel +imp +concept +cinterface +conceptBaseExt +instanceImports +interfaceImports +name +definitions +definition +nonFeatureDefinition +use +feature +featureGroup +groupType +description +constraint +constraintDefinition +constraintOperand +attribute +attributeConstraint +attribNumExpr +attribOperator +attribNumInstance +intAttribute +floatAttribute +stringAttribute +boolAttribute +unaryOp +binaryOp +attribRelation + + +atn: +[4, 1, 57, 294, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 1, 0, 3, 0, 64, 8, 0, 1, 0, 1, 0, 3, 0, 68, 8, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 76, 8, 1, 11, 1, 12, 1, 77, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 84, 8, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 94, 8, 2, 1, 2, 3, 2, 97, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 103, 8, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 5, 4, 110, 8, 4, 10, 4, 12, 4, 113, 9, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 121, 8, 5, 10, 5, 12, 5, 124, 9, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 132, 8, 6, 10, 6, 12, 6, 135, 9, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 5, 9, 144, 8, 9, 10, 9, 12, 9, 147, 9, 9, 1, 9, 1, 9, 5, 9, 151, 8, 9, 10, 9, 12, 9, 154, 9, 9, 1, 9, 1, 9, 1, 9, 5, 9, 159, 8, 9, 10, 9, 12, 9, 162, 9, 9, 3, 9, 164, 8, 9, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 170, 8, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 182, 8, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 188, 8, 12, 1, 13, 1, 13, 1, 13, 4, 13, 193, 8, 13, 11, 13, 12, 13, 194, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 211, 8, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 5, 17, 219, 8, 17, 10, 17, 12, 17, 222, 9, 17, 1, 18, 5, 18, 225, 8, 18, 10, 18, 12, 18, 228, 9, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 235, 8, 18, 1, 19, 1, 19, 1, 19, 1, 19, 3, 19, 241, 8, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 5, 21, 253, 8, 21, 10, 21, 12, 21, 256, 9, 21, 1, 22, 1, 22, 1, 23, 1, 23, 3, 23, 262, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 268, 8, 24, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 274, 8, 25, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 280, 8, 26, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 286, 8, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 0, 0, 31, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 0, 5, 1, 0, 50, 51, 1, 0, 4, 5, 1, 0, 26, 27, 1, 0, 29, 33, 2, 0, 34, 34, 38, 39, 303, 0, 63, 1, 0, 0, 0, 2, 75, 1, 0, 0, 0, 4, 79, 1, 0, 0, 0, 6, 98, 1, 0, 0, 0, 8, 106, 1, 0, 0, 0, 10, 114, 1, 0, 0, 0, 12, 125, 1, 0, 0, 0, 14, 136, 1, 0, 0, 0, 16, 138, 1, 0, 0, 0, 18, 145, 1, 0, 0, 0, 20, 169, 1, 0, 0, 0, 22, 171, 1, 0, 0, 0, 24, 181, 1, 0, 0, 0, 26, 189, 1, 0, 0, 0, 28, 198, 1, 0, 0, 0, 30, 200, 1, 0, 0, 0, 32, 204, 1, 0, 0, 0, 34, 214, 1, 0, 0, 0, 36, 226, 1, 0, 0, 0, 38, 240, 1, 0, 0, 0, 40, 244, 1, 0, 0, 0, 42, 248, 1, 0, 0, 0, 44, 257, 1, 0, 0, 0, 46, 261, 1, 0, 0, 0, 48, 263, 1, 0, 0, 0, 50, 269, 1, 0, 0, 0, 52, 275, 1, 0, 0, 0, 54, 281, 1, 0, 0, 0, 56, 287, 1, 0, 0, 0, 58, 289, 1, 0, 0, 0, 60, 291, 1, 0, 0, 0, 62, 64, 3, 2, 1, 0, 63, 62, 1, 0, 0, 0, 63, 64, 1, 0, 0, 0, 64, 67, 1, 0, 0, 0, 65, 68, 3, 4, 2, 0, 66, 68, 3, 6, 3, 0, 67, 65, 1, 0, 0, 0, 67, 66, 1, 0, 0, 0, 68, 69, 1, 0, 0, 0, 69, 70, 5, 0, 0, 1, 70, 1, 1, 0, 0, 0, 71, 72, 5, 1, 0, 0, 72, 73, 3, 14, 7, 0, 73, 74, 5, 18, 0, 0, 74, 76, 1, 0, 0, 0, 75, 71, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 75, 1, 0, 0, 0, 77, 78, 1, 0, 0, 0, 78, 3, 1, 0, 0, 0, 79, 80, 5, 6, 0, 0, 80, 83, 5, 50, 0, 0, 81, 82, 5, 25, 0, 0, 82, 84, 3, 8, 4, 0, 83, 81, 1, 0, 0, 0, 83, 84, 1, 0, 0, 0, 84, 93, 1, 0, 0, 0, 85, 86, 3, 10, 5, 0, 86, 87, 3, 12, 6, 0, 87, 94, 1, 0, 0, 0, 88, 89, 3, 12, 6, 0, 89, 90, 3, 10, 5, 0, 90, 94, 1, 0, 0, 0, 91, 94, 3, 12, 6, 0, 92, 94, 3, 10, 5, 0, 93, 85, 1, 0, 0, 0, 93, 88, 1, 0, 0, 0, 93, 91, 1, 0, 0, 0, 93, 92, 1, 0, 0, 0, 93, 94, 1, 0, 0, 0, 94, 96, 1, 0, 0, 0, 95, 97, 3, 16, 8, 0, 96, 95, 1, 0, 0, 0, 96, 97, 1, 0, 0, 0, 97, 5, 1, 0, 0, 0, 98, 99, 5, 7, 0, 0, 99, 102, 5, 50, 0, 0, 100, 101, 5, 25, 0, 0, 101, 103, 3, 8, 4, 0, 102, 100, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, 103, 104, 1, 0, 0, 0, 104, 105, 3, 16, 8, 0, 105, 7, 1, 0, 0, 0, 106, 111, 5, 50, 0, 0, 107, 108, 5, 24, 0, 0, 108, 110, 5, 50, 0, 0, 109, 107, 1, 0, 0, 0, 110, 113, 1, 0, 0, 0, 111, 109, 1, 0, 0, 0, 111, 112, 1, 0, 0, 0, 112, 9, 1, 0, 0, 0, 113, 111, 1, 0, 0, 0, 114, 115, 5, 11, 0, 0, 115, 116, 5, 50, 0, 0, 116, 122, 3, 14, 7, 0, 117, 118, 5, 24, 0, 0, 118, 119, 5, 50, 0, 0, 119, 121, 3, 14, 7, 0, 120, 117, 1, 0, 0, 0, 121, 124, 1, 0, 0, 0, 122, 120, 1, 0, 0, 0, 122, 123, 1, 0, 0, 0, 123, 11, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 125, 126, 5, 12, 0, 0, 126, 127, 5, 50, 0, 0, 127, 133, 3, 14, 7, 0, 128, 129, 5, 24, 0, 0, 129, 130, 5, 50, 0, 0, 130, 132, 3, 14, 7, 0, 131, 128, 1, 0, 0, 0, 132, 135, 1, 0, 0, 0, 133, 131, 1, 0, 0, 0, 133, 134, 1, 0, 0, 0, 134, 13, 1, 0, 0, 0, 135, 133, 1, 0, 0, 0, 136, 137, 7, 0, 0, 0, 137, 15, 1, 0, 0, 0, 138, 139, 5, 19, 0, 0, 139, 140, 3, 18, 9, 0, 140, 141, 5, 20, 0, 0, 141, 17, 1, 0, 0, 0, 142, 144, 3, 20, 10, 0, 143, 142, 1, 0, 0, 0, 144, 147, 1, 0, 0, 0, 145, 143, 1, 0, 0, 0, 145, 146, 1, 0, 0, 0, 146, 163, 1, 0, 0, 0, 147, 145, 1, 0, 0, 0, 148, 152, 3, 26, 13, 0, 149, 151, 3, 20, 10, 0, 150, 149, 1, 0, 0, 0, 151, 154, 1, 0, 0, 0, 152, 150, 1, 0, 0, 0, 152, 153, 1, 0, 0, 0, 153, 164, 1, 0, 0, 0, 154, 152, 1, 0, 0, 0, 155, 160, 3, 24, 12, 0, 156, 159, 3, 24, 12, 0, 157, 159, 3, 20, 10, 0, 158, 156, 1, 0, 0, 0, 158, 157, 1, 0, 0, 0, 159, 162, 1, 0, 0, 0, 160, 158, 1, 0, 0, 0, 160, 161, 1, 0, 0, 0, 161, 164, 1, 0, 0, 0, 162, 160, 1, 0, 0, 0, 163, 148, 1, 0, 0, 0, 163, 155, 1, 0, 0, 0, 163, 164, 1, 0, 0, 0, 164, 19, 1, 0, 0, 0, 165, 170, 3, 32, 16, 0, 166, 170, 3, 22, 11, 0, 167, 170, 3, 38, 19, 0, 168, 170, 3, 30, 15, 0, 169, 165, 1, 0, 0, 0, 169, 166, 1, 0, 0, 0, 169, 167, 1, 0, 0, 0, 169, 168, 1, 0, 0, 0, 170, 21, 1, 0, 0, 0, 171, 172, 5, 10, 0, 0, 172, 173, 3, 14, 7, 0, 173, 174, 5, 18, 0, 0, 174, 23, 1, 0, 0, 0, 175, 176, 5, 2, 0, 0, 176, 182, 5, 3, 0, 0, 177, 178, 5, 3, 0, 0, 178, 182, 5, 2, 0, 0, 179, 182, 5, 2, 0, 0, 180, 182, 5, 3, 0, 0, 181, 175, 1, 0, 0, 0, 181, 177, 1, 0, 0, 0, 181, 179, 1, 0, 0, 0, 181, 180, 1, 0, 0, 0, 181, 182, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 183, 184, 5, 9, 0, 0, 184, 187, 3, 14, 7, 0, 185, 188, 3, 16, 8, 0, 186, 188, 5, 18, 0, 0, 187, 185, 1, 0, 0, 0, 187, 186, 1, 0, 0, 0, 188, 25, 1, 0, 0, 0, 189, 190, 3, 28, 14, 0, 190, 192, 5, 19, 0, 0, 191, 193, 3, 24, 12, 0, 192, 191, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 192, 1, 0, 0, 0, 194, 195, 1, 0, 0, 0, 195, 196, 1, 0, 0, 0, 196, 197, 5, 20, 0, 0, 197, 27, 1, 0, 0, 0, 198, 199, 7, 1, 0, 0, 199, 29, 1, 0, 0, 0, 200, 201, 5, 13, 0, 0, 201, 202, 5, 54, 0, 0, 202, 203, 5, 18, 0, 0, 203, 31, 1, 0, 0, 0, 204, 205, 5, 8, 0, 0, 205, 206, 5, 50, 0, 0, 206, 207, 5, 23, 0, 0, 207, 210, 1, 0, 0, 0, 208, 211, 3, 34, 17, 0, 209, 211, 3, 40, 20, 0, 210, 208, 1, 0, 0, 0, 210, 209, 1, 0, 0, 0, 211, 212, 1, 0, 0, 0, 212, 213, 5, 18, 0, 0, 213, 33, 1, 0, 0, 0, 214, 220, 3, 36, 18, 0, 215, 216, 3, 58, 29, 0, 216, 217, 3, 36, 18, 0, 217, 219, 1, 0, 0, 0, 218, 215, 1, 0, 0, 0, 219, 222, 1, 0, 0, 0, 220, 218, 1, 0, 0, 0, 220, 221, 1, 0, 0, 0, 221, 35, 1, 0, 0, 0, 222, 220, 1, 0, 0, 0, 223, 225, 3, 56, 28, 0, 224, 223, 1, 0, 0, 0, 225, 228, 1, 0, 0, 0, 226, 224, 1, 0, 0, 0, 226, 227, 1, 0, 0, 0, 227, 234, 1, 0, 0, 0, 228, 226, 1, 0, 0, 0, 229, 230, 5, 21, 0, 0, 230, 231, 3, 34, 17, 0, 231, 232, 5, 22, 0, 0, 232, 235, 1, 0, 0, 0, 233, 235, 3, 14, 7, 0, 234, 229, 1, 0, 0, 0, 234, 233, 1, 0, 0, 0, 235, 37, 1, 0, 0, 0, 236, 241, 3, 48, 24, 0, 237, 241, 3, 50, 25, 0, 238, 241, 3, 52, 26, 0, 239, 241, 3, 54, 27, 0, 240, 236, 1, 0, 0, 0, 240, 237, 1, 0, 0, 0, 240, 238, 1, 0, 0, 0, 240, 239, 1, 0, 0, 0, 241, 242, 1, 0, 0, 0, 242, 243, 5, 18, 0, 0, 243, 39, 1, 0, 0, 0, 244, 245, 3, 42, 21, 0, 245, 246, 3, 60, 30, 0, 246, 247, 3, 42, 21, 0, 247, 41, 1, 0, 0, 0, 248, 254, 3, 46, 23, 0, 249, 250, 3, 44, 22, 0, 250, 251, 3, 46, 23, 0, 251, 253, 1, 0, 0, 0, 252, 249, 1, 0, 0, 0, 253, 256, 1, 0, 0, 0, 254, 252, 1, 0, 0, 0, 254, 255, 1, 0, 0, 0, 255, 43, 1, 0, 0, 0, 256, 254, 1, 0, 0, 0, 257, 258, 7, 2, 0, 0, 258, 45, 1, 0, 0, 0, 259, 262, 5, 52, 0, 0, 260, 262, 3, 14, 7, 0, 261, 259, 1, 0, 0, 0, 261, 260, 1, 0, 0, 0, 262, 47, 1, 0, 0, 0, 263, 264, 5, 14, 0, 0, 264, 267, 3, 14, 7, 0, 265, 266, 5, 23, 0, 0, 266, 268, 5, 52, 0, 0, 267, 265, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 49, 1, 0, 0, 0, 269, 270, 5, 15, 0, 0, 270, 273, 3, 14, 7, 0, 271, 272, 5, 23, 0, 0, 272, 274, 5, 53, 0, 0, 273, 271, 1, 0, 0, 0, 273, 274, 1, 0, 0, 0, 274, 51, 1, 0, 0, 0, 275, 276, 5, 16, 0, 0, 276, 279, 3, 14, 7, 0, 277, 278, 5, 23, 0, 0, 278, 280, 5, 54, 0, 0, 279, 277, 1, 0, 0, 0, 279, 280, 1, 0, 0, 0, 280, 53, 1, 0, 0, 0, 281, 282, 5, 17, 0, 0, 282, 285, 3, 14, 7, 0, 283, 284, 5, 23, 0, 0, 284, 286, 5, 49, 0, 0, 285, 283, 1, 0, 0, 0, 285, 286, 1, 0, 0, 0, 286, 55, 1, 0, 0, 0, 287, 288, 5, 28, 0, 0, 288, 57, 1, 0, 0, 0, 289, 290, 7, 3, 0, 0, 290, 59, 1, 0, 0, 0, 291, 292, 7, 4, 0, 0, 292, 61, 1, 0, 0, 0, 30, 63, 67, 77, 83, 93, 96, 102, 111, 122, 133, 145, 152, 158, 160, 163, 169, 181, 187, 194, 210, 220, 226, 234, 240, 254, 261, 267, 273, 279, 285] \ No newline at end of file diff --git a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/Velvet.tokens b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/Velvet.tokens index 1fd07086b4..3c8e8941ac 100644 --- a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/Velvet.tokens +++ b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/Velvet.tokens @@ -1,101 +1,105 @@ -ABSTRACT=4 -ACONSTR=5 -ATTR=6 -ATTR_OP_EQUALS=7 -ATTR_OP_GREATER=8 -ATTR_OP_GREATER_EQ=9 -ATTR_OP_LESS=10 -ATTR_OP_LESS_EQ=11 -ATTR_OP_NOT_EQUALS=12 -BASEEXT=13 -BOOLEAN=14 -CINTERFACE=15 -COLON=16 -COMMA=17 -CONCEPT=18 -CONSTR=19 -CONSTRAINT=20 -DEF=21 -DESCRIPTION=22 -EMPTY=23 -END_C=24 -END_R=25 -EQ=26 -ESC_SEQ=27 -EXPONENT=28 -FEATURE=29 -FLOAT=30 -GROUP=31 -HEX_DIGIT=32 -ID=33 -IDPath=34 -IMPORT=35 -IMPORTINSTANCE=36 -IMPORTINTERFACE=37 -INT=38 -MANDATORY=39 -MINUS=40 -ML_COMMENT=41 -OCTAL_ESC=42 -ONEOF=43 -OPERAND=44 -OP_AND=45 -OP_EQUIVALENT=46 -OP_IMPLIES=47 -OP_NOT=48 -OP_OR=49 -OP_XOR=50 -PLUS=51 -SEMI=52 -SL_COMMENT=53 -SOMEOF=54 -START_C=55 -START_R=56 -STRING=57 -UNARYOP=58 -UNICODE_ESC=59 -USE=60 -VAR_BOOL=61 -VAR_FLOAT=62 -VAR_INT=63 -VAR_STRING=64 -WS=65 -'!'=48 -'!='=12 -'&&'=45 -'('=56 -')'=25 -'+'=51 -','=17 -'-'=40 -'->'=47 -':'=16 -';'=52 -'<'=10 -'<->'=46 -'<='=11 -'='=26 -'=='=7 -'>'=8 -'>='=9 -'abstract'=4 -'bool'=61 -'cinterface'=15 -'concept'=18 -'constraint'=20 -'description'=22 -'feature'=29 -'float'=62 -'import'=35 -'instance'=36 -'int'=63 -'interface'=37 -'mandatory'=39 -'oneOf'=43 -'someOf'=54 -'string'=64 -'use'=60 -'xor'=50 -'{'=55 -'||'=49 -'}'=24 +IMPORT=1 +MANDATORY=2 +ABSTRACT=3 +SOMEOF=4 +ONEOF=5 +CONCEPT=6 +CINTERFACE=7 +CONSTRAINT=8 +FEATURE=9 +USE=10 +IMPORTINSTANCE=11 +IMPORTINTERFACE=12 +DESCRIPTION=13 +VAR_INT=14 +VAR_FLOAT=15 +VAR_STRING=16 +VAR_BOOL=17 +SEMI=18 +START_C=19 +END_C=20 +START_R=21 +END_R=22 +EQ=23 +COMMA=24 +COLON=25 +PLUS=26 +MINUS=27 +OP_NOT=28 +OP_AND=29 +OP_OR=30 +OP_XOR=31 +OP_IMPLIES=32 +OP_EQUIVALENT=33 +ATTR_OP_EQUALS=34 +ATTR_OP_NOT_EQUALS=35 +ATTR_OP_GREATER=36 +ATTR_OP_LESS=37 +ATTR_OP_GREATER_EQ=38 +ATTR_OP_LESS_EQ=39 +EMPTY=40 +CONSTR=41 +ACONSTR=42 +BASEEXT=43 +DEF=44 +GROUP=45 +ATTR=46 +UNARYOP=47 +OPERAND=48 +BOOLEAN=49 +ID=50 +IDPath=51 +INT=52 +FLOAT=53 +STRING=54 +WS=55 +SL_COMMENT=56 +ML_COMMENT=57 +'import'=1 +'mandatory'=2 +'abstract'=3 +'someOf'=4 +'oneOf'=5 +'concept'=6 +'cinterface'=7 +'constraint'=8 +'feature'=9 +'use'=10 +'instance'=11 +'interface'=12 +'description'=13 +'int'=14 +'float'=15 +'string'=16 +'bool'=17 +';'=18 +'{'=19 +'}'=20 +'('=21 +')'=22 +'='=23 +','=24 +':'=25 +'+'=26 +'-'=27 +'!'=28 +'&&'=29 +'||'=30 +'xor'=31 +'->'=32 +'<->'=33 +'=='=34 +'!='=35 +'>'=36 +'<'=37 +'>='=38 +'<='=39 +'EMPTY'=40 +'CONSTR'=41 +'ACONSTR'=42 +'BASEEXT'=43 +'DEF'=44 +'GROUP'=45 +'ATTR'=46 +'UNARYOP'=47 +'OPERAND'=48 diff --git a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetBaseListener.java b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetBaseListener.java new file mode 100644 index 0000000000..47c1411446 --- /dev/null +++ b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetBaseListener.java @@ -0,0 +1,415 @@ +// Generated from Velvet.g4 by ANTLR 4.13.2 + +package de.ovgu.featureide.fm.core.io.velvet; + +import de.ovgu.featureide.fm.core.FMCorePlugin; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ErrorNode; +import org.antlr.v4.runtime.tree.TerminalNode; + +/** + * This class provides an empty implementation of {@link VelvetListener}, + * which can be extended to create a listener which only needs to handle a subset + * of the available methods. + */ +@SuppressWarnings("CheckReturnValue") +public class VelvetBaseListener implements VelvetListener { + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVelvetModel(VelvetParser.VelvetModelContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVelvetModel(VelvetParser.VelvetModelContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterImp(VelvetParser.ImpContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitImp(VelvetParser.ImpContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConcept(VelvetParser.ConceptContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConcept(VelvetParser.ConceptContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCinterface(VelvetParser.CinterfaceContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCinterface(VelvetParser.CinterfaceContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConceptBaseExt(VelvetParser.ConceptBaseExtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConceptBaseExt(VelvetParser.ConceptBaseExtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInstanceImports(VelvetParser.InstanceImportsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInstanceImports(VelvetParser.InstanceImportsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceImports(VelvetParser.InterfaceImportsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceImports(VelvetParser.InterfaceImportsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterName(VelvetParser.NameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitName(VelvetParser.NameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDefinitions(VelvetParser.DefinitionsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDefinitions(VelvetParser.DefinitionsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDefinition(VelvetParser.DefinitionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDefinition(VelvetParser.DefinitionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNonFeatureDefinition(VelvetParser.NonFeatureDefinitionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNonFeatureDefinition(VelvetParser.NonFeatureDefinitionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterUse(VelvetParser.UseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitUse(VelvetParser.UseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFeature(VelvetParser.FeatureContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFeature(VelvetParser.FeatureContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFeatureGroup(VelvetParser.FeatureGroupContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFeatureGroup(VelvetParser.FeatureGroupContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGroupType(VelvetParser.GroupTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGroupType(VelvetParser.GroupTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDescription(VelvetParser.DescriptionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDescription(VelvetParser.DescriptionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstraint(VelvetParser.ConstraintContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstraint(VelvetParser.ConstraintContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstraintDefinition(VelvetParser.ConstraintDefinitionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstraintDefinition(VelvetParser.ConstraintDefinitionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstraintOperand(VelvetParser.ConstraintOperandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstraintOperand(VelvetParser.ConstraintOperandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAttribute(VelvetParser.AttributeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAttribute(VelvetParser.AttributeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAttributeConstraint(VelvetParser.AttributeConstraintContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAttributeConstraint(VelvetParser.AttributeConstraintContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAttribNumExpr(VelvetParser.AttribNumExprContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAttribNumExpr(VelvetParser.AttribNumExprContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAttribOperator(VelvetParser.AttribOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAttribOperator(VelvetParser.AttribOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAttribNumInstance(VelvetParser.AttribNumInstanceContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAttribNumInstance(VelvetParser.AttribNumInstanceContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterIntAttribute(VelvetParser.IntAttributeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitIntAttribute(VelvetParser.IntAttributeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFloatAttribute(VelvetParser.FloatAttributeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFloatAttribute(VelvetParser.FloatAttributeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStringAttribute(VelvetParser.StringAttributeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStringAttribute(VelvetParser.StringAttributeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBoolAttribute(VelvetParser.BoolAttributeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBoolAttribute(VelvetParser.BoolAttributeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterUnaryOp(VelvetParser.UnaryOpContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitUnaryOp(VelvetParser.UnaryOpContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBinaryOp(VelvetParser.BinaryOpContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBinaryOp(VelvetParser.BinaryOpContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAttribRelation(VelvetParser.AttribRelationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAttribRelation(VelvetParser.AttribRelationContext ctx) { } + + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitTerminal(TerminalNode node) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitErrorNode(ErrorNode node) { } +} \ No newline at end of file diff --git a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetBaseVisitor.java b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetBaseVisitor.java new file mode 100644 index 0000000000..fb0b640bb3 --- /dev/null +++ b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetBaseVisitor.java @@ -0,0 +1,235 @@ +// Generated from Velvet.g4 by ANTLR 4.13.2 + +package de.ovgu.featureide.fm.core.io.velvet; + +import de.ovgu.featureide.fm.core.FMCorePlugin; +import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; + +/** + * This class provides an empty implementation of {@link VelvetVisitor}, + * which can be extended to create a visitor which only needs to handle a subset + * of the available methods. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +@SuppressWarnings("CheckReturnValue") +public class VelvetBaseVisitor extends AbstractParseTreeVisitor implements VelvetVisitor { + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitVelvetModel(VelvetParser.VelvetModelContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitImp(VelvetParser.ImpContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitConcept(VelvetParser.ConceptContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitCinterface(VelvetParser.CinterfaceContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitConceptBaseExt(VelvetParser.ConceptBaseExtContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitInstanceImports(VelvetParser.InstanceImportsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitInterfaceImports(VelvetParser.InterfaceImportsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitName(VelvetParser.NameContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitDefinitions(VelvetParser.DefinitionsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitDefinition(VelvetParser.DefinitionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitNonFeatureDefinition(VelvetParser.NonFeatureDefinitionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitUse(VelvetParser.UseContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFeature(VelvetParser.FeatureContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFeatureGroup(VelvetParser.FeatureGroupContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitGroupType(VelvetParser.GroupTypeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitDescription(VelvetParser.DescriptionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitConstraint(VelvetParser.ConstraintContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitConstraintDefinition(VelvetParser.ConstraintDefinitionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitConstraintOperand(VelvetParser.ConstraintOperandContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAttribute(VelvetParser.AttributeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAttributeConstraint(VelvetParser.AttributeConstraintContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAttribNumExpr(VelvetParser.AttribNumExprContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAttribOperator(VelvetParser.AttribOperatorContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAttribNumInstance(VelvetParser.AttribNumInstanceContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitIntAttribute(VelvetParser.IntAttributeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFloatAttribute(VelvetParser.FloatAttributeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitStringAttribute(VelvetParser.StringAttributeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitBoolAttribute(VelvetParser.BoolAttributeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitUnaryOp(VelvetParser.UnaryOpContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitBinaryOp(VelvetParser.BinaryOpContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAttribRelation(VelvetParser.AttribRelationContext ctx) { return visitChildren(ctx); } +} \ No newline at end of file diff --git a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetFeatureModelFormat.java b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetFeatureModelFormat.java index 4728a9d56f..812842066c 100644 --- a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetFeatureModelFormat.java +++ b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetFeatureModelFormat.java @@ -1,5 +1,7 @@ /* FeatureIDE - A Framework for Feature-Oriented Software Development * Copyright (C) 2005-2019 FeatureIDE team, University of Magdeburg, Germany + * 2025 Malte Grave, VaSiCS, LIT CPS Lab, Johannes Kepler University, Linz + * 2025 Oleksandr Kudriavchenko, VaSiCS, LIT CPS Lab, Johannes Kepler University, Linz * * This file is part of FeatureIDE. * @@ -20,33 +22,27 @@ */ package de.ovgu.featureide.fm.core.io.velvet; -import static de.ovgu.featureide.fm.core.localization.StringTable.ILLEGAL_SYNTAX_IN_LINE; -import static de.ovgu.featureide.fm.core.localization.StringTable.IN_FILE; -import static de.ovgu.featureide.fm.core.localization.StringTable.IS_ALREADY_IN_USE_; -import static de.ovgu.featureide.fm.core.localization.StringTable.IS_ALREADY_USED_; -import static de.ovgu.featureide.fm.core.localization.StringTable.NO_SUCH_ATTRIBUTE_DEFINED_; -import static de.ovgu.featureide.fm.core.localization.StringTable.THE_PARENT_MODEL; -import static de.ovgu.featureide.fm.core.localization.StringTable.THE_VARIABLE_NAME; -import static de.ovgu.featureide.fm.core.localization.StringTable.USE; -import static java.lang.String.format; - import java.io.ByteArrayInputStream; import java.io.File; -import java.io.FilenameFilter; import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; -import java.util.Collection; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.HashMap; import java.util.HashSet; +import java.util.Iterator; import java.util.LinkedList; -import java.util.ListIterator; +import java.util.List; +import java.util.Map; import java.util.Map.Entry; -import org.antlr.runtime.ANTLRInputStream; -import org.antlr.runtime.CommonTokenStream; -import org.antlr.runtime.RecognitionException; -import org.antlr.runtime.tree.CommonErrorNode; -import org.antlr.runtime.tree.Tree; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.CharStreams; +import org.antlr.v4.runtime.CommonTokenStream; +import org.antlr.v4.runtime.RecognitionException; +import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.runtime.tree.Tree; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; @@ -54,14 +50,9 @@ import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; -import org.prop4j.And; -import org.prop4j.Choose; import org.prop4j.Equals; import org.prop4j.Implies; -import org.prop4j.Literal; import org.prop4j.Node; -import org.prop4j.Not; -import org.prop4j.Or; import de.ovgu.featureide.fm.core.Logger; import de.ovgu.featureide.fm.core.ModelMarkerHandler; @@ -69,11 +60,8 @@ import de.ovgu.featureide.fm.core.base.IConstraint; import de.ovgu.featureide.fm.core.base.IFeature; import de.ovgu.featureide.fm.core.base.IFeatureModel; -import de.ovgu.featureide.fm.core.base.IFeatureModelFactory; import de.ovgu.featureide.fm.core.base.IFeatureStructure; -import de.ovgu.featureide.fm.core.base.impl.DefaultFeatureModelFactory; import de.ovgu.featureide.fm.core.base.impl.FMFactoryManager; -import de.ovgu.featureide.fm.core.base.impl.FMFormatManager; import de.ovgu.featureide.fm.core.base.impl.MultiConstraint; import de.ovgu.featureide.fm.core.base.impl.MultiFeature; import de.ovgu.featureide.fm.core.base.impl.MultiFeatureModel; @@ -81,16 +69,12 @@ import de.ovgu.featureide.fm.core.base.impl.MultiFeatureModelFactory; import de.ovgu.featureide.fm.core.constraint.Equation; import de.ovgu.featureide.fm.core.constraint.FeatureAttribute; -import de.ovgu.featureide.fm.core.constraint.Reference; -import de.ovgu.featureide.fm.core.constraint.ReferenceType; -import de.ovgu.featureide.fm.core.constraint.RelationOperator; +import de.ovgu.featureide.fm.core.constraint.FeatureAttributeMap; import de.ovgu.featureide.fm.core.constraint.WeightedTerm; import de.ovgu.featureide.fm.core.io.AFeatureModelFormat; import de.ovgu.featureide.fm.core.io.Problem; import de.ovgu.featureide.fm.core.io.ProblemList; import de.ovgu.featureide.fm.core.io.UnsupportedModelException; -import de.ovgu.featureide.fm.core.io.manager.FeatureModelManager; -import de.ovgu.featureide.fm.core.io.manager.SimpleFileHandler; /** * Reads / Writes feature models in the Velvet format. @@ -98,15 +82,15 @@ * @author Sebastian Krieter * @author Matthias Strauss * @author Reimar Schroeter + * @author Malte Grave + * @author Oleksandr Kudriavchenko */ -public class VelvetFeatureModelFormat extends AFeatureModelFormat { +public class VelvetFeatureModelFormat extends AFeatureModelFormat implements IVelvetFeatureModelFormat { public static boolean IS_USED_AS_API = false; public static final String ID = PluginID.PLUGIN_ID + ".format.fm." + VelvetFeatureModelFormat.class.getSimpleName(); public static final String FILE_EXTENSION = "velvet"; - - protected File featureModelFile; - + File featureModelFile; private static final String[] SYMBOLS = { "!", "&&", "||", "->", "<->", ", ", "choose", "atleast", "atmost" }; private static final String NEWLINE = System.getProperty("line.separator", "\n"); private final StringBuilder sb = new StringBuilder(); @@ -119,8 +103,8 @@ public VelvetFeatureModelFormat(VelvetFeatureModelFormat oldFormat) { /** * If true an interface will be created. Otherwise it is named CONCEPT */ - private boolean isInterface = false; + private boolean isInterface = false; private boolean useLongNames; public VelvetFeatureModelFormat() { @@ -137,12 +121,35 @@ public boolean supportsWrite() { return true; } + void collectAttributes(Map attributesMap, FeatureAttributeMap attributes, String type) { + for (final String key : attributes.getKeys()) { + for (final FeatureAttribute attribute : attributes.getAttributes(key)) { + + attributesMap.put(String.format("%s %s = %s;", type, attribute.getAttributeName(), attribute.getValue()), attribute.getFeatureName()); + } + } + } + @Override public String write(IFeatureModel object) { + final int depth = 0; + if (object instanceof MultiFeatureModel) { extFeatureModel = (MultiFeatureModel) object; isInterface = isInterface || extFeatureModel.isInterface(); } + final Map attributes = new HashMap<>(); + final FeatureAttributeMap intAttrs = extFeatureModel.getIntegerAttributes(); + // final FeatureAttributeMap floatAttrs = extFeatureModel.getIntegerAttributes(); + final FeatureAttributeMap boolAttrs = extFeatureModel.getBooleanAttributes(); + final FeatureAttributeMap strAttrs = extFeatureModel.getStringAttributes(); + List attributeConstraints = null; + collectAttributes(attributes, intAttrs, "int"); + collectAttributes(attributes, boolAttrs, "bool"); + collectAttributes(attributes, strAttrs, "string"); + + final List constraints = new ArrayList<>(extFeatureModel.getConstraints()); + final IFeatureStructure root = object.getStructure().getRoot(); sb.delete(0, sb.length()); @@ -207,55 +214,52 @@ public String write(IFeatureModel object) { sb.append(NEWLINE); if ((extFeatureModel != null) && !isInterface) { + + attributeConstraints = extFeatureModel.getAttributConstraints(); for (final IFeatureStructure child : root.getChildren()) { - writeNewDefined(child, 1); + writeNewDefined(child, 1, constraints, attributes, attributeConstraints); } - for (final IConstraint constraint : object.getConstraints()) { + for (final IConstraint constraint : constraints) { if (((MultiConstraint) constraint).getType() == MultiFeature.TYPE_INTERN) { - sb.append("\tconstraint "); - sb.append(constraint.getNode().toString(SYMBOLS)); - sb.append(";"); - sb.append(NEWLINE); + writeConstraint(constraint, depth); } } } else { - writeFeatureGroup(root, 1); + writeFeatureGroup(root, 1, constraints, attributes, attributeConstraints); for (final IConstraint constraint : object.getConstraints()) { - sb.append("\tconstraint "); - sb.append(constraint.getNode().toString(SYMBOLS)); - sb.append(";"); - sb.append(NEWLINE); + writeConstraint(constraint, depth); } } sb.append("}"); - return sb.toString(); } - private void writeFeatureGroup(IFeatureStructure root, int depth) { + private void writeFeatureGroup(IFeatureStructure root, int depth, List constraints, Map attributes, + List attributeConstraints) { if (root.isAnd()) { for (final IFeatureStructure feature : root.getChildren()) { - writeNewDefined(feature, depth + 1); + writeNewDefined(feature, depth + 1, constraints, attributes, attributeConstraints); } } else if (root.isOr()) { writeTab(depth + 1); sb.append("someOf {"); sb.append(NEWLINE); for (final IFeatureStructure feature : root.getChildren()) { - writeFeature(feature, depth + 2); + writeFeature(feature, depth + 2, constraints, attributes, attributeConstraints); } writeTab(depth + 1); sb.append("}"); + sb.append(NEWLINE); } else if (root.isAlternative()) { writeTab(depth + 1); sb.append("oneOf {"); sb.append(NEWLINE); for (final IFeatureStructure f : root.getChildren()) { - writeFeature(f, depth + 2); + writeFeature(f, depth + 2, constraints, attributes, attributeConstraints); } writeTab(depth + 1); sb.append("}"); @@ -263,7 +267,12 @@ private void writeFeatureGroup(IFeatureStructure root, int depth) { } } - private void writeFeature(IFeatureStructure feature, int depth) { + private void writeFeature(IFeatureStructure feature, int depth, List constraints, Map attributes, + List attributeConstraints) { + final String featureName = feature.getFeature().getName().toString(); + if (!usedFeatures.add(featureName)) { + return; + } writeTab(depth); if (feature.isAbstract()) { sb.append("abstract "); @@ -272,11 +281,53 @@ private void writeFeature(IFeatureStructure feature, int depth) { sb.append("mandatory "); } sb.append("feature "); - sb.append(feature.getFeature().getName()); + sb.append(featureName); + final String description = feature.getFeature().getProperty().getDescription(); + + final List childConstraints = new ArrayList<>(); + final List childAttributeConstraints = new ArrayList<>(); + + final Iterator iteratorC = constraints.iterator(); + while (iteratorC.hasNext()) { + final IConstraint constraint = iteratorC.next(); + final Node constraintNode = constraint.getNode(); + final Node[] children = ((Implies) constraintNode).getChildren(); + final Node parentFeature = children[0]; + if ((parentFeature.toString().equals(featureName))) { + childConstraints.add(constraint); + iteratorC.remove(); + } + } + + final Iterator iteratorAC = attributeConstraints.iterator(); + while (iteratorAC.hasNext()) { + String parentFeature = null; + final Equation attributeConstraint = iteratorAC.next(); + + for (final WeightedTerm term : attributeConstraint.getWeightedTerms()) { + /* + * go through all terms in equation if there is one, that has a parent which is not present in attributes, we see, that it is equations parent + */ + if (!attributes.containsValue(term.getReference().toString())) { + parentFeature = term.getReference().toString(); + break; + } + } + + if (featureName.equals(parentFeature)) { + childAttributeConstraints.add(attributeConstraint); + iteratorAC.remove(); + } + + } + final boolean hasDescription = (description != null) && !description.isEmpty(); + final boolean hasConstraints = (childConstraints != null) && !childConstraints.isEmpty(); + final boolean hasAttributeConstraints = (childAttributeConstraints != null) && !childAttributeConstraints.isEmpty(); + final boolean hasAttributes = attributes.containsValue(featureName); - if ((feature.getChildrenCount() == 0) && !hasDescription) { + if ((feature.getChildrenCount() == 0) && !hasDescription && !hasConstraints && !hasAttributes && !hasAttributeConstraints) { sb.append(";"); } else { sb.append(" {"); @@ -288,35 +339,105 @@ private void writeFeature(IFeatureStructure feature, int depth) { sb.append("\";"); sb.append(NEWLINE); } + if (hasAttributes) { + for (final Entry attr : attributes.entrySet()) { + if (attr.getValue().equals(featureName)) { + writeTab(depth + 1); + sb.append(attr.getKey()); + sb.append(NEWLINE); + } + } + } + if (hasAttributeConstraints) { + for (final Equation attributeConstraint : childAttributeConstraints) { + + writeAttributeConstraint(attributes, attributeConstraint, featureName, depth); + } + } + if (hasConstraints) { + for (final IConstraint constraint : childConstraints) { + + writeConstraint(constraint, depth); - writeFeatureGroup(feature, depth); + } + } + writeFeatureGroup(feature, depth, constraints, attributes, attributeConstraints); writeTab(depth); sb.append("}"); } sb.append(NEWLINE); + } // TODO fix write for inherited feature models private void + + private void writeConstraint(IConstraint constraint, int depth) { + writeTab(depth + 1); + sb.append("constraint "); + final Node constraintNode = ((Implies) constraint.getNode()).getChildren()[1]; + + final Node[] children = ((Equals) constraintNode).getChildren(); + final Node name = children[0]; + final Node value = children[1]; + sb.append(name.toString(SYMBOLS)); + sb.append(" = "); + sb.append(value.toString(SYMBOLS)); + sb.append(";"); + sb.append(NEWLINE); + } + + private void writeAttributeConstraint(Map attributes, Equation attributeConstraint, String featureName, int depth) { + writeTab(depth + 1); + sb.append("constraint "); + sb.append("ID = "); + final List sortedTerms = attributeConstraint.getWeightedTerms(); + sortedTerms.sort(Comparator.comparing(WeightedTerm::isPositive).reversed()); + boolean first = true; + for (final WeightedTerm term : sortedTerms) { + if (!term.isPositive()) { + sb.append(" - "); + } else if (!first) { + sb.append(" + "); + } + + final String name = term.getReference().getAttributeName(); + if (!name.equals("attributeName")) { + sb.append(name); + + } else { + sb.append(term.getWeight()); + } + first = false; + + } + sb.append(" "); + sb.append(attributeConstraint.getOperator()); + sb.append(" 0;"); + sb.append(NEWLINE); + } - // TODO fix write for inherited feature models - private void writeNewDefined(IFeatureStructure child2, int depth) { + private void writeNewDefined(IFeatureStructure child2, int depth, List constraints, Map attributes, + List attributeConstraints) { final IFeature feature = child2.getFeature(); if (feature instanceof MultiFeature) { final MultiFeature extFeature = (MultiFeature) feature; - - if ((extFeature.getType() == MultiFeature.TYPE_INSTANCE) || (extFeature.getType() == MultiFeature.TYPE_INTERFACE)) { - if (usedVariables.add(extFeature.getExternalModelName())) { + if (((extFeature.getType() == MultiFeature.TYPE_INSTANCE) || (extFeature.getType() == MultiFeature.TYPE_INTERFACE))) { + if ((usedVariables.add(extFeature.getExternalModelName()))) { writeTab(depth); - sb.append(USE); + sb.append("use "); sb.append(extFeature.getExternalModelName()); sb.append(";"); sb.append(NEWLINE); + } - } else if (extFeature.getType() == MultiFeature.TYPE_INTERN) { - writeFeature(child2, 1); + writeFeature(child2, depth, constraints, attributes, attributeConstraints); + + } else if ((extFeature.getType() == MultiFeature.TYPE_INTERN)) { + + writeFeature(child2, depth, constraints, attributes, attributeConstraints); } } for (final IFeatureStructure child : child2.getChildren()) { - writeNewDefined(child, depth); + writeNewDefined(child, depth, constraints, attributes, attributeConstraints); } } @@ -332,9 +453,8 @@ public ProblemList read(IFeatureModel object, CharSequence source) { factory = MultiFeatureModelFactory.getInstance(); extFeatureModel = (MultiFeatureModel) object; if (extFeatureModel != null) { - featureModelFile = extFeatureModel.getSourceFile().toFile(); + featureModelFile = extFeatureModel.getSourceFile().toFile(); // .toAbsolutePath(); } - final ByteArrayInputStream inputstr = new ByteArrayInputStream(source.toString().getBytes(Charset.availableCharsets().get("UTF-8"))); try { parseInputStream(inputstr); @@ -344,166 +464,25 @@ public ProblemList read(IFeatureModel object, CharSequence source) { return problemList; } - private static class ConstraintNode { - - private final Node computedNode; - private final Tree rawNode; - - public ConstraintNode(Node computedNode, Tree rawNode) { - this.computedNode = computedNode; - this.rawNode = rawNode; - } - } - - private static final int[] binaryOperators = - { VelvetParser.OP_OR, VelvetParser.OP_AND, VelvetParser.OP_XOR, VelvetParser.OP_IMPLIES, VelvetParser.OP_EQUIVALENT }; - private static final String[] paths = { "%s.velvet", "%s.xml", "MPL/%s.velvet", "MPL/%s.xml" }; - - private final LinkedList atrributeConstraintNodes = new LinkedList<>(); - private final LinkedList parentStack = new LinkedList<>(); - private final LinkedList constraintNodeList = new LinkedList<>(); - private final HashSet usedVariables = new HashSet<>(); - - // TODO - private final boolean velvetImport = false; - - private ModelMarkerHandler modelMarkerHandler; - private MultiFeatureModel extFeatureModel; - private String extFeatureModelName; - private boolean localSearch = false; - - /** - * Reads external model with the right FeatureModelReader. - * - * @param file file of feature model - * @return the feature model or null if error occurred - */ - private IFeatureModel readExternalModelFile(File file) { - return FeatureModelManager.load(file.toPath()); - } - - private boolean checkExternalModelFile(Tree curNode) { - if (localSearch) { - if (localSearch(curNode.getText()) == null) { - reportWarning(curNode, format("No model for %s could be found.", curNode.getText())); - return false; - } - return true; - } - if (getExternalModelFile(curNode.getText()) == null) { - reportWarning(curNode, format("No model for %s could be found.", curNode.getText())); - return false; - } - return true; - } - - private boolean checkInterfaceModelFile(Tree curNode) { - if (localSearch) { - if (localSearch(curNode.getText()) == null) { - reportWarning(curNode, format("No model for %s could be found.", curNode.getText())); - return false; - } - return true; - } - if (getInterfaceModelFile(curNode.getText()) == null) { - reportWarning(curNode, format("No interface for %s could be found.", curNode.getText())); - return false; - } - return true; - } - - private void copyChildnodes(final MultiFeatureModel targetModel, final IFeatureStructure targetParentNode, final IFeatureStructure sourceParentNode, - final String parentModelName, final String targetParentName, final int type) { - for (final IFeatureStructure sourceChildStructure : sourceParentNode.getChildren()) { - final MultiFeature feature; - if (velvetImport) { - feature = (MultiFeature) factory.createFeature(targetModel, sourceChildStructure.getFeature().getName()); - } else { - final String shortName = sourceChildStructure.getFeature().getName().replace(sourceParentNode.getFeature().getName() + ".", ""); - feature = (MultiFeature) factory.createFeature(targetModel, targetParentName + "." + shortName); - } - final IFeatureStructure targetChildStructure = feature.getStructure(); - targetChildStructure.setMandatory(sourceChildStructure.isMandatory()); - targetChildStructure.setAbstract(sourceChildStructure.isAbstract()); - targetChildStructure.setHidden(sourceChildStructure.isHidden()); - feature.setExternalModelName(parentModelName); - - targetChildStructure.setAND(sourceChildStructure.isAnd()); - targetChildStructure.setMultiple(sourceChildStructure.isMultiple()); - if (sourceChildStructure.isOr()) { - targetChildStructure.setOr(); - } - - targetModel.addFeature(feature); - targetParentNode.addChild(targetChildStructure); - feature.setType(type); - - if (sourceChildStructure.hasChildren()) { - copyChildnodes(targetModel, targetChildStructure, sourceChildStructure, parentModelName, feature.getName(), type); - } - } - } - - private static WeightedTerm createTerm(final int weight, final boolean rightSide, final boolean minus, final Reference reference) { - boolean positive = weight >= 0; - if (rightSide ^ minus) { - positive = !positive; - } - return new WeightedTerm(Math.abs(weight), positive, reference); - } - - private static LinkedList getChildren(final Tree root) { - final LinkedList children = new LinkedList<>(); - - final int childCount = root.getChildCount(); - for (int i = 0; i < childCount; i++) { - children.add(root.getChild(i)); - } - return children; - } - - private static void updateConstraintNode(Node curNode, String parentModelname, String rootName, IFeatureModel targetModel) { - if (curNode instanceof Literal) { - final Literal literal = (Literal) curNode; - if (literal.var.equals(rootName)) { - literal.var = parentModelname; - } else { - // if fully qualified name - - IFeature feature = targetModel.getFeature(literal.var.toString().replace(rootName, parentModelname)); - if (feature == null) { - // else - feature = targetModel.getFeature(parentModelname + "." + literal.var.toString()); - } - literal.var = feature.getName(); - } - } else { - for (final Node child : curNode.getChildren()) { - updateConstraintNode(child, parentModelname, rootName, targetModel); - } - } - } - protected synchronized void parseInputStream(final InputStream inputStream) throws UnsupportedModelException { - ANTLRInputStream antlrInputStream = null; + CharStream charStream = null; try { - antlrInputStream = new ANTLRInputStream(inputStream); + charStream = CharStreams.fromStream(inputStream); } catch (final IOException e) { Logger.logError(e); throw new UnsupportedModelException("Error while reading model!", 0); } - final VelvetParser parser = new VelvetParser(new CommonTokenStream(new VelvetLexer(antlrInputStream))); - Tree root = null; + init(); + + final VelvetLexer lexer = new VelvetLexer(charStream); + final CommonTokenStream tokens = new CommonTokenStream(lexer); + final VelvetParser parser = new VelvetParser(tokens); + final VelvetVisitorImpl visitor = new VelvetVisitorImpl(this); try { - init(); - root = (Tree) parser.velvetModel().getTree(); - if (root == null) { - throw new UnsupportedModelException("Error while parsing model!", 0); - } - checkTree(root); - parseModel(root); - parseAttributeConstraints(); + final ParseTree tree = parser.velvetModel(); + visitor.visit(tree); + } catch (RecognitionException | VelvetParser.InternalSyntaxException e) { RecognitionException re; if (e instanceof VelvetParser.InternalSyntaxException) { @@ -511,887 +490,198 @@ protected synchronized void parseInputStream(final InputStream inputStream) thro } else { re = (RecognitionException) e; } - Logger.logError(re); - final String internalMessage = parser.getErrorMessage(re, parser.getTokenNames()); - final String errorMessage = ILLEGAL_SYNTAX_IN_LINE + re.line + ":" + re.charPositionInLine + " (" + internalMessage + ")"; - final UnsupportedModelException unsupportedModelException = new UnsupportedModelException(errorMessage, re.line); - unsupportedModelException.addSuppressed(re); - throw unsupportedModelException; - } - } - - private MultiFeature addFeature(final IFeature parent, final String featureName, final boolean isMandatory, final boolean isAbstract, - final boolean isHidden) { - final MultiFeature newFeature = (MultiFeature) factory.createFeature(extFeatureModel, featureName); - newFeature.getStructure().setMandatory(isMandatory); - newFeature.getStructure().setAbstract(isAbstract); - newFeature.getStructure().setHidden(isHidden); - - final IFeature orgFeature = extFeatureModel.getFeature(featureName); - if ((orgFeature != null) && (orgFeature instanceof MultiFeature)) { - return (MultiFeature) orgFeature; - } else { - extFeatureModel.addFeature(newFeature); - parent.getStructure().addChild(newFeature.getStructure()); - newFeature.setNewDefined(true); - return newFeature; - } - } - - private String checkNode(Node curNode) { - if (curNode instanceof Literal) { - final Literal literal = (Literal) curNode; - final String varString = literal.var.toString(); - if (extFeatureModel.getFeature(varString) == null) { - return literal.var.toString(); - } - } else { - for (final Node child : curNode.getChildren()) { - final String childRet = checkNode(child); - if (childRet != null) { - return childRet; - } - } - } - return null; - } - - private IFeatureModel getExternalFeatureModel(Tree curNode) { - final File modelFile = getExternalModelFile(curNode.getText()); - if (modelFile == null) { - reportWarning(curNode, format("No model for %s could be found.", curNode.getText())); - return null; - } - return readModel(modelFile, curNode); - } - - private IFeatureModel getExternalFeatureModel(String modelName, Tree curNode) { - final File modelFile = getExternalModelFile(modelName); - if (modelFile == null) { - return null; - } - return readModel(modelFile, curNode); - } - - private IFeatureModel getInterfaceFeatureModel(String modelName, Tree curNode) { - final File modelFile = getInterfaceModelFile(modelName); - if (modelFile == null) { - return null; - } - return readModel(modelFile, curNode); - } - - private IFeatureModel readModel(File modelFile, Tree curNode) { - IFeatureModel fm = null; - if (IS_USED_AS_API) { - fm = readExternalModelFileAPI(modelFile); - } else { - fm = readExternalModelFile(modelFile); - } - if (fm == null) { - reportWarning(curNode, format("External model for %s could not be read.", curNode.getText())); - return null; - } - return fm; - } - - private IFeatureModel readExternalModelFileAPI(File file) { - final IFeatureModel fm = new MultiFeatureModelFactory().create(); - fm.setSourceFile(file.toPath()); - SimpleFileHandler.load(file.toPath(), fm, FMFormatManager.getInstance()); - return fm; - } - - /** - * Search for the right File to include etc. The following search path is used:
  1. ./NAME.velvet
  2. ./NAME.xml
  3. ./MPL/NAME.velvet
  4. - *
  5. /NAME_AS_PROJECT/model.xml
- * - * @param name the name of file or project - * @return File object if found else null - */ - private File getExternalModelFile(String name) { - if (!extFeatureModel.getImports().isEmpty() && !IS_USED_AS_API) { - for (final String path : extFeatureModel.getImports()) { - final IProject project = getProject(); - if (!path.endsWith(name)) { - continue; - } - if (project != null) { - IResource res = project.getFile(path + ".xml"); - if ((res != null) && res.exists()) { - return res.getLocation().toFile(); - } - res = project.getFile(path + ".velvet"); - if ((res != null) && res.exists()) { - return res.getLocation().toFile(); - } - } - } - } - - if (localSearch || IS_USED_AS_API) { - return localSearch(name); - } - File returnFile = null; - - // local search - IProject project = getProject(); - if (project != null) { - for (int i = 0; i < paths.length; i++) { - final IResource res = project.findMember(format(paths[i], name)); - if (res != null) { - returnFile = res.getLocation().toFile(); - if (returnFile.equals(featureModelFile)) { - returnFile = null; - } else { - break; - } - } - } - } - - // external search - if (returnFile == null) { - // if could not get current project or could not find file in current - // project assume the name is the project name - project = ResourcesPlugin.getWorkspace().getRoot().getProject(name); - if (project.isAccessible()) { - returnFile = project.getFile("model.xml").getLocation().toFile(); - if (returnFile.equals(featureModelFile)) { - return null; - } - } else { - Logger.logWarning(format("Project %s is not accessible.", name)); - } - } - - if ((returnFile == null) || !returnFile.exists() || !returnFile.canRead()) { - return null; - } - return returnFile; - } + Logger.logError(re); + /* + * TODO newer parser doesn't have those methods. final String internalMessage = parser.getErrorMessage(re, parser.getTokenNames()); final String + * errorMessage = "ILLEGAL_SYNTAX_IN_LINE" + re.line + ":" + re.charPositionInLine + " (" + internalMessage + ")"; final UnsupportedModelException + * unsupportedModelException = new UnsupportedModelException(errorMessage, re.line); unsupportedModelException.addSuppressed(re); throw + * unsupportedModelException; + */ - private File getInterfaceModelFile(String name) { - if (localSearch) { - return localSearch(name); - } - File returnFile = null; - final IProject project = getProject(); - if (project != null) { - final IResource res = project.findMember(format("Interfaces/%s.velvet", name)); - if (res != null) { - returnFile = res.getLocation().toFile(); - } } - return returnFile; } - private File localSearch(final String name) { - if (featureModelFile != null) { - final File searchDir = new File(featureModelFile.getParentFile(), "MPL"); - if (searchDir != null) { - final File[] files = searchDir.listFiles(new FilenameFilter() { - - @Override - public boolean accept(File dir, String fileName) { - final int index = fileName.lastIndexOf('.'); - return (index > 0) && fileName.substring(0, index).equals(name) && fileName.substring(index + 1).matches("xml|velvet"); - } - }); - if ((files != null) && (files.length > 0)) { - return files[0]; - } - } - } - return null; - } + private static final int[] binaryOperators = + { VelvetParser.OP_OR, VelvetParser.OP_AND, VelvetParser.OP_XOR, VelvetParser.OP_IMPLIES, VelvetParser.OP_EQUIVALENT }; + private static final String[] paths = { "%s.velvet", "%s.xml", "MPL/%s.velvet", "MPL/%s.xml" }; + private final LinkedList atrributeConstraintNodes = new LinkedList<>(); + private final LinkedList parentStack = new LinkedList<>(); + private final HashSet usedVariables = new HashSet<>(); // TODO private final + private final HashSet usedFeatures = new HashSet<>(); + boolean velvetImport = false; + private ModelMarkerHandler modelMarkerHandler; + MultiFeatureModel extFeatureModel; + String extFeatureModelName; + private boolean localSearch = false; /** * Returns the eclipse project of the file with the textual representation of the feature model * * @return the project of the file or null if not known + * @throws IOException */ - private IProject getProject() { + + @Override + public IProject getProject() { if ((featureModelFile == null) || IS_USED_AS_API) { return null; } - final IWorkspace workspace = ResourcesPlugin.getWorkspace(); - IPath filePath; + IPath filePath = null; try { - filePath = Path.fromOSString(featureModelFile.getCanonicalPath()); - final IFile file = workspace.getRoot().getFileForLocation(filePath); - if ((null == file) || !file.exists()) { - return workspace.getRoot().getFile(filePath).getProject(); - } - return file.getProject(); + filePath = new Path(featureModelFile.getCanonicalPath()); } catch (final IOException e) { - Logger.logError(e); - return null; + // TODO Auto-generated catch block + e.printStackTrace(); + } + final IFile file = workspace.getRoot().getFileForLocation(filePath); + if ((null == file) || !file.exists()) { + return workspace.getRoot().getFile(filePath).getProject(); } + return file.getProject(); } /** * Initializes all variables. */ private void init() { - atrributeConstraintNodes.clear(); - parentStack.clear(); - constraintNodeList.clear(); + usedFeatures.clear(); usedVariables.clear(); - - extFeatureModel.reset(); - // TODO Layout - // extFeatureModel.getLayout().showHiddenFeatures(true); - // extFeatureModel.getLayout().verticalLayout(false); + extFeatureModel.reset(); // TODO Layout if (getProject() != null) { modelMarkerHandler = new ModelMarkerHandler(getProject().getFile(featureModelFile.getName())); modelMarkerHandler.deleteAllModelMarkers(); } - extFeatureModelName = null; - extFeatureModel.setInterface(false); - - // TODO MPL: Hack for local search - localSearch = (featureModelFile != null) && (featureModelFile.getParentFile() != null) && featureModelFile.getParentFile().getName().equals("velvet"); - } - - private void parseAttribute(final Tree root, final IFeature parent) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - - final String name = checkTree(nodeList.poll()).getText(); - final Tree valueNode = nodeList.poll(); - - switch (valueNode.getType()) { - case VelvetParser.FLOAT: - break; - case VelvetParser.INT: - extFeatureModel.addAttribute(parent.getName(), name, Integer.parseInt(valueNode.getText())); - break; - case VelvetParser.BOOLEAN: - extFeatureModel.addAttribute(parent.getName(), name, Boolean.parseBoolean(valueNode.getText())); - break; - case VelvetParser.STRING: - final String valueNodeText = valueNode.getText(); - extFeatureModel.addAttribute(parent.getName(), name, valueNodeText.substring(1, valueNodeText.length() - 1)); - break; - default: - reportSyntaxError(valueNode); - } - } - - private void parseAttributeConstraints() throws UnsupportedModelException, RecognitionException { - while (!atrributeConstraintNodes.isEmpty()) { - final LinkedList nodeList = getChildren(atrributeConstraintNodes.poll()); - - final LinkedList weightedTerms = new LinkedList<>(); - RelationOperator relationOperator = null; - boolean minus = false; - int degree = 0; - - while (!nodeList.isEmpty()) { - final Tree curNode = nodeList.poll(); - - switch (curNode.getType()) { - case VelvetParser.ID: - case VelvetParser.IDPath: - final String attributeName = curNode.getText(); - - final Collection> attributes = extFeatureModel.getIntegerAttributes().getAttributes(attributeName); - - if (attributes == null) { - throw new UnsupportedModelException(curNode.getLine() + ":" + curNode.getCharPositionInLine() + NO_SUCH_ATTRIBUTE_DEFINED_, - curNode.getLine()); - } - - for (final FeatureAttribute attr : attributes) { - weightedTerms.add(createTerm(attr.getValue(), relationOperator != null, minus, - new Reference(attr.getFeatureName(), ReferenceType.FEATURE, attributeName))); - } - - break; - // case VelvetParser.FLOAT: - // break; - case VelvetParser.INT: - final int value = Integer.parseInt(curNode.getText()); - if ((relationOperator == null) ^ minus) { - degree -= value; - } else { - degree += value; - } - break; - case VelvetParser.PLUS: - minus = false; - break; - case VelvetParser.MINUS: - minus = true; - break; - case VelvetParser.ATTR_OP_EQUALS: - relationOperator = RelationOperator.EQUAL; - break; - case VelvetParser.ATTR_OP_NOT_EQUALS: - relationOperator = RelationOperator.NOT_EQUAL; - break; - case VelvetParser.ATTR_OP_GREATER: - relationOperator = RelationOperator.GREATER; - break; - case VelvetParser.ATTR_OP_GREATER_EQ: - relationOperator = RelationOperator.GREATER_EQUAL; - break; - case VelvetParser.ATTR_OP_LESS: - relationOperator = RelationOperator.LESS; - break; - case VelvetParser.ATTR_OP_LESS_EQ: - relationOperator = RelationOperator.LESS_EQUAL; - break; - default: - reportSyntaxError(curNode); - } - } - final Equation equation = new Equation(weightedTerms, relationOperator, degree); - extFeatureModel.addAttributeConstraint(equation); - } - } - - private void parseConcept(final Tree root) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - - while (!nodeList.isEmpty()) { - final Tree curNode = nodeList.poll(); - - switch (curNode.getType()) { - case VelvetParser.ID: - extFeatureModelName = checkTree(curNode).getText(); - - final MultiFeature rootFeature = (MultiFeature) factory.createFeature(extFeatureModel, extFeatureModelName); - rootFeature.getStructure().setAbstract(true); - rootFeature.getStructure().setMandatory(true); - - extFeatureModel.addFeature(rootFeature); - extFeatureModel.getStructure().setRoot(rootFeature.getStructure()); - parentStack.push(rootFeature); - - break; - case VelvetParser.BASEEXT: - useLongNames = true; - parseInheritance(curNode); - break; - case VelvetParser.IMPORTINSTANCE: - useLongNames = true; - parseInstanceImport(curNode); - break; - case VelvetParser.IMPORTINTERFACE: - useLongNames = true; - parseInterfaceImport(curNode); - break; - case VelvetParser.DEF: - parseDefinitions(curNode); - break; - default: - reportSyntaxError(curNode); - } - } - - for (final ConstraintNode constraintNode : constraintNodeList) { - if (!IS_USED_AS_API) { - final String nameError = checkNode(constraintNode.computedNode); - if (nameError == null) { - extFeatureModel.addConstraint(factory.createConstraint(extFeatureModel, constraintNode.computedNode)); - } else { - reportWarning(constraintNode.rawNode, format("There is no feature with the name %s.", nameError)); - } - } else { - extFeatureModel.addConstraint(factory.createConstraint(extFeatureModel, constraintNode.computedNode)); - } - } - } - - private void parseConstraint(final Tree root, final IFeature parent) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - - while (!nodeList.isEmpty()) { - final Tree curNode = nodeList.poll(); - - switch (curNode.getType()) { - case VelvetParser.ID: - // name = curNode.getText(); - break; - case VelvetParser.CONSTR: - Node newNode = parseConstraint_rec(curNode); - if (useLongNames) { - newNode = new Implies(new Literal(parent.getName()), newNode); - } - constraintNodeList.add(new ConstraintNode(newNode, curNode)); - break; - case VelvetParser.ACONSTR: - atrributeConstraintNodes.add(curNode); - break; - default: - reportSyntaxError(curNode); - } - } - } - - private Node parseConstraint_rec(final Tree root) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - final LinkedList nodes = new LinkedList<>(); - final LinkedList operators = new LinkedList<>(); - final LinkedList unaryOp = new LinkedList<>(); - Node n = null; - - while (!nodeList.isEmpty()) { - final Tree curNode = nodeList.poll(); - - switch (curNode.getType()) { - case VelvetParser.UNARYOP: - unaryOp.push(curNode.getChild(0).getType()); - break; - case VelvetParser.CONSTR: - n = parseConstraint_rec(curNode); - break; - case VelvetParser.OPERAND: - n = new Literal(curNode.getChild(0).getText()); - break; - default: - operators.add(curNode.getType()); - } - - if (n != null) { - while (!unaryOp.isEmpty()) { - switch (unaryOp.pop()) { - case VelvetParser.OP_NOT: - n = new Not(n); - } - } - nodes.add(n); - n = null; - } - } - if (!operators.isEmpty()) { - for (final int operator : binaryOperators) { - final ListIterator nodesIt = nodes.listIterator(); - for (final ListIterator opIt = operators.listIterator(); opIt.hasNext();) { - final Node operand1 = nodesIt.next(); - if (opIt.next() == operator) { - opIt.remove(); - nodesIt.remove(); - final Node operand2 = nodesIt.next(); - switch (operator) { - case VelvetParser.OP_AND: - nodesIt.set(new And(operand1, operand2)); - break; - case VelvetParser.OP_OR: - nodesIt.set(new Or(operand1, operand2)); - break; - case VelvetParser.OP_XOR: - nodesIt.set(new Choose(1, operand1, operand2)); - break; - case VelvetParser.OP_IMPLIES: - nodesIt.set(new Implies(operand1, operand2)); - break; - case VelvetParser.OP_EQUIVALENT: - nodesIt.set(new Equals(operand1, operand2)); - break; - } - nodesIt.previous(); - } - } - } - } - if (nodes.isEmpty()) { - return null; - } - - return nodes.getFirst(); + extFeatureModel.setInterface(false); // TODO MPL: Hack for local search + localSearch = (featureModelFile != null) && (featureModelFile.getParent() != null) && featureModelFile.getName().equals("velvet"); } - private void parseDefinitions(final Tree root) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - - final IFeature parentFeature = parentStack.pop(); - // parentFeature.getStructure().setAnd(); - - while (!nodeList.isEmpty()) { - final Tree curNode = nodeList.poll(); - - switch (curNode.getType()) { - // Feature - case VelvetParser.FEATURE: - parseFeature(curNode, parentFeature); - break; - // Feature-Group - case VelvetParser.GROUP: - parseFeatureGroup(curNode, parentFeature); - break; - // Constraint - case VelvetParser.CONSTRAINT: - parseConstraint(curNode, parentFeature); - break; - // Use - case VelvetParser.USE: - parseUse(curNode, parentFeature); - break; - // Attribute - case VelvetParser.ATTR: - parseAttribute(curNode, parentFeature); - break; - case VelvetParser.DESCRIPTION: - parseDescription(curNode, parentFeature); - break; - case VelvetParser.EMPTY: - break; - default: - reportSyntaxError(curNode); - } - } - - } - - private void parseDescription(Tree root, IFeature parent) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - final Tree valueNode = nodeList.poll(); - - switch (valueNode.getType()) { - case VelvetParser.STRING: - final String valueNodeText = valueNode.getText(); - parent.getProperty().setDescription(valueNodeText.substring(1, valueNodeText.length() - 1).replace("\\\"", "\"")); - break; - default: - reportSyntaxError(valueNode); - } - } - - // XXX Quickfix for issue #383, useLongNames should only be active for MPL models - private void parseFeature(final Tree root, IFeature parent) throws RecognitionException { - final LinkedList childList = getChildren(root); - final String featureName; - if (extFeatureModel.isInterface()) { - featureName = checkTree(childList.poll()).getText(); - } else { - final String childName = checkTree(childList.poll()).getText(); - if (useLongNames && !childName.startsWith(parent.getName())) { - featureName = parent.getName() + "." + childName; - } else { - featureName = childName; - } - } - boolean isMandatory = false, isAbstract = false, moreDefinitions = false; - - Tree childNode = null; - while (!childList.isEmpty() && !moreDefinitions) { - childNode = childList.poll(); - - switch (childNode.getType()) { - case VelvetParser.MANDATORY: - isMandatory = true; - break; - case VelvetParser.ABSTRACT: - isAbstract = true; - break; - case VelvetParser.DEF: - moreDefinitions = true; - break; - default: - reportSyntaxError(childNode); - } - } - - final MultiFeature newFeature = addFeature(parent, featureName, isMandatory, isAbstract, false); - if (moreDefinitions) { - parentStack.push(newFeature); - parseDefinitions(childNode); - } - } - - private void parseFeatureGroup(final Tree root, final IFeature parent) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - - while (!nodeList.isEmpty()) { - final Tree curNode = nodeList.poll(); - - switch (curNode.getType()) { - case VelvetParser.SOMEOF: - parent.getStructure().setOr(); - break; - case VelvetParser.ONEOF: - parent.getStructure().setAlternative(); - break; - case VelvetParser.FEATURE: - parseFeature(curNode, parent); - break; - default: - reportSyntaxError(curNode); - } - } - } - - private void parseInheritance(final Tree root) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - - while (!nodeList.isEmpty()) { - final Tree curNode = nodeList.poll(); - final String parentModelName = checkTree(curNode).getText(); - - final IFeatureModel fm = getExternalFeatureModel(curNode); - if (fm == null) { - return; - } - - if (!extFeatureModel.addInheritance(parentModelName, parentModelName, null)) { - reportWarning(curNode, THE_PARENT_MODEL + parentModelName + IS_ALREADY_USED_); - return; - } - addExternalFeatures(fm, parentModelName, extFeatureModel.getStructure().getRoot(), MultiFeature.TYPE_INHERITED); - } + private void reportWarning(Tree curNode, String message) { + /* + * if (modelMarkerHandler != null) { modelMarkerHandler.createModelMarker(message, org.eclipse.core.resources.IMarker.SEVERITY_WARNING, + * curNode.getLine()); } Logger.logWarning(message + " (at line " + curNode.getLine() + ((featureModelFile != null) ? IN_FILE + + * featureModelFile.getName() : "") + ": \"" + curNode.getText() + "\")"); + */ } - private void addExternalFeatures(IFeatureModel sourceModel, String sourceModelName, IFeatureStructure targetParentFeature, int type) { - if (sourceModel instanceof MultiFeatureModel) { - for (final UsedModel usedModel : ((MultiFeatureModel) sourceModel).getExternalModels().values()) { - extFeatureModel.addExternalModel(new UsedModel(usedModel, sourceModelName)); - } - } - - final UsedModel usedModel = extFeatureModel.getExternalModel(sourceModelName); - if (usedModel != null) { - usedModel.setPrefix(targetParentFeature.getFeature().getName() + "." + sourceModelName); - } - - final IFeatureStructure instanceRoot = sourceModel.getStructure().getRoot(); - - String connectorName = ""; - if (type == MultiFeature.TYPE_INHERITED) { - connectorName = targetParentFeature.getFeature().getName(); - } else { - connectorName = (targetParentFeature.isRoot() && targetParentFeature.getFeature().getName().equals(sourceModelName)) - ? targetParentFeature.getFeature().getName() : targetParentFeature.getFeature().getName() + "." + sourceModelName; - } - final MultiFeature connector = addFeature(targetParentFeature.getFeature(), connectorName, true, true, instanceRoot.isHidden()); - connector.setType(type); - connector.setExternalModelName(sourceModelName); - if (instanceRoot.isAlternative()) { - connector.getStructure().setAlternative(); - } else if (instanceRoot.isOr()) { - connector.getStructure().setOr(); - } - - copyChildnodes(extFeatureModel, connector.getStructure(), instanceRoot, sourceModelName, connectorName, type); - - for (final IConstraint constraint : sourceModel.getConstraints()) { - final Node constraintNode = constraint.getNode(); - updateConstraintNode(constraintNode, connectorName, instanceRoot.getFeature().getName(), extFeatureModel); - final MultiConstraint newConstraint = (MultiConstraint) factory.createConstraint(extFeatureModel, constraintNode); - newConstraint.setType(type); - extFeatureModel.addConstraint(newConstraint); - } + private void reportSyntaxError(Tree curNode) throws RecognitionException { + /* + * final RecognitionException ex = new RecognitionException(null, null, null); ex.line = 1; ex.charPositionInLine = 1; throwException(ex, curNode); + */ } - private void parseInterfaceImport(final Tree root) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - - while (!nodeList.isEmpty()) { - final Tree idNode = checkTree(nodeList.poll()); - final String interfaceName = idNode.getText(); - final Tree nameNode = checkTree(nodeList.poll()); - final String varName = nameNode.getText(); - - if (checkInterfaceModelFile(idNode)) { - if (!extFeatureModel.addInterface(interfaceName, varName, null)) { - reportWarning(idNode, THE_VARIABLE_NAME + varName + IS_ALREADY_IN_USE_); - } - } - } + private void throwException(RecognitionException e, Tree curNode) throws RecognitionException { + /* + * if (modelMarkerHandler != null) { final String text = ""; if (curNode != null) { curNode.getText(); } final String message = ILLEGAL_SYNTAX_IN_LINE + + * e.line + ":" + e.charPositionInLine + ". " + text; modelMarkerHandler.createModelMarker(message, org.eclipse.core.resources.IMarker.SEVERITY_ERROR, + * e.line); } throw e; + */ } - private void parseInstanceImport(final Tree root) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - - while (!nodeList.isEmpty()) { - final Tree idNode = checkTree(nodeList.poll()); - final String interfaceName = idNode.getText(); - final Tree nameNode = checkTree(nodeList.poll()); - final String varName = nameNode.getText(); - - if (checkExternalModelFile(idNode)) { - if (!extFeatureModel.addInstance(interfaceName, varName, null)) { - reportWarning(idNode, THE_VARIABLE_NAME + varName + IS_ALREADY_IN_USE_); - } - } - } + @Override + public String getSuffix() { + return FILE_EXTENSION; } - private void parseModel(final Tree root) throws RecognitionException { - final LinkedList nodeList = getChildren(root); - while (!nodeList.isEmpty()) { - final Tree curNode = nodeList.poll(); - switch (curNode.getType()) { - case VelvetParser.IMPORT: - useLongNames = true; - parseImport(curNode); - break; - case VelvetParser.CONCEPT: - parseConcept(curNode); - break; - case VelvetParser.CINTERFACE: - extFeatureModel.setInterface(true); - parseConcept(curNode); - break; - case VelvetParser.EOF: - if (curNode.getTokenStartIndex() > -1) { - break; - } - default: - reportSyntaxError(curNode); - } - } - if (!IS_USED_AS_API) { - final IFeatureModelFactory mappingModelFactory = DefaultFeatureModelFactory.getInstance(); - final IFeatureModel mappingModel = mappingModelFactory.create(); - final IFeatureStructure rootFeature = mappingModelFactory.createFeature(mappingModel, "MPL").getStructure(); - rootFeature.setAnd(); - rootFeature.setAbstract(true); - rootFeature.setMandatory(true); - - final LinkedList possibleProjects = new LinkedList<>(); - final IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects(); - for (int i = 0; i < projects.length; i++) { - final IProject project = projects[i]; - if (project.isAccessible()) { - possibleProjects.add(project.getName()); - } - } - - for (final Entry parameter : extFeatureModel.getExternalModels().entrySet()) { - if (parameter.getValue().getType() == MultiFeature.TYPE_INTERFACE) { - final IFeatureStructure parameterFeature = mappingModelFactory.createFeature(mappingModel, parameter.getKey()).getStructure(); - parameterFeature.setOr(); - parameterFeature.setAbstract(true); - parameterFeature.setMandatory(true); - rootFeature.addChild(parameterFeature); - - for (final String projectName : possibleProjects) { - final IFeatureStructure projectFeature = - mappingModelFactory.createFeature(mappingModel, parameterFeature.getFeature().getName() + "." + projectName).getStructure(); - projectFeature.setAbstract(false); - projectFeature.setMandatory(false); - parameterFeature.addChild(projectFeature); - } - } - } - - mappingModel.getStructure().setRoot(rootFeature); - extFeatureModel.setMappingModel(mappingModel); - } + @Override + public VelvetFeatureModelFormat getInstance() { + return new VelvetFeatureModelFormat(this); } - private void parseImport(Tree curNode) throws RecognitionException { - final LinkedList nodeList = getChildren(curNode); - while (!nodeList.isEmpty()) { - final Tree node = nodeList.poll(); - final String text = node.getText(); - extFeatureModel.addImport(text); - } + @Override + public String getId() { + return ID; } - private void parseUse(Tree root, IFeature parent) throws RecognitionException { - final LinkedList childList = getChildren(root); - final Tree useNameNode = checkTree(childList.poll()); - final String varName = useNameNode.getText(); - - if (!usedVariables.add(varName)) { - reportWarning(useNameNode, format("The Variable with the name %s was already used in this model.", varName)); - return; - } - - final UsedModel usedModel = extFeatureModel.getExternalModel(varName); - if (usedModel == null) { - reportWarning(useNameNode, format("No variable with the name %s found.", varName)); - return; - } - - switch (usedModel.getType()) { - case MultiFeature.TYPE_INTERFACE: - final IFeatureModel interfaceModel = getInterfaceFeatureModel(usedModel.getModelName(), useNameNode); - if (interfaceModel == null) { - return; - } - addExternalFeatures(interfaceModel, varName, parent.getStructure(), MultiFeature.TYPE_INTERFACE); - break; - case MultiFeature.TYPE_INSTANCE: - final IFeatureModel instanceModel = getExternalFeatureModel(usedModel.getModelName(), useNameNode); - if (instanceModel == null) { - return; - } - addExternalFeatures(instanceModel, varName, parent.getStructure(), MultiFeature.TYPE_INSTANCE); - break; - default: - reportWarning(useNameNode, format("The variable with the name %s is no interface or instance.", varName)); - } + @Override + public String getName() { + return "Velvet"; } - private void reportWarning(Tree curNode, String message) { - if (modelMarkerHandler != null) { - modelMarkerHandler.createModelMarker(message, org.eclipse.core.resources.IMarker.SEVERITY_WARNING, curNode.getLine()); + @Override + public boolean initExtension() { + if (super.initExtension()) { + FMFactoryManager.getInstance().getDefaultFactoryWorkspace().assignID(VelvetFeatureModelFormat.ID, MultiFeatureModelFactory.ID); + return true; } - Logger.logWarning(message + " (at line " + curNode.getLine() + ((featureModelFile != null) ? IN_FILE + featureModelFile.getName() : "") + ": \"" - + curNode.getText() + "\")"); + return false; } - private Tree checkTree(Tree root) throws RecognitionException { - if (root instanceof CommonErrorNode) { - throwException(((CommonErrorNode) root).trappedException, root); - } - return root; + /* + * (non-Javadoc) + * @see de.ovgu.featureide.fm.core.io.velvet.IVelvetFeatureModelFormat#getExtFeatureModelName() + */ + @Override + public String getExtFeatureModelName() { + return extFeatureModelName; } - private void reportSyntaxError(Tree curNode) throws RecognitionException { - checkTree(curNode); - final RecognitionException ex = new RecognitionException(); - ex.line = 1; - ex.charPositionInLine = 1; - throwException(ex, curNode); + /* + * (non-Javadoc) + * @see de.ovgu.featureide.fm.core.io.velvet.IVelvetFeatureModelFormat#getExtFeatureModel() + */ + @Override + public MultiFeatureModel getExtFeatureModel() { + return extFeatureModel; } - private void throwException(RecognitionException e, Tree curNode) throws RecognitionException { - if (modelMarkerHandler != null) { - final String text = ""; + /* + * (non-Javadoc) + * @see de.ovgu.featureide.fm.core.io.velvet.IVelvetFeatureModelFormat#setExtFeatureModelName(java.lang.String) + */ + @Override + public void setExtFeatureModelName(String name) { + extFeatureModelName = name; - if (curNode != null) { - curNode.getText(); - } - final String message = ILLEGAL_SYNTAX_IN_LINE + e.line + ":" + e.charPositionInLine + ". " + text; - modelMarkerHandler.createModelMarker(message, org.eclipse.core.resources.IMarker.SEVERITY_ERROR, e.line); - } - throw e; } + /* + * (non-Javadoc) + * @see de.ovgu.featureide.fm.core.io.velvet.IVelvetFeatureModelFormat#getFeatureModelFile() + */ @Override - public String getSuffix() { - return FILE_EXTENSION; + public File getFeatureModelFile() { + + return featureModelFile; } + /* + * (non-Javadoc) + * @see de.ovgu.featureide.fm.core.io.velvet.IVelvetFeatureModelFormat#isVelvetImport() + */ @Override - public VelvetFeatureModelFormat getInstance() { - return new VelvetFeatureModelFormat(this); + public boolean isVelvetImport() { + return velvetImport; } + /* + * (non-Javadoc) + * @see de.ovgu.featureide.fm.core.io.velvet.IVelvetFeatureModelFormat#getLocalSearch() + */ @Override - public String getId() { - return ID; + public boolean getLocalSearch() { + return localSearch; } + /* + * (non-Javadoc) + * @see de.ovgu.featureide.fm.core.io.velvet.IVelvetFeatureModelFormat#getIsUsedAsAPI() + */ @Override - public String getName() { - return "Velvet"; + public boolean getIsUsedAsAPI() { + // TODO Auto-generated method stub + return IS_USED_AS_API; } + /* + * (non-Javadoc) + * @see de.ovgu.featureide.fm.core.io.velvet.IVelvetFeatureModelFormat#getPaths() + */ @Override - public boolean initExtension() { - if (super.initExtension()) { - FMFactoryManager.getInstance().getDefaultFactoryWorkspace().assignID(VelvetFeatureModelFormat.ID, MultiFeatureModelFactory.ID); - } - return false; + public String[] getPaths() { + return paths; } } diff --git a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetLexer.interp b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetLexer.interp new file mode 100644 index 0000000000..f9258fe5d9 --- /dev/null +++ b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetLexer.interp @@ -0,0 +1,193 @@ +token literal names: +null +'import' +'mandatory' +'abstract' +'someOf' +'oneOf' +'concept' +'cinterface' +'constraint' +'feature' +'use' +'instance' +'interface' +'description' +'int' +'float' +'string' +'bool' +';' +'{' +'}' +'(' +')' +'=' +',' +':' +'+' +'-' +'!' +'&&' +'||' +'xor' +'->' +'<->' +'==' +'!=' +'>' +'<' +'>=' +'<=' +'EMPTY' +'CONSTR' +'ACONSTR' +'BASEEXT' +'DEF' +'GROUP' +'ATTR' +'UNARYOP' +'OPERAND' +null +null +null +null +null +null +null +null +null + +token symbolic names: +null +IMPORT +MANDATORY +ABSTRACT +SOMEOF +ONEOF +CONCEPT +CINTERFACE +CONSTRAINT +FEATURE +USE +IMPORTINSTANCE +IMPORTINTERFACE +DESCRIPTION +VAR_INT +VAR_FLOAT +VAR_STRING +VAR_BOOL +SEMI +START_C +END_C +START_R +END_R +EQ +COMMA +COLON +PLUS +MINUS +OP_NOT +OP_AND +OP_OR +OP_XOR +OP_IMPLIES +OP_EQUIVALENT +ATTR_OP_EQUALS +ATTR_OP_NOT_EQUALS +ATTR_OP_GREATER +ATTR_OP_LESS +ATTR_OP_GREATER_EQ +ATTR_OP_LESS_EQ +EMPTY +CONSTR +ACONSTR +BASEEXT +DEF +GROUP +ATTR +UNARYOP +OPERAND +BOOLEAN +ID +IDPath +INT +FLOAT +STRING +WS +SL_COMMENT +ML_COMMENT + +rule names: +IMPORT +MANDATORY +ABSTRACT +SOMEOF +ONEOF +CONCEPT +CINTERFACE +CONSTRAINT +FEATURE +USE +IMPORTINSTANCE +IMPORTINTERFACE +DESCRIPTION +VAR_INT +VAR_FLOAT +VAR_STRING +VAR_BOOL +SEMI +START_C +END_C +START_R +END_R +EQ +COMMA +COLON +PLUS +MINUS +OP_NOT +OP_AND +OP_OR +OP_XOR +OP_IMPLIES +OP_EQUIVALENT +ATTR_OP_EQUALS +ATTR_OP_NOT_EQUALS +ATTR_OP_GREATER +ATTR_OP_LESS +ATTR_OP_GREATER_EQ +ATTR_OP_LESS_EQ +EMPTY +CONSTR +ACONSTR +BASEEXT +DEF +GROUP +ATTR +UNARYOP +OPERAND +BOOLEAN +ID +IDPath +INT +FLOAT +STRING +EXPONENT +HEX_DIGIT +ESC_SEQ +OCTAL_ESC +UNICODE_ESC +WS +SL_COMMENT +ML_COMMENT + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[4, 0, 57, 522, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 384, 8, 48, 1, 49, 1, 49, 5, 49, 388, 8, 49, 10, 49, 12, 49, 391, 9, 49, 1, 50, 1, 50, 1, 50, 4, 50, 396, 8, 50, 11, 50, 12, 50, 397, 1, 51, 4, 51, 401, 8, 51, 11, 51, 12, 51, 402, 1, 52, 4, 52, 406, 8, 52, 11, 52, 12, 52, 407, 1, 52, 1, 52, 5, 52, 412, 8, 52, 10, 52, 12, 52, 415, 9, 52, 1, 52, 3, 52, 418, 8, 52, 1, 52, 1, 52, 4, 52, 422, 8, 52, 11, 52, 12, 52, 423, 1, 52, 3, 52, 427, 8, 52, 1, 52, 4, 52, 430, 8, 52, 11, 52, 12, 52, 431, 1, 52, 3, 52, 435, 8, 52, 1, 53, 1, 53, 1, 53, 5, 53, 440, 8, 53, 10, 53, 12, 53, 443, 9, 53, 1, 53, 1, 53, 1, 54, 1, 54, 3, 54, 449, 8, 54, 1, 54, 4, 54, 452, 8, 54, 11, 54, 12, 54, 453, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 3, 56, 463, 8, 56, 1, 56, 1, 56, 3, 56, 467, 8, 56, 1, 57, 1, 57, 1, 57, 1, 57, 3, 57, 473, 8, 57, 1, 57, 1, 57, 1, 57, 3, 57, 478, 8, 57, 1, 57, 1, 57, 3, 57, 482, 8, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 4, 59, 492, 8, 59, 11, 59, 12, 59, 493, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 502, 8, 60, 10, 60, 12, 60, 505, 9, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 5, 61, 513, 8, 61, 10, 61, 12, 61, 516, 9, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 514, 0, 62, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 0, 111, 0, 113, 0, 115, 0, 117, 0, 119, 55, 121, 56, 123, 57, 1, 0, 10, 4, 0, 45, 45, 65, 90, 95, 95, 97, 122, 5, 0, 45, 45, 48, 57, 65, 90, 95, 95, 97, 122, 2, 0, 34, 34, 92, 92, 2, 0, 69, 69, 101, 101, 2, 0, 43, 43, 45, 45, 3, 0, 48, 57, 65, 70, 97, 102, 5, 0, 98, 98, 102, 102, 110, 110, 114, 114, 116, 116, 2, 0, 39, 39, 92, 92, 3, 0, 9, 10, 13, 13, 32, 32, 2, 0, 10, 10, 13, 13, 543, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 1, 125, 1, 0, 0, 0, 3, 132, 1, 0, 0, 0, 5, 142, 1, 0, 0, 0, 7, 151, 1, 0, 0, 0, 9, 158, 1, 0, 0, 0, 11, 164, 1, 0, 0, 0, 13, 172, 1, 0, 0, 0, 15, 183, 1, 0, 0, 0, 17, 194, 1, 0, 0, 0, 19, 202, 1, 0, 0, 0, 21, 206, 1, 0, 0, 0, 23, 215, 1, 0, 0, 0, 25, 225, 1, 0, 0, 0, 27, 237, 1, 0, 0, 0, 29, 241, 1, 0, 0, 0, 31, 247, 1, 0, 0, 0, 33, 254, 1, 0, 0, 0, 35, 259, 1, 0, 0, 0, 37, 261, 1, 0, 0, 0, 39, 263, 1, 0, 0, 0, 41, 265, 1, 0, 0, 0, 43, 267, 1, 0, 0, 0, 45, 269, 1, 0, 0, 0, 47, 271, 1, 0, 0, 0, 49, 273, 1, 0, 0, 0, 51, 275, 1, 0, 0, 0, 53, 277, 1, 0, 0, 0, 55, 279, 1, 0, 0, 0, 57, 281, 1, 0, 0, 0, 59, 284, 1, 0, 0, 0, 61, 287, 1, 0, 0, 0, 63, 291, 1, 0, 0, 0, 65, 294, 1, 0, 0, 0, 67, 298, 1, 0, 0, 0, 69, 301, 1, 0, 0, 0, 71, 304, 1, 0, 0, 0, 73, 306, 1, 0, 0, 0, 75, 308, 1, 0, 0, 0, 77, 311, 1, 0, 0, 0, 79, 314, 1, 0, 0, 0, 81, 320, 1, 0, 0, 0, 83, 327, 1, 0, 0, 0, 85, 335, 1, 0, 0, 0, 87, 343, 1, 0, 0, 0, 89, 347, 1, 0, 0, 0, 91, 353, 1, 0, 0, 0, 93, 358, 1, 0, 0, 0, 95, 366, 1, 0, 0, 0, 97, 383, 1, 0, 0, 0, 99, 385, 1, 0, 0, 0, 101, 392, 1, 0, 0, 0, 103, 400, 1, 0, 0, 0, 105, 434, 1, 0, 0, 0, 107, 436, 1, 0, 0, 0, 109, 446, 1, 0, 0, 0, 111, 455, 1, 0, 0, 0, 113, 466, 1, 0, 0, 0, 115, 481, 1, 0, 0, 0, 117, 483, 1, 0, 0, 0, 119, 491, 1, 0, 0, 0, 121, 497, 1, 0, 0, 0, 123, 508, 1, 0, 0, 0, 125, 126, 5, 105, 0, 0, 126, 127, 5, 109, 0, 0, 127, 128, 5, 112, 0, 0, 128, 129, 5, 111, 0, 0, 129, 130, 5, 114, 0, 0, 130, 131, 5, 116, 0, 0, 131, 2, 1, 0, 0, 0, 132, 133, 5, 109, 0, 0, 133, 134, 5, 97, 0, 0, 134, 135, 5, 110, 0, 0, 135, 136, 5, 100, 0, 0, 136, 137, 5, 97, 0, 0, 137, 138, 5, 116, 0, 0, 138, 139, 5, 111, 0, 0, 139, 140, 5, 114, 0, 0, 140, 141, 5, 121, 0, 0, 141, 4, 1, 0, 0, 0, 142, 143, 5, 97, 0, 0, 143, 144, 5, 98, 0, 0, 144, 145, 5, 115, 0, 0, 145, 146, 5, 116, 0, 0, 146, 147, 5, 114, 0, 0, 147, 148, 5, 97, 0, 0, 148, 149, 5, 99, 0, 0, 149, 150, 5, 116, 0, 0, 150, 6, 1, 0, 0, 0, 151, 152, 5, 115, 0, 0, 152, 153, 5, 111, 0, 0, 153, 154, 5, 109, 0, 0, 154, 155, 5, 101, 0, 0, 155, 156, 5, 79, 0, 0, 156, 157, 5, 102, 0, 0, 157, 8, 1, 0, 0, 0, 158, 159, 5, 111, 0, 0, 159, 160, 5, 110, 0, 0, 160, 161, 5, 101, 0, 0, 161, 162, 5, 79, 0, 0, 162, 163, 5, 102, 0, 0, 163, 10, 1, 0, 0, 0, 164, 165, 5, 99, 0, 0, 165, 166, 5, 111, 0, 0, 166, 167, 5, 110, 0, 0, 167, 168, 5, 99, 0, 0, 168, 169, 5, 101, 0, 0, 169, 170, 5, 112, 0, 0, 170, 171, 5, 116, 0, 0, 171, 12, 1, 0, 0, 0, 172, 173, 5, 99, 0, 0, 173, 174, 5, 105, 0, 0, 174, 175, 5, 110, 0, 0, 175, 176, 5, 116, 0, 0, 176, 177, 5, 101, 0, 0, 177, 178, 5, 114, 0, 0, 178, 179, 5, 102, 0, 0, 179, 180, 5, 97, 0, 0, 180, 181, 5, 99, 0, 0, 181, 182, 5, 101, 0, 0, 182, 14, 1, 0, 0, 0, 183, 184, 5, 99, 0, 0, 184, 185, 5, 111, 0, 0, 185, 186, 5, 110, 0, 0, 186, 187, 5, 115, 0, 0, 187, 188, 5, 116, 0, 0, 188, 189, 5, 114, 0, 0, 189, 190, 5, 97, 0, 0, 190, 191, 5, 105, 0, 0, 191, 192, 5, 110, 0, 0, 192, 193, 5, 116, 0, 0, 193, 16, 1, 0, 0, 0, 194, 195, 5, 102, 0, 0, 195, 196, 5, 101, 0, 0, 196, 197, 5, 97, 0, 0, 197, 198, 5, 116, 0, 0, 198, 199, 5, 117, 0, 0, 199, 200, 5, 114, 0, 0, 200, 201, 5, 101, 0, 0, 201, 18, 1, 0, 0, 0, 202, 203, 5, 117, 0, 0, 203, 204, 5, 115, 0, 0, 204, 205, 5, 101, 0, 0, 205, 20, 1, 0, 0, 0, 206, 207, 5, 105, 0, 0, 207, 208, 5, 110, 0, 0, 208, 209, 5, 115, 0, 0, 209, 210, 5, 116, 0, 0, 210, 211, 5, 97, 0, 0, 211, 212, 5, 110, 0, 0, 212, 213, 5, 99, 0, 0, 213, 214, 5, 101, 0, 0, 214, 22, 1, 0, 0, 0, 215, 216, 5, 105, 0, 0, 216, 217, 5, 110, 0, 0, 217, 218, 5, 116, 0, 0, 218, 219, 5, 101, 0, 0, 219, 220, 5, 114, 0, 0, 220, 221, 5, 102, 0, 0, 221, 222, 5, 97, 0, 0, 222, 223, 5, 99, 0, 0, 223, 224, 5, 101, 0, 0, 224, 24, 1, 0, 0, 0, 225, 226, 5, 100, 0, 0, 226, 227, 5, 101, 0, 0, 227, 228, 5, 115, 0, 0, 228, 229, 5, 99, 0, 0, 229, 230, 5, 114, 0, 0, 230, 231, 5, 105, 0, 0, 231, 232, 5, 112, 0, 0, 232, 233, 5, 116, 0, 0, 233, 234, 5, 105, 0, 0, 234, 235, 5, 111, 0, 0, 235, 236, 5, 110, 0, 0, 236, 26, 1, 0, 0, 0, 237, 238, 5, 105, 0, 0, 238, 239, 5, 110, 0, 0, 239, 240, 5, 116, 0, 0, 240, 28, 1, 0, 0, 0, 241, 242, 5, 102, 0, 0, 242, 243, 5, 108, 0, 0, 243, 244, 5, 111, 0, 0, 244, 245, 5, 97, 0, 0, 245, 246, 5, 116, 0, 0, 246, 30, 1, 0, 0, 0, 247, 248, 5, 115, 0, 0, 248, 249, 5, 116, 0, 0, 249, 250, 5, 114, 0, 0, 250, 251, 5, 105, 0, 0, 251, 252, 5, 110, 0, 0, 252, 253, 5, 103, 0, 0, 253, 32, 1, 0, 0, 0, 254, 255, 5, 98, 0, 0, 255, 256, 5, 111, 0, 0, 256, 257, 5, 111, 0, 0, 257, 258, 5, 108, 0, 0, 258, 34, 1, 0, 0, 0, 259, 260, 5, 59, 0, 0, 260, 36, 1, 0, 0, 0, 261, 262, 5, 123, 0, 0, 262, 38, 1, 0, 0, 0, 263, 264, 5, 125, 0, 0, 264, 40, 1, 0, 0, 0, 265, 266, 5, 40, 0, 0, 266, 42, 1, 0, 0, 0, 267, 268, 5, 41, 0, 0, 268, 44, 1, 0, 0, 0, 269, 270, 5, 61, 0, 0, 270, 46, 1, 0, 0, 0, 271, 272, 5, 44, 0, 0, 272, 48, 1, 0, 0, 0, 273, 274, 5, 58, 0, 0, 274, 50, 1, 0, 0, 0, 275, 276, 5, 43, 0, 0, 276, 52, 1, 0, 0, 0, 277, 278, 5, 45, 0, 0, 278, 54, 1, 0, 0, 0, 279, 280, 5, 33, 0, 0, 280, 56, 1, 0, 0, 0, 281, 282, 5, 38, 0, 0, 282, 283, 5, 38, 0, 0, 283, 58, 1, 0, 0, 0, 284, 285, 5, 124, 0, 0, 285, 286, 5, 124, 0, 0, 286, 60, 1, 0, 0, 0, 287, 288, 5, 120, 0, 0, 288, 289, 5, 111, 0, 0, 289, 290, 5, 114, 0, 0, 290, 62, 1, 0, 0, 0, 291, 292, 5, 45, 0, 0, 292, 293, 5, 62, 0, 0, 293, 64, 1, 0, 0, 0, 294, 295, 5, 60, 0, 0, 295, 296, 5, 45, 0, 0, 296, 297, 5, 62, 0, 0, 297, 66, 1, 0, 0, 0, 298, 299, 5, 61, 0, 0, 299, 300, 5, 61, 0, 0, 300, 68, 1, 0, 0, 0, 301, 302, 5, 33, 0, 0, 302, 303, 5, 61, 0, 0, 303, 70, 1, 0, 0, 0, 304, 305, 5, 62, 0, 0, 305, 72, 1, 0, 0, 0, 306, 307, 5, 60, 0, 0, 307, 74, 1, 0, 0, 0, 308, 309, 5, 62, 0, 0, 309, 310, 5, 61, 0, 0, 310, 76, 1, 0, 0, 0, 311, 312, 5, 60, 0, 0, 312, 313, 5, 61, 0, 0, 313, 78, 1, 0, 0, 0, 314, 315, 5, 69, 0, 0, 315, 316, 5, 77, 0, 0, 316, 317, 5, 80, 0, 0, 317, 318, 5, 84, 0, 0, 318, 319, 5, 89, 0, 0, 319, 80, 1, 0, 0, 0, 320, 321, 5, 67, 0, 0, 321, 322, 5, 79, 0, 0, 322, 323, 5, 78, 0, 0, 323, 324, 5, 83, 0, 0, 324, 325, 5, 84, 0, 0, 325, 326, 5, 82, 0, 0, 326, 82, 1, 0, 0, 0, 327, 328, 5, 65, 0, 0, 328, 329, 5, 67, 0, 0, 329, 330, 5, 79, 0, 0, 330, 331, 5, 78, 0, 0, 331, 332, 5, 83, 0, 0, 332, 333, 5, 84, 0, 0, 333, 334, 5, 82, 0, 0, 334, 84, 1, 0, 0, 0, 335, 336, 5, 66, 0, 0, 336, 337, 5, 65, 0, 0, 337, 338, 5, 83, 0, 0, 338, 339, 5, 69, 0, 0, 339, 340, 5, 69, 0, 0, 340, 341, 5, 88, 0, 0, 341, 342, 5, 84, 0, 0, 342, 86, 1, 0, 0, 0, 343, 344, 5, 68, 0, 0, 344, 345, 5, 69, 0, 0, 345, 346, 5, 70, 0, 0, 346, 88, 1, 0, 0, 0, 347, 348, 5, 71, 0, 0, 348, 349, 5, 82, 0, 0, 349, 350, 5, 79, 0, 0, 350, 351, 5, 85, 0, 0, 351, 352, 5, 80, 0, 0, 352, 90, 1, 0, 0, 0, 353, 354, 5, 65, 0, 0, 354, 355, 5, 84, 0, 0, 355, 356, 5, 84, 0, 0, 356, 357, 5, 82, 0, 0, 357, 92, 1, 0, 0, 0, 358, 359, 5, 85, 0, 0, 359, 360, 5, 78, 0, 0, 360, 361, 5, 65, 0, 0, 361, 362, 5, 82, 0, 0, 362, 363, 5, 89, 0, 0, 363, 364, 5, 79, 0, 0, 364, 365, 5, 80, 0, 0, 365, 94, 1, 0, 0, 0, 366, 367, 5, 79, 0, 0, 367, 368, 5, 80, 0, 0, 368, 369, 5, 69, 0, 0, 369, 370, 5, 82, 0, 0, 370, 371, 5, 65, 0, 0, 371, 372, 5, 78, 0, 0, 372, 373, 5, 68, 0, 0, 373, 96, 1, 0, 0, 0, 374, 375, 5, 116, 0, 0, 375, 376, 5, 114, 0, 0, 376, 377, 5, 117, 0, 0, 377, 384, 5, 101, 0, 0, 378, 379, 5, 102, 0, 0, 379, 380, 5, 97, 0, 0, 380, 381, 5, 108, 0, 0, 381, 382, 5, 115, 0, 0, 382, 384, 5, 101, 0, 0, 383, 374, 1, 0, 0, 0, 383, 378, 1, 0, 0, 0, 384, 98, 1, 0, 0, 0, 385, 389, 7, 0, 0, 0, 386, 388, 7, 1, 0, 0, 387, 386, 1, 0, 0, 0, 388, 391, 1, 0, 0, 0, 389, 387, 1, 0, 0, 0, 389, 390, 1, 0, 0, 0, 390, 100, 1, 0, 0, 0, 391, 389, 1, 0, 0, 0, 392, 395, 3, 99, 49, 0, 393, 394, 5, 46, 0, 0, 394, 396, 3, 99, 49, 0, 395, 393, 1, 0, 0, 0, 396, 397, 1, 0, 0, 0, 397, 395, 1, 0, 0, 0, 397, 398, 1, 0, 0, 0, 398, 102, 1, 0, 0, 0, 399, 401, 2, 48, 57, 0, 400, 399, 1, 0, 0, 0, 401, 402, 1, 0, 0, 0, 402, 400, 1, 0, 0, 0, 402, 403, 1, 0, 0, 0, 403, 104, 1, 0, 0, 0, 404, 406, 2, 48, 57, 0, 405, 404, 1, 0, 0, 0, 406, 407, 1, 0, 0, 0, 407, 405, 1, 0, 0, 0, 407, 408, 1, 0, 0, 0, 408, 409, 1, 0, 0, 0, 409, 413, 5, 46, 0, 0, 410, 412, 2, 48, 57, 0, 411, 410, 1, 0, 0, 0, 412, 415, 1, 0, 0, 0, 413, 411, 1, 0, 0, 0, 413, 414, 1, 0, 0, 0, 414, 417, 1, 0, 0, 0, 415, 413, 1, 0, 0, 0, 416, 418, 3, 109, 54, 0, 417, 416, 1, 0, 0, 0, 417, 418, 1, 0, 0, 0, 418, 435, 1, 0, 0, 0, 419, 421, 5, 46, 0, 0, 420, 422, 2, 48, 57, 0, 421, 420, 1, 0, 0, 0, 422, 423, 1, 0, 0, 0, 423, 421, 1, 0, 0, 0, 423, 424, 1, 0, 0, 0, 424, 426, 1, 0, 0, 0, 425, 427, 3, 109, 54, 0, 426, 425, 1, 0, 0, 0, 426, 427, 1, 0, 0, 0, 427, 435, 1, 0, 0, 0, 428, 430, 2, 48, 57, 0, 429, 428, 1, 0, 0, 0, 430, 431, 1, 0, 0, 0, 431, 429, 1, 0, 0, 0, 431, 432, 1, 0, 0, 0, 432, 433, 1, 0, 0, 0, 433, 435, 3, 109, 54, 0, 434, 405, 1, 0, 0, 0, 434, 419, 1, 0, 0, 0, 434, 429, 1, 0, 0, 0, 435, 106, 1, 0, 0, 0, 436, 441, 5, 34, 0, 0, 437, 440, 3, 113, 56, 0, 438, 440, 8, 2, 0, 0, 439, 437, 1, 0, 0, 0, 439, 438, 1, 0, 0, 0, 440, 443, 1, 0, 0, 0, 441, 439, 1, 0, 0, 0, 441, 442, 1, 0, 0, 0, 442, 444, 1, 0, 0, 0, 443, 441, 1, 0, 0, 0, 444, 445, 5, 34, 0, 0, 445, 108, 1, 0, 0, 0, 446, 448, 7, 3, 0, 0, 447, 449, 7, 4, 0, 0, 448, 447, 1, 0, 0, 0, 448, 449, 1, 0, 0, 0, 449, 451, 1, 0, 0, 0, 450, 452, 2, 48, 57, 0, 451, 450, 1, 0, 0, 0, 452, 453, 1, 0, 0, 0, 453, 451, 1, 0, 0, 0, 453, 454, 1, 0, 0, 0, 454, 110, 1, 0, 0, 0, 455, 456, 7, 5, 0, 0, 456, 112, 1, 0, 0, 0, 457, 462, 5, 92, 0, 0, 458, 463, 7, 6, 0, 0, 459, 460, 5, 92, 0, 0, 460, 463, 5, 34, 0, 0, 461, 463, 7, 7, 0, 0, 462, 458, 1, 0, 0, 0, 462, 459, 1, 0, 0, 0, 462, 461, 1, 0, 0, 0, 463, 467, 1, 0, 0, 0, 464, 467, 3, 117, 58, 0, 465, 467, 3, 115, 57, 0, 466, 457, 1, 0, 0, 0, 466, 464, 1, 0, 0, 0, 466, 465, 1, 0, 0, 0, 467, 114, 1, 0, 0, 0, 468, 469, 5, 92, 0, 0, 469, 470, 2, 48, 51, 0, 470, 472, 2, 48, 55, 0, 471, 473, 2, 48, 55, 0, 472, 471, 1, 0, 0, 0, 472, 473, 1, 0, 0, 0, 473, 482, 1, 0, 0, 0, 474, 475, 5, 92, 0, 0, 475, 477, 2, 48, 55, 0, 476, 478, 2, 48, 55, 0, 477, 476, 1, 0, 0, 0, 477, 478, 1, 0, 0, 0, 478, 482, 1, 0, 0, 0, 479, 480, 5, 92, 0, 0, 480, 482, 2, 48, 55, 0, 481, 468, 1, 0, 0, 0, 481, 474, 1, 0, 0, 0, 481, 479, 1, 0, 0, 0, 482, 116, 1, 0, 0, 0, 483, 484, 5, 92, 0, 0, 484, 485, 5, 117, 0, 0, 485, 486, 3, 111, 55, 0, 486, 487, 3, 111, 55, 0, 487, 488, 3, 111, 55, 0, 488, 489, 3, 111, 55, 0, 489, 118, 1, 0, 0, 0, 490, 492, 7, 8, 0, 0, 491, 490, 1, 0, 0, 0, 492, 493, 1, 0, 0, 0, 493, 491, 1, 0, 0, 0, 493, 494, 1, 0, 0, 0, 494, 495, 1, 0, 0, 0, 495, 496, 6, 59, 0, 0, 496, 120, 1, 0, 0, 0, 497, 498, 5, 47, 0, 0, 498, 499, 5, 47, 0, 0, 499, 503, 1, 0, 0, 0, 500, 502, 8, 9, 0, 0, 501, 500, 1, 0, 0, 0, 502, 505, 1, 0, 0, 0, 503, 501, 1, 0, 0, 0, 503, 504, 1, 0, 0, 0, 504, 506, 1, 0, 0, 0, 505, 503, 1, 0, 0, 0, 506, 507, 6, 60, 0, 0, 507, 122, 1, 0, 0, 0, 508, 509, 5, 47, 0, 0, 509, 510, 5, 42, 0, 0, 510, 514, 1, 0, 0, 0, 511, 513, 9, 0, 0, 0, 512, 511, 1, 0, 0, 0, 513, 516, 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 514, 512, 1, 0, 0, 0, 515, 517, 1, 0, 0, 0, 516, 514, 1, 0, 0, 0, 517, 518, 5, 42, 0, 0, 518, 519, 5, 47, 0, 0, 519, 520, 1, 0, 0, 0, 520, 521, 6, 61, 0, 0, 521, 124, 1, 0, 0, 0, 24, 0, 383, 389, 397, 402, 407, 413, 417, 423, 426, 431, 434, 439, 441, 448, 453, 462, 466, 472, 477, 481, 493, 503, 514, 1, 6, 0, 0] \ No newline at end of file diff --git a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetLexer.java b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetLexer.java index b34d65225f..f2af56b235 100644 --- a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetLexer.java +++ b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetLexer.java @@ -1,2433 +1,479 @@ -// $ANTLR 3.4 Velvet.g 2016-07-17 21:07:31 -/* FeatureIDE - A Framework for Feature-Oriented Software Development - * Copyright (C) 2005-2019 FeatureIDE team, University of Magdeburg, Germany - * - * This file is part of FeatureIDE. - * - * FeatureIDE is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * FeatureIDE is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with FeatureIDE. If not, see . - * - * See http://featureide.cs.ovgu.de/ for further information. - */ -package de.ovgu.featureide.fm.core.io.velvet; - -import org.antlr.runtime.BaseRecognizer; -import org.antlr.runtime.CharStream; -import org.antlr.runtime.DFA; -import org.antlr.runtime.EarlyExitException; -import org.antlr.runtime.Lexer; -import org.antlr.runtime.MismatchedSetException; -import org.antlr.runtime.NoViableAltException; -import org.antlr.runtime.RecognitionException; -import org.antlr.runtime.RecognizerSharedState; - -@SuppressWarnings({ "all", "warnings", "unchecked" }) -public class VelvetLexer extends Lexer { - - public static final int EOF = -1; - public static final int ABSTRACT = 4; - public static final int ACONSTR = 5; - public static final int ATTR = 6; - public static final int ATTR_OP_EQUALS = 7; - public static final int ATTR_OP_GREATER = 8; - public static final int ATTR_OP_GREATER_EQ = 9; - public static final int ATTR_OP_LESS = 10; - public static final int ATTR_OP_LESS_EQ = 11; - public static final int ATTR_OP_NOT_EQUALS = 12; - public static final int BASEEXT = 13; - public static final int BOOLEAN = 14; - public static final int CINTERFACE = 15; - public static final int COLON = 16; - public static final int COMMA = 17; - public static final int CONCEPT = 18; - public static final int CONSTR = 19; - public static final int CONSTRAINT = 20; - public static final int DEF = 21; - public static final int DESCRIPTION = 22; - public static final int EMPTY = 23; - public static final int END_C = 24; - public static final int END_R = 25; - public static final int EQ = 26; - public static final int ESC_SEQ = 27; - public static final int EXPONENT = 28; - public static final int FEATURE = 29; - public static final int FLOAT = 30; - public static final int GROUP = 31; - public static final int HEX_DIGIT = 32; - public static final int ID = 33; - public static final int IDPath = 34; - public static final int IMPORT = 35; - public static final int IMPORTINSTANCE = 36; - public static final int IMPORTINTERFACE = 37; - public static final int INT = 38; - public static final int MANDATORY = 39; - public static final int MINUS = 40; - public static final int ML_COMMENT = 41; - public static final int OCTAL_ESC = 42; - public static final int ONEOF = 43; - public static final int OPERAND = 44; - public static final int OP_AND = 45; - public static final int OP_EQUIVALENT = 46; - public static final int OP_IMPLIES = 47; - public static final int OP_NOT = 48; - public static final int OP_OR = 49; - public static final int OP_XOR = 50; - public static final int PLUS = 51; - public static final int SEMI = 52; - public static final int SL_COMMENT = 53; - public static final int SOMEOF = 54; - public static final int START_C = 55; - public static final int START_R = 56; - public static final int STRING = 57; - public static final int UNARYOP = 58; - public static final int UNICODE_ESC = 59; - public static final int USE = 60; - public static final int VAR_BOOL = 61; - public static final int VAR_FLOAT = 62; - public static final int VAR_INT = 63; - public static final int VAR_STRING = 64; - public static final int WS = 65; - - // delegates - // delegators - public Lexer[] getDelegates() { - return new Lexer[] {}; - } - - public VelvetLexer() {} - - public VelvetLexer(CharStream input) { - this(input, new RecognizerSharedState()); - } - - public VelvetLexer(CharStream input, RecognizerSharedState state) { - super(input, state); - } - - @Override - public String getGrammarFileName() { - return "Velvet.g"; - } - - // $ANTLR start "ABSTRACT" - public final void mABSTRACT() throws RecognitionException { - try { - final int _type = ABSTRACT; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:4:10: ( 'abstract' ) - // Velvet.g:4:12: 'abstract' - { - match("abstract"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "ABSTRACT" - - // $ANTLR start "ATTR_OP_EQUALS" - public final void mATTR_OP_EQUALS() throws RecognitionException { - try { - final int _type = ATTR_OP_EQUALS; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:5:16: ( '==' ) - // Velvet.g:5:18: '==' - { - match("=="); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "ATTR_OP_EQUALS" - - // $ANTLR start "ATTR_OP_GREATER" - public final void mATTR_OP_GREATER() throws RecognitionException { - try { - final int _type = ATTR_OP_GREATER; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:6:17: ( '>' ) - // Velvet.g:6:19: '>' - { - match('>'); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "ATTR_OP_GREATER" - - // $ANTLR start "ATTR_OP_GREATER_EQ" - public final void mATTR_OP_GREATER_EQ() throws RecognitionException { - try { - final int _type = ATTR_OP_GREATER_EQ; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:7:20: ( '>=' ) - // Velvet.g:7:22: '>=' - { - match(">="); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "ATTR_OP_GREATER_EQ" - - // $ANTLR start "ATTR_OP_LESS" - public final void mATTR_OP_LESS() throws RecognitionException { - try { - final int _type = ATTR_OP_LESS; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:8:14: ( '<' ) - // Velvet.g:8:16: '<' - { - match('<'); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "ATTR_OP_LESS" - - // $ANTLR start "ATTR_OP_LESS_EQ" - public final void mATTR_OP_LESS_EQ() throws RecognitionException { - try { - final int _type = ATTR_OP_LESS_EQ; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:9:17: ( '<=' ) - // Velvet.g:9:19: '<=' - { - match("<="); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "ATTR_OP_LESS_EQ" - - // $ANTLR start "ATTR_OP_NOT_EQUALS" - public final void mATTR_OP_NOT_EQUALS() throws RecognitionException { - try { - final int _type = ATTR_OP_NOT_EQUALS; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:10:20: ( '!=' ) - // Velvet.g:10:22: '!=' - { - match("!="); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "ATTR_OP_NOT_EQUALS" - - // $ANTLR start "CINTERFACE" - public final void mCINTERFACE() throws RecognitionException { - try { - final int _type = CINTERFACE; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:11:12: ( 'cinterface' ) - // Velvet.g:11:14: 'cinterface' - { - match("cinterface"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "CINTERFACE" - - // $ANTLR start "COLON" - public final void mCOLON() throws RecognitionException { - try { - final int _type = COLON; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:12:7: ( ':' ) - // Velvet.g:12:9: ':' - { - match(':'); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "COLON" - - // $ANTLR start "COMMA" - public final void mCOMMA() throws RecognitionException { - try { - final int _type = COMMA; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:13:7: ( ',' ) - // Velvet.g:13:9: ',' - { - match(','); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "COMMA" - - // $ANTLR start "CONCEPT" - public final void mCONCEPT() throws RecognitionException { - try { - final int _type = CONCEPT; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:14:9: ( 'concept' ) - // Velvet.g:14:11: 'concept' - { - match("concept"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "CONCEPT" - - // $ANTLR start "CONSTRAINT" - public final void mCONSTRAINT() throws RecognitionException { - try { - final int _type = CONSTRAINT; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:15:12: ( 'constraint' ) - // Velvet.g:15:14: 'constraint' - { - match("constraint"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "CONSTRAINT" - - // $ANTLR start "DESCRIPTION" - public final void mDESCRIPTION() throws RecognitionException { - try { - final int _type = DESCRIPTION; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:16:13: ( 'description' ) - // Velvet.g:16:15: 'description' - { - match("description"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "DESCRIPTION" - - // $ANTLR start "END_C" - public final void mEND_C() throws RecognitionException { - try { - final int _type = END_C; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:17:7: ( '}' ) - // Velvet.g:17:9: '}' - { - match('}'); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "END_C" - - // $ANTLR start "END_R" - public final void mEND_R() throws RecognitionException { - try { - final int _type = END_R; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:18:7: ( ')' ) - // Velvet.g:18:9: ')' - { - match(')'); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "END_R" - - // $ANTLR start "EQ" - public final void mEQ() throws RecognitionException { - try { - final int _type = EQ; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:19:4: ( '=' ) - // Velvet.g:19:6: '=' - { - match('='); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "EQ" - - // $ANTLR start "FEATURE" - public final void mFEATURE() throws RecognitionException { - try { - final int _type = FEATURE; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:20:9: ( 'feature' ) - // Velvet.g:20:11: 'feature' - { - match("feature"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "FEATURE" - - // $ANTLR start "IMPORT" - public final void mIMPORT() throws RecognitionException { - try { - final int _type = IMPORT; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:21:8: ( 'import' ) - // Velvet.g:21:10: 'import' - { - match("import"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "IMPORT" - - // $ANTLR start "IMPORTINSTANCE" - public final void mIMPORTINSTANCE() throws RecognitionException { - try { - final int _type = IMPORTINSTANCE; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:22:16: ( 'instance' ) - // Velvet.g:22:18: 'instance' - { - match("instance"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "IMPORTINSTANCE" - - // $ANTLR start "IMPORTINTERFACE" - public final void mIMPORTINTERFACE() throws RecognitionException { - try { - final int _type = IMPORTINTERFACE; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:23:17: ( 'interface' ) - // Velvet.g:23:19: 'interface' - { - match("interface"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "IMPORTINTERFACE" - - // $ANTLR start "MANDATORY" - public final void mMANDATORY() throws RecognitionException { - try { - final int _type = MANDATORY; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:24:11: ( 'mandatory' ) - // Velvet.g:24:13: 'mandatory' - { - match("mandatory"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "MANDATORY" - - // $ANTLR start "MINUS" - public final void mMINUS() throws RecognitionException { - try { - final int _type = MINUS; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:25:7: ( '-' ) - // Velvet.g:25:9: '-' - { - match('-'); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "MINUS" - - // $ANTLR start "ONEOF" - public final void mONEOF() throws RecognitionException { - try { - final int _type = ONEOF; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:26:7: ( 'oneOf' ) - // Velvet.g:26:9: 'oneOf' - { - match("oneOf"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "ONEOF" - - // $ANTLR start "OP_AND" - public final void mOP_AND() throws RecognitionException { - try { - final int _type = OP_AND; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:27:8: ( '&&' ) - // Velvet.g:27:10: '&&' - { - match("&&"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "OP_AND" - - // $ANTLR start "OP_EQUIVALENT" - public final void mOP_EQUIVALENT() throws RecognitionException { - try { - final int _type = OP_EQUIVALENT; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:28:15: ( '<->' ) - // Velvet.g:28:17: '<->' - { - match("<->"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "OP_EQUIVALENT" - - // $ANTLR start "OP_IMPLIES" - public final void mOP_IMPLIES() throws RecognitionException { - try { - final int _type = OP_IMPLIES; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:29:12: ( '->' ) - // Velvet.g:29:14: '->' - { - match("->"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "OP_IMPLIES" - - // $ANTLR start "OP_NOT" - public final void mOP_NOT() throws RecognitionException { - try { - final int _type = OP_NOT; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:30:8: ( '!' ) - // Velvet.g:30:10: '!' - { - match('!'); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "OP_NOT" - - // $ANTLR start "OP_OR" - public final void mOP_OR() throws RecognitionException { - try { - final int _type = OP_OR; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:31:7: ( '||' ) - // Velvet.g:31:9: '||' - { - match("||"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "OP_OR" - - // $ANTLR start "OP_XOR" - public final void mOP_XOR() throws RecognitionException { - try { - final int _type = OP_XOR; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:32:8: ( 'xor' ) - // Velvet.g:32:10: 'xor' - { - match("xor"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "OP_XOR" - - // $ANTLR start "PLUS" - public final void mPLUS() throws RecognitionException { - try { - final int _type = PLUS; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:33:6: ( '+' ) - // Velvet.g:33:8: '+' - { - match('+'); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "PLUS" - - // $ANTLR start "SEMI" - public final void mSEMI() throws RecognitionException { - try { - final int _type = SEMI; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:34:6: ( ';' ) - // Velvet.g:34:8: ';' - { - match(';'); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "SEMI" - - // $ANTLR start "SOMEOF" - public final void mSOMEOF() throws RecognitionException { - try { - final int _type = SOMEOF; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:35:8: ( 'someOf' ) - // Velvet.g:35:10: 'someOf' - { - match("someOf"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "SOMEOF" - - // $ANTLR start "START_C" - public final void mSTART_C() throws RecognitionException { - try { - final int _type = START_C; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:36:9: ( '{' ) - // Velvet.g:36:11: '{' - { - match('{'); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "START_C" - - // $ANTLR start "START_R" - public final void mSTART_R() throws RecognitionException { - try { - final int _type = START_R; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:37:9: ( '(' ) - // Velvet.g:37:11: '(' - { - match('('); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "START_R" - - // $ANTLR start "USE" - public final void mUSE() throws RecognitionException { - try { - final int _type = USE; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:38:5: ( 'use' ) - // Velvet.g:38:7: 'use' - { - match("use"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "USE" - - // $ANTLR start "VAR_BOOL" - public final void mVAR_BOOL() throws RecognitionException { - try { - final int _type = VAR_BOOL; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:39:10: ( 'bool' ) - // Velvet.g:39:12: 'bool' - { - match("bool"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "VAR_BOOL" - - // $ANTLR start "VAR_FLOAT" - public final void mVAR_FLOAT() throws RecognitionException { - try { - final int _type = VAR_FLOAT; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:40:11: ( 'float' ) - // Velvet.g:40:13: 'float' - { - match("float"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "VAR_FLOAT" - - // $ANTLR start "VAR_INT" - public final void mVAR_INT() throws RecognitionException { - try { - final int _type = VAR_INT; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:41:9: ( 'int' ) - // Velvet.g:41:11: 'int' - { - match("int"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "VAR_INT" - - // $ANTLR start "VAR_STRING" - public final void mVAR_STRING() throws RecognitionException { - try { - final int _type = VAR_STRING; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:42:12: ( 'string' ) - // Velvet.g:42:14: 'string' - { - match("string"); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "VAR_STRING" - - // $ANTLR start "BOOLEAN" - public final void mBOOLEAN() throws RecognitionException { - try { - final int _type = BOOLEAN; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:241:9: ( 'true' | 'false' ) - int alt1 = 2; - final int LA1_0 = input.LA(1); - - if ((LA1_0 == 't')) { - alt1 = 1; - } else if ((LA1_0 == 'f')) { - alt1 = 2; - } else { - final NoViableAltException nvae = new NoViableAltException("", 1, 0, input); - - throw nvae; - - } - switch (alt1) { - case 1: - // Velvet.g:241:11: 'true' - { - match("true"); - - } - break; - case 2: - // Velvet.g:242:4: 'false' - { - match("false"); - - } - break; - - } - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "BOOLEAN" - - // $ANTLR start "ID" - public final void mID() throws RecognitionException { - try { - final int _type = ID; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:245:5: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '-' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' )* ) - // Velvet.g:245:7: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '-' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' )* - { - if ((input.LA(1) == '-') || ((input.LA(1) >= 'A') && (input.LA(1) <= 'Z')) || (input.LA(1) == '_') - || ((input.LA(1) >= 'a') && (input.LA(1) <= 'z'))) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - // Velvet.g:245:35: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' )* - loop2: do { - int alt2 = 2; - final int LA2_0 = input.LA(1); - - if (((LA2_0 == '-') || ((LA2_0 >= '0') && (LA2_0 <= '9')) || ((LA2_0 >= 'A') && (LA2_0 <= 'Z')) || (LA2_0 == '_') - || ((LA2_0 >= 'a') && (LA2_0 <= 'z')))) { - alt2 = 1; - } - - switch (alt2) { - case 1: - // Velvet.g: - { - if ((input.LA(1) == '-') || ((input.LA(1) >= '0') && (input.LA(1) <= '9')) || ((input.LA(1) >= 'A') && (input.LA(1) <= 'Z')) - || (input.LA(1) == '_') || ((input.LA(1) >= 'a') && (input.LA(1) <= 'z'))) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - } - break; - - default: - break loop2; - } - } while (true); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "ID" - - // $ANTLR start "IDPath" - public final void mIDPath() throws RecognitionException { - try { - final int _type = IDPath; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:248:8: ( ID ( '.' ID )+ ) - // Velvet.g:248:10: ID ( '.' ID )+ - { - mID(); - - // Velvet.g:248:13: ( '.' ID )+ - int cnt3 = 0; - loop3: do { - int alt3 = 2; - final int LA3_0 = input.LA(1); - - if ((LA3_0 == '.')) { - alt3 = 1; - } - - switch (alt3) { - case 1: - // Velvet.g:248:14: '.' ID - { - match('.'); - - mID(); - - } - break; - - default: - if (cnt3 >= 1) { - break loop3; - } - final EarlyExitException eee = new EarlyExitException(3, input); - throw eee; - } - cnt3++; - } while (true); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "IDPath" - - // $ANTLR start "INT" - public final void mINT() throws RecognitionException { - try { - final int _type = INT; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:251:5: ( ( '0' .. '9' )+ ) - // Velvet.g:251:7: ( '0' .. '9' )+ - { - // Velvet.g:251:7: ( '0' .. '9' )+ - int cnt4 = 0; - loop4: do { - int alt4 = 2; - final int LA4_0 = input.LA(1); - - if ((((LA4_0 >= '0') && (LA4_0 <= '9')))) { - alt4 = 1; - } - - switch (alt4) { - case 1: - // Velvet.g: - { - if (((input.LA(1) >= '0') && (input.LA(1) <= '9'))) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - } - break; - - default: - if (cnt4 >= 1) { - break loop4; - } - final EarlyExitException eee = new EarlyExitException(4, input); - throw eee; - } - cnt4++; - } while (true); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "INT" - - // $ANTLR start "FLOAT" - public final void mFLOAT() throws RecognitionException { - try { - final int _type = FLOAT; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:255:5: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( EXPONENT )? | '.' ( '0' .. '9' )+ ( EXPONENT )? | ( '0' .. '9' )+ EXPONENT ) - int alt11 = 3; - alt11 = dfa11.predict(input); - switch (alt11) { - case 1: - // Velvet.g:255:9: ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( EXPONENT )? - { - // Velvet.g:255:9: ( '0' .. '9' )+ - int cnt5 = 0; - loop5: do { - int alt5 = 2; - final int LA5_0 = input.LA(1); - - if ((((LA5_0 >= '0') && (LA5_0 <= '9')))) { - alt5 = 1; - } - - switch (alt5) { - case 1: - // Velvet.g: - { - if (((input.LA(1) >= '0') && (input.LA(1) <= '9'))) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - } - break; - - default: - if (cnt5 >= 1) { - break loop5; - } - final EarlyExitException eee = new EarlyExitException(5, input); - throw eee; - } - cnt5++; - } while (true); - - match('.'); - - // Velvet.g:255:25: ( '0' .. '9' )* - loop6: do { - int alt6 = 2; - final int LA6_0 = input.LA(1); - - if ((((LA6_0 >= '0') && (LA6_0 <= '9')))) { - alt6 = 1; - } - - switch (alt6) { - case 1: - // Velvet.g: - { - if (((input.LA(1) >= '0') && (input.LA(1) <= '9'))) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - } - break; - - default: - break loop6; - } - } while (true); - - // Velvet.g:255:37: ( EXPONENT )? - int alt7 = 2; - final int LA7_0 = input.LA(1); - - if (((LA7_0 == 'E') || (LA7_0 == 'e'))) { - alt7 = 1; - } - switch (alt7) { - case 1: - // Velvet.g:255:37: EXPONENT - { - mEXPONENT(); - - } - break; - - } - - } - break; - case 2: - // Velvet.g:256:9: '.' ( '0' .. '9' )+ ( EXPONENT )? - { - match('.'); +// Generated from Velvet.g4 by ANTLR 4.13.2 - // Velvet.g:256:13: ( '0' .. '9' )+ - int cnt8 = 0; - loop8: do { - int alt8 = 2; - final int LA8_0 = input.LA(1); - - if ((((LA8_0 >= '0') && (LA8_0 <= '9')))) { - alt8 = 1; - } - - switch (alt8) { - case 1: - // Velvet.g: - { - if (((input.LA(1) >= '0') && (input.LA(1) <= '9'))) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - } - break; - - default: - if (cnt8 >= 1) { - break loop8; - } - final EarlyExitException eee = new EarlyExitException(8, input); - throw eee; - } - cnt8++; - } while (true); - - // Velvet.g:256:25: ( EXPONENT )? - int alt9 = 2; - final int LA9_0 = input.LA(1); - - if (((LA9_0 == 'E') || (LA9_0 == 'e'))) { - alt9 = 1; - } - switch (alt9) { - case 1: - // Velvet.g:256:25: EXPONENT - { - mEXPONENT(); - - } - break; - - } - - } - break; - case 3: - // Velvet.g:257:9: ( '0' .. '9' )+ EXPONENT - { - // Velvet.g:257:9: ( '0' .. '9' )+ - int cnt10 = 0; - loop10: do { - int alt10 = 2; - final int LA10_0 = input.LA(1); - - if ((((LA10_0 >= '0') && (LA10_0 <= '9')))) { - alt10 = 1; - } - - switch (alt10) { - case 1: - // Velvet.g: - { - if (((input.LA(1) >= '0') && (input.LA(1) <= '9'))) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - } - break; - - default: - if (cnt10 >= 1) { - break loop10; - } - final EarlyExitException eee = new EarlyExitException(10, input); - throw eee; - } - cnt10++; - } while (true); - - mEXPONENT(); - - } - break; - - } - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "FLOAT" - - // $ANTLR start "STRING" - public final void mSTRING() throws RecognitionException { - try { - final int _type = STRING; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:261:5: ( '\"' ( ESC_SEQ |~ ( '\\\\' | '\"' ) )* '\"' ) - // Velvet.g:261:8: '\"' ( ESC_SEQ |~ ( '\\\\' | '\"' ) )* '\"' - { - match('\"'); - - // Velvet.g:261:12: ( ESC_SEQ |~ ( '\\\\' | '\"' ) )* - loop12: do { - int alt12 = 3; - final int LA12_0 = input.LA(1); - - if ((LA12_0 == '\\')) { - alt12 = 1; - } else - if ((((LA12_0 >= '\u0000') && (LA12_0 <= '!')) || ((LA12_0 >= '#') && (LA12_0 <= '[')) || ((LA12_0 >= ']') && (LA12_0 <= '\uFFFF')))) { - alt12 = 2; - } - - switch (alt12) { - case 1: - // Velvet.g:261:14: ESC_SEQ - { - mESC_SEQ(); - - } - break; - case 2: - // Velvet.g:261:24: ~ ( '\\\\' | '\"' ) - { - if (((input.LA(1) >= '\u0000') && (input.LA(1) <= '!')) || ((input.LA(1) >= '#') && (input.LA(1) <= '[')) - || ((input.LA(1) >= ']') && (input.LA(1) <= '\uFFFF'))) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - } - break; - - default: - break loop12; - } - } while (true); - - match('\"'); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } - } - // $ANTLR end "STRING" - - // $ANTLR start "EXPONENT" - public final void mEXPONENT() throws RecognitionException { - try { - // Velvet.g:266:10: ( ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ ) - // Velvet.g:266:12: ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ - { - if ((input.LA(1) == 'E') || (input.LA(1) == 'e')) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - // Velvet.g:266:22: ( '+' | '-' )? - int alt13 = 2; - final int LA13_0 = input.LA(1); - - if (((LA13_0 == '+') || (LA13_0 == '-'))) { - alt13 = 1; - } - switch (alt13) { - case 1: - // Velvet.g: - { - if ((input.LA(1) == '+') || (input.LA(1) == '-')) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - } - break; - - } - - // Velvet.g:266:33: ( '0' .. '9' )+ - int cnt14 = 0; - loop14: do { - int alt14 = 2; - final int LA14_0 = input.LA(1); - - if ((((LA14_0 >= '0') && (LA14_0 <= '9')))) { - alt14 = 1; - } - - switch (alt14) { - case 1: - // Velvet.g: - { - if (((input.LA(1) >= '0') && (input.LA(1) <= '9'))) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - } - break; - - default: - if (cnt14 >= 1) { - break loop14; - } - final EarlyExitException eee = new EarlyExitException(14, input); - throw eee; - } - cnt14++; - } while (true); - - } - - } finally { - // do for sure before leaving - } - } - // $ANTLR end "EXPONENT" - - // $ANTLR start "HEX_DIGIT" - public final void mHEX_DIGIT() throws RecognitionException { - try { - // Velvet.g:269:11: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) ) - // Velvet.g: - { - if (((input.LA(1) >= '0') && (input.LA(1) <= '9')) || ((input.LA(1) >= 'A') && (input.LA(1) <= 'F')) - || ((input.LA(1) >= 'a') && (input.LA(1) <= 'f'))) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - } - - } finally { - // do for sure before leaving - } - } - // $ANTLR end "HEX_DIGIT" - - // $ANTLR start "ESC_SEQ" - public final void mESC_SEQ() throws RecognitionException { - try { - // Velvet.g:273:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UNICODE_ESC | OCTAL_ESC ) - int alt15 = 3; - final int LA15_0 = input.LA(1); - - if ((LA15_0 == '\\')) { - switch (input.LA(2)) { - case '\"': - case '\'': - case '\\': - case 'b': - case 'f': - case 'n': - case 'r': - case 't': { - alt15 = 1; - } - break; - case 'u': { - alt15 = 2; - } - break; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': { - alt15 = 3; - } - break; - default: - final NoViableAltException nvae = new NoViableAltException("", 15, 1, input); - - throw nvae; - - } - - } else { - final NoViableAltException nvae = new NoViableAltException("", 15, 0, input); - - throw nvae; - - } - switch (alt15) { - case 1: - // Velvet.g:273:9: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) - { - match('\\'); - - if ((input.LA(1) == '\"') || (input.LA(1) == '\'') || (input.LA(1) == '\\') || (input.LA(1) == 'b') || (input.LA(1) == 'f') - || (input.LA(1) == 'n') || (input.LA(1) == 'r') || (input.LA(1) == 't')) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - } - break; - case 2: - // Velvet.g:274:9: UNICODE_ESC - { - mUNICODE_ESC(); - - } - break; - case 3: - // Velvet.g:275:9: OCTAL_ESC - { - mOCTAL_ESC(); +package de.ovgu.featureide.fm.core.io.velvet; +import de.ovgu.featureide.fm.core.FMCorePlugin; +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue", "this-escape"}) +public class VelvetLexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.13.2", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + IMPORT=1, MANDATORY=2, ABSTRACT=3, SOMEOF=4, ONEOF=5, CONCEPT=6, CINTERFACE=7, + CONSTRAINT=8, FEATURE=9, USE=10, IMPORTINSTANCE=11, IMPORTINTERFACE=12, + DESCRIPTION=13, VAR_INT=14, VAR_FLOAT=15, VAR_STRING=16, VAR_BOOL=17, + SEMI=18, START_C=19, END_C=20, START_R=21, END_R=22, EQ=23, COMMA=24, + COLON=25, PLUS=26, MINUS=27, OP_NOT=28, OP_AND=29, OP_OR=30, OP_XOR=31, + OP_IMPLIES=32, OP_EQUIVALENT=33, ATTR_OP_EQUALS=34, ATTR_OP_NOT_EQUALS=35, + ATTR_OP_GREATER=36, ATTR_OP_LESS=37, ATTR_OP_GREATER_EQ=38, ATTR_OP_LESS_EQ=39, + EMPTY=40, CONSTR=41, ACONSTR=42, BASEEXT=43, DEF=44, GROUP=45, ATTR=46, + UNARYOP=47, OPERAND=48, BOOLEAN=49, ID=50, IDPath=51, INT=52, FLOAT=53, + STRING=54, WS=55, SL_COMMENT=56, ML_COMMENT=57; + public static String[] channelNames = { + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + }; + + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + private static String[] makeRuleNames() { + return new String[] { + "IMPORT", "MANDATORY", "ABSTRACT", "SOMEOF", "ONEOF", "CONCEPT", "CINTERFACE", + "CONSTRAINT", "FEATURE", "USE", "IMPORTINSTANCE", "IMPORTINTERFACE", + "DESCRIPTION", "VAR_INT", "VAR_FLOAT", "VAR_STRING", "VAR_BOOL", "SEMI", + "START_C", "END_C", "START_R", "END_R", "EQ", "COMMA", "COLON", "PLUS", + "MINUS", "OP_NOT", "OP_AND", "OP_OR", "OP_XOR", "OP_IMPLIES", "OP_EQUIVALENT", + "ATTR_OP_EQUALS", "ATTR_OP_NOT_EQUALS", "ATTR_OP_GREATER", "ATTR_OP_LESS", + "ATTR_OP_GREATER_EQ", "ATTR_OP_LESS_EQ", "EMPTY", "CONSTR", "ACONSTR", + "BASEEXT", "DEF", "GROUP", "ATTR", "UNARYOP", "OPERAND", "BOOLEAN", "ID", + "IDPath", "INT", "FLOAT", "STRING", "EXPONENT", "HEX_DIGIT", "ESC_SEQ", + "OCTAL_ESC", "UNICODE_ESC", "WS", "SL_COMMENT", "ML_COMMENT" + }; + } + public static final String[] ruleNames = makeRuleNames(); + + private static String[] makeLiteralNames() { + return new String[] { + null, "'import'", "'mandatory'", "'abstract'", "'someOf'", "'oneOf'", + "'concept'", "'cinterface'", "'constraint'", "'feature'", "'use'", "'instance'", + "'interface'", "'description'", "'int'", "'float'", "'string'", "'bool'", + "';'", "'{'", "'}'", "'('", "')'", "'='", "','", "':'", "'+'", "'-'", + "'!'", "'&&'", "'||'", "'xor'", "'->'", "'<->'", "'=='", "'!='", "'>'", + "'<'", "'>='", "'<='", "'EMPTY'", "'CONSTR'", "'ACONSTR'", "'BASEEXT'", + "'DEF'", "'GROUP'", "'ATTR'", "'UNARYOP'", "'OPERAND'" + }; + } + private static final String[] _LITERAL_NAMES = makeLiteralNames(); + private static String[] makeSymbolicNames() { + return new String[] { + null, "IMPORT", "MANDATORY", "ABSTRACT", "SOMEOF", "ONEOF", "CONCEPT", + "CINTERFACE", "CONSTRAINT", "FEATURE", "USE", "IMPORTINSTANCE", "IMPORTINTERFACE", + "DESCRIPTION", "VAR_INT", "VAR_FLOAT", "VAR_STRING", "VAR_BOOL", "SEMI", + "START_C", "END_C", "START_R", "END_R", "EQ", "COMMA", "COLON", "PLUS", + "MINUS", "OP_NOT", "OP_AND", "OP_OR", "OP_XOR", "OP_IMPLIES", "OP_EQUIVALENT", + "ATTR_OP_EQUALS", "ATTR_OP_NOT_EQUALS", "ATTR_OP_GREATER", "ATTR_OP_LESS", + "ATTR_OP_GREATER_EQ", "ATTR_OP_LESS_EQ", "EMPTY", "CONSTR", "ACONSTR", + "BASEEXT", "DEF", "GROUP", "ATTR", "UNARYOP", "OPERAND", "BOOLEAN", "ID", + "IDPath", "INT", "FLOAT", "STRING", "WS", "SL_COMMENT", "ML_COMMENT" + }; + } + private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); } - break; + if (tokenNames[i] == null) { + tokenNames[i] = ""; } - - } finally { - // do for sure before leaving } } - // $ANTLR end "ESC_SEQ" - - // $ANTLR start "OCTAL_ESC" - public final void mOCTAL_ESC() throws RecognitionException { - try { - // Velvet.g:280:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ) - int alt16 = 3; - final int LA16_0 = input.LA(1); - - if ((LA16_0 == '\\')) { - final int LA16_1 = input.LA(2); - - if ((((LA16_1 >= '0') && (LA16_1 <= '3')))) { - final int LA16_2 = input.LA(3); - - if ((((LA16_2 >= '0') && (LA16_2 <= '7')))) { - final int LA16_4 = input.LA(4); - - if ((((LA16_4 >= '0') && (LA16_4 <= '7')))) { - alt16 = 1; - } else { - alt16 = 2; - } - } else { - alt16 = 3; - } - } else if ((((LA16_1 >= '4') && (LA16_1 <= '7')))) { - final int LA16_3 = input.LA(3); - - if ((((LA16_3 >= '0') && (LA16_3 <= '7')))) { - alt16 = 2; - } else { - alt16 = 3; - } - } else { - final NoViableAltException nvae = new NoViableAltException("", 16, 1, input); - - throw nvae; - - } - } else { - final NoViableAltException nvae = new NoViableAltException("", 16, 0, input); - - throw nvae; - - } - switch (alt16) { - case 1: - // Velvet.g:280:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) - { - match('\\'); - - if (((input.LA(1) >= '0') && (input.LA(1) <= '3'))) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - if (((input.LA(1) >= '0') && (input.LA(1) <= '7'))) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - if (((input.LA(1) >= '0') && (input.LA(1) <= '7'))) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - } - break; - case 2: - // Velvet.g:281:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) - { - match('\\'); - - if (((input.LA(1) >= '0') && (input.LA(1) <= '7'))) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - if (((input.LA(1) >= '0') && (input.LA(1) <= '7'))) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - } - break; - case 3: - // Velvet.g:282:9: '\\\\' ( '0' .. '7' ) - { - match('\\'); - - if (((input.LA(1) >= '0') && (input.LA(1) <= '7'))) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - } - break; - - } - } finally { - // do for sure before leaving - } + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; } - // $ANTLR end "OCTAL_ESC" - - // $ANTLR start "UNICODE_ESC" - public final void mUNICODE_ESC() throws RecognitionException { - try { - // Velvet.g:287:5: ( '\\\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT ) - // Velvet.g:287:9: '\\\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT - { - match('\\'); - - match('u'); - - mHEX_DIGIT(); - - mHEX_DIGIT(); - - mHEX_DIGIT(); - mHEX_DIGIT(); - - } + @Override - } finally { - // do for sure before leaving - } + public Vocabulary getVocabulary() { + return VOCABULARY; } - // $ANTLR end "UNICODE_ESC" - // $ANTLR start "WS" - public final void mWS() throws RecognitionException { - try { - final int _type = WS; - int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:289:5: ( ( ' ' | '\\t' | '\\r' | '\\n' ) ) - // Velvet.g:289:7: ( ' ' | '\\t' | '\\r' | '\\n' ) - { - if (((input.LA(1) >= '\t') && (input.LA(1) <= '\n')) || (input.LA(1) == '\r') || (input.LA(1) == ' ')) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - _channel = HIDDEN; - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving + public class InternalSyntaxException extends RuntimeException{ + private final RecognitionException e; + public InternalSyntaxException(RecognitionException e){ + this.e = e; } - } - // $ANTLR end "WS" - - // $ANTLR start "SL_COMMENT" - public final void mSL_COMMENT() throws RecognitionException { - try { - final int _type = SL_COMMENT; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:296:12: ( ( '//' (~ ( '\\r' | '\\n' ) )* ) ) - // Velvet.g:296:14: ( '//' (~ ( '\\r' | '\\n' ) )* ) - { - // Velvet.g:296:14: ( '//' (~ ( '\\r' | '\\n' ) )* ) - // Velvet.g:296:15: '//' (~ ( '\\r' | '\\n' ) )* - { - match("//"); - - // Velvet.g:296:20: (~ ( '\\r' | '\\n' ) )* - loop17: do { - int alt17 = 2; - final int LA17_0 = input.LA(1); - - if ((((LA17_0 >= '\u0000') && (LA17_0 <= '\t')) || ((LA17_0 >= '\u000B') && (LA17_0 <= '\f')) - || ((LA17_0 >= '\u000E') && (LA17_0 <= '\uFFFF')))) { - alt17 = 1; - } - - switch (alt17) { - case 1: - // Velvet.g: - { - if (((input.LA(1) >= '\u0000') && (input.LA(1) <= '\t')) || ((input.LA(1) >= '\u000B') && (input.LA(1) <= '\f')) - || ((input.LA(1) >= '\u000E') && (input.LA(1) <= '\uFFFF'))) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - } - break; - - default: - break loop17; - } - } while (true); - - } - - skip(); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving + + public RecognitionException getException(){ + return e; } } - // $ANTLR end "SL_COMMENT" - - // $ANTLR start "ML_COMMENT" - public final void mML_COMMENT() throws RecognitionException { - try { - final int _type = ML_COMMENT; - final int _channel = DEFAULT_TOKEN_CHANNEL; - // Velvet.g:298:12: ( ( '/*' (~ ( '*/' ) )* ) ) - // Velvet.g:298:14: ( '/*' (~ ( '*/' ) )* ) - { - // Velvet.g:298:14: ( '/*' (~ ( '*/' ) )* ) - // Velvet.g:298:15: '/*' (~ ( '*/' ) )* - { - match("/*"); - - // Velvet.g:298:20: (~ ( '*/' ) )* - loop18: do { - int alt18 = 2; - final int LA18_0 = input.LA(1); - - if ((((LA18_0 >= '\u0000') && (LA18_0 <= '\uFFFF')))) { - alt18 = 1; - } - - switch (alt18) { - case 1: - // Velvet.g:298:20: ~ ( '*/' ) - { - if (((input.LA(1) >= '\u0000') && (input.LA(1) <= '\uFFFF'))) { - input.consume(); - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - recover(mse); - throw mse; - } - - } - break; - default: - break loop18; - } - } while (true); - } - - skip(); - - } - - state.type = _type; - state.channel = _channel; - } finally { - // do for sure before leaving - } + public VelvetLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); } - // $ANTLR end "ML_COMMENT" @Override - public void mTokens() throws RecognitionException { - // Velvet.g:1:8: ( ABSTRACT | ATTR_OP_EQUALS | ATTR_OP_GREATER | ATTR_OP_GREATER_EQ | ATTR_OP_LESS | ATTR_OP_LESS_EQ | ATTR_OP_NOT_EQUALS | CINTERFACE | - // COLON | COMMA | CONCEPT | CONSTRAINT | DESCRIPTION | END_C | END_R | EQ | FEATURE | IMPORT | IMPORTINSTANCE | IMPORTINTERFACE | MANDATORY | MINUS | - // ONEOF | OP_AND | OP_EQUIVALENT | OP_IMPLIES | OP_NOT | OP_OR | OP_XOR | PLUS | SEMI | SOMEOF | START_C | START_R | USE | VAR_BOOL | VAR_FLOAT | - // VAR_INT | VAR_STRING | BOOLEAN | ID | IDPath | INT | FLOAT | STRING | WS | SL_COMMENT | ML_COMMENT ) - int alt19 = 48; - alt19 = dfa19.predict(input); - switch (alt19) { - case 1: - // Velvet.g:1:10: ABSTRACT - { - mABSTRACT(); - - } - break; - case 2: - // Velvet.g:1:19: ATTR_OP_EQUALS - { - mATTR_OP_EQUALS(); - - } - break; - case 3: - // Velvet.g:1:34: ATTR_OP_GREATER - { - mATTR_OP_GREATER(); - - } - break; - case 4: - // Velvet.g:1:50: ATTR_OP_GREATER_EQ - { - mATTR_OP_GREATER_EQ(); - - } - break; - case 5: - // Velvet.g:1:69: ATTR_OP_LESS - { - mATTR_OP_LESS(); - - } - break; - case 6: - // Velvet.g:1:82: ATTR_OP_LESS_EQ - { - mATTR_OP_LESS_EQ(); - - } - break; - case 7: - // Velvet.g:1:98: ATTR_OP_NOT_EQUALS - { - mATTR_OP_NOT_EQUALS(); - - } - break; - case 8: - // Velvet.g:1:117: CINTERFACE - { - mCINTERFACE(); - - } - break; - case 9: - // Velvet.g:1:128: COLON - { - mCOLON(); - - } - break; - case 10: - // Velvet.g:1:134: COMMA - { - mCOMMA(); - - } - break; - case 11: - // Velvet.g:1:140: CONCEPT - { - mCONCEPT(); - - } - break; - case 12: - // Velvet.g:1:148: CONSTRAINT - { - mCONSTRAINT(); - - } - break; - case 13: - // Velvet.g:1:159: DESCRIPTION - { - mDESCRIPTION(); - - } - break; - case 14: - // Velvet.g:1:171: END_C - { - mEND_C(); - - } - break; - case 15: - // Velvet.g:1:177: END_R - { - mEND_R(); - - } - break; - case 16: - // Velvet.g:1:183: EQ - { - mEQ(); - - } - break; - case 17: - // Velvet.g:1:186: FEATURE - { - mFEATURE(); - - } - break; - case 18: - // Velvet.g:1:194: IMPORT - { - mIMPORT(); - - } - break; - case 19: - // Velvet.g:1:201: IMPORTINSTANCE - { - mIMPORTINSTANCE(); - - } - break; - case 20: - // Velvet.g:1:216: IMPORTINTERFACE - { - mIMPORTINTERFACE(); - - } - break; - case 21: - // Velvet.g:1:232: MANDATORY - { - mMANDATORY(); - - } - break; - case 22: - // Velvet.g:1:242: MINUS - { - mMINUS(); - - } - break; - case 23: - // Velvet.g:1:248: ONEOF - { - mONEOF(); - - } - break; - case 24: - // Velvet.g:1:254: OP_AND - { - mOP_AND(); - - } - break; - case 25: - // Velvet.g:1:261: OP_EQUIVALENT - { - mOP_EQUIVALENT(); - - } - break; - case 26: - // Velvet.g:1:275: OP_IMPLIES - { - mOP_IMPLIES(); - - } - break; - case 27: - // Velvet.g:1:286: OP_NOT - { - mOP_NOT(); - - } - break; - case 28: - // Velvet.g:1:293: OP_OR - { - mOP_OR(); - - } - break; - case 29: - // Velvet.g:1:299: OP_XOR - { - mOP_XOR(); - - } - break; - case 30: - // Velvet.g:1:306: PLUS - { - mPLUS(); + public String getGrammarFileName() { return "Velvet.g4"; } - } - break; - case 31: - // Velvet.g:1:311: SEMI - { - mSEMI(); - - } - break; - case 32: - // Velvet.g:1:316: SOMEOF - { - mSOMEOF(); - - } - break; - case 33: - // Velvet.g:1:323: START_C - { - mSTART_C(); - - } - break; - case 34: - // Velvet.g:1:331: START_R - { - mSTART_R(); - - } - break; - case 35: - // Velvet.g:1:339: USE - { - mUSE(); - - } - break; - case 36: - // Velvet.g:1:343: VAR_BOOL - { - mVAR_BOOL(); - - } - break; - case 37: - // Velvet.g:1:352: VAR_FLOAT - { - mVAR_FLOAT(); - - } - break; - case 38: - // Velvet.g:1:362: VAR_INT - { - mVAR_INT(); - - } - break; - case 39: - // Velvet.g:1:370: VAR_STRING - { - mVAR_STRING(); - - } - break; - case 40: - // Velvet.g:1:381: BOOLEAN - { - mBOOLEAN(); - - } - break; - case 41: - // Velvet.g:1:389: ID - { - mID(); - - } - break; - case 42: - // Velvet.g:1:392: IDPath - { - mIDPath(); - - } - break; - case 43: - // Velvet.g:1:399: INT - { - mINT(); - - } - break; - case 44: - // Velvet.g:1:403: FLOAT - { - mFLOAT(); - - } - break; - case 45: - // Velvet.g:1:409: STRING - { - mSTRING(); - - } - break; - case 46: - // Velvet.g:1:416: WS - { - mWS(); - - } - break; - case 47: - // Velvet.g:1:419: SL_COMMENT - { - mSL_COMMENT(); - - } - break; - case 48: - // Velvet.g:1:430: ML_COMMENT - { - mML_COMMENT(); - - } - break; - - } - - } - - protected DFA11 dfa11 = new DFA11(this); - protected DFA19 dfa19 = new DFA19(this); - static final String DFA11_eotS = "\5\uffff"; - static final String DFA11_eofS = "\5\uffff"; - static final String DFA11_minS = "\2\56\3\uffff"; - static final String DFA11_maxS = "\1\71\1\145\3\uffff"; - static final String DFA11_acceptS = "\2\uffff\1\2\1\1\1\3"; - static final String DFA11_specialS = "\5\uffff}>"; - static final String[] DFA11_transitionS = { "\1\2\1\uffff\12\1", "\1\3\1\uffff\12\1\13\uffff\1\4\37\uffff\1\4", "", "", "" }; - - static final short[] DFA11_eot = DFA.unpackEncodedString(DFA11_eotS); - static final short[] DFA11_eof = DFA.unpackEncodedString(DFA11_eofS); - static final char[] DFA11_min = DFA.unpackEncodedStringToUnsignedChars(DFA11_minS); - static final char[] DFA11_max = DFA.unpackEncodedStringToUnsignedChars(DFA11_maxS); - static final short[] DFA11_accept = DFA.unpackEncodedString(DFA11_acceptS); - static final short[] DFA11_special = DFA.unpackEncodedString(DFA11_specialS); - static final short[][] DFA11_transition; - - static { - final int numStates = DFA11_transitionS.length; - DFA11_transition = new short[numStates][]; - for (int i = 0; i < numStates; i++) { - DFA11_transition[i] = DFA.unpackEncodedString(DFA11_transitionS[i]); - } - } - - class DFA11 extends DFA { - - public DFA11(BaseRecognizer recognizer) { - this.recognizer = recognizer; - decisionNumber = 11; - eot = DFA11_eot; - eof = DFA11_eof; - min = DFA11_min; - max = DFA11_max; - accept = DFA11_accept; - special = DFA11_special; - transition = DFA11_transition; - } + @Override + public String[] getRuleNames() { return ruleNames; } - @Override - public String getDescription() { - return "254:1: FLOAT : ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( EXPONENT )? | '.' ( '0' .. '9' )+ ( EXPONENT )? | ( '0' .. '9' )+ EXPONENT );"; - } - } + @Override + public String getSerializedATN() { return _serializedATN; } - static final String DFA19_eotS = "\1\uffff\1\44\1\47\1\51\1\54\1\56\1\44\2\uffff\1\44\2\uffff\3\44" - + "\1\71\1\44\2\uffff\1\44\2\uffff\1\44\2\uffff\4\44\1\101\4\uffff" + "\2\44\13\uffff\11\44\2\uffff\7\44\3\uffff\11\44\1\141\2\44\1\144" - + "\2\44\1\147\15\44\1\uffff\2\44\1\uffff\2\44\1\uffff\1\171\1\172" + "\6\44\1\u0081\1\172\4\44\1\u0086\2\44\2\uffff\6\44\1\uffff\1\u008f" - + "\3\44\1\uffff\1\u0093\1\u0094\2\44\1\u0097\2\44\1\u009a\1\uffff" + "\3\44\2\uffff\1\u009e\1\44\1\uffff\2\44\1\uffff\1\u00a2\2\44\1\uffff" - + "\3\44\1\uffff\1\u00a8\1\u00a9\1\u00aa\1\u00ab\1\44\4\uffff\1\u00ad" + "\1\uffff"; - static final String DFA19_eofS = "\u00ae\uffff"; - static final String DFA19_minS = - "\1\11\1\55\2\75\1\55\1\75\1\55\2\uffff\1\55\2\uffff\5\55\2\uffff" + "\1\55\2\uffff\1\55\2\uffff\4\55\1\56\3\uffff\1\52\2\55\13\uffff" - + "\11\55\2\uffff\7\55\3\uffff\35\55\1\uffff\2\55\1\uffff\2\55\1\uffff" + "\21\55\2\uffff\6\55\1\uffff\4\55\1\uffff\10\55\1\uffff\3\55\2\uffff" - + "\2\55\1\uffff\2\55\1\uffff\3\55\1\uffff\3\55\1\uffff\5\55\4\uffff" + "\1\55\1\uffff"; - static final String DFA19_maxS = - "\1\175\1\172\4\75\1\172\2\uffff\1\172\2\uffff\5\172\2\uffff\1\172" + "\2\uffff\1\172\2\uffff\4\172\1\145\3\uffff\1\57\2\172\13\uffff\11" - + "\172\2\uffff\7\172\3\uffff\35\172\1\uffff\2\172\1\uffff\2\172\1" + "\uffff\21\172\2\uffff\6\172\1\uffff\4\172\1\uffff\10\172\1\uffff" - + "\3\172\2\uffff\2\172\1\uffff\2\172\1\uffff\3\172\1\uffff\3\172\1" + "\uffff\5\172\4\uffff\1\172\1\uffff"; - static final String DFA19_acceptS = "\7\uffff\1\11\1\12\1\uffff\1\16\1\17\5\uffff\1\30\1\34\1\uffff\1" - + "\36\1\37\1\uffff\1\41\1\42\5\uffff\1\54\1\55\1\56\3\uffff\1\51\1" + "\52\1\2\1\20\1\4\1\3\1\6\1\31\1\5\1\7\1\33\11\uffff\1\32\1\26\7" - + "\uffff\1\53\1\57\1\60\35\uffff\1\46\2\uffff\1\35\2\uffff\1\43\21" + "\uffff\1\44\1\50\6\uffff\1\45\4\uffff\1\27\10\uffff\1\22\3\uffff" - + "\1\40\1\47\2\uffff\1\13\2\uffff\1\21\3\uffff\1\1\3\uffff\1\23\5" + "\uffff\1\24\1\25\1\10\1\14\1\uffff\1\15"; - static final String DFA19_specialS = "\u00ae\uffff}>"; - static final String[] DFA19_transitionS = { - "\2\40\2\uffff\1\40\22\uffff\1\40\1\5\1\37\3\uffff\1\21\1\uffff" + "\1\30\1\13\1\uffff\1\24\1\10\1\17\1\36\1\41\12\35\1\7\1\25\1" - + "\4\1\2\1\3\2\uffff\32\34\4\uffff\1\34\1\uffff\1\1\1\32\1\6\1" + "\11\1\34\1\14\2\34\1\15\3\34\1\16\1\34\1\20\3\34\1\26\1\33\1" - + "\31\2\34\1\23\2\34\1\27\1\22\1\12", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\1\43\1\42\30\43", "\1\46", "\1\50", "\1\53\17\uffff\1\52", "\1\55", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\10\43\1\57\5\43\1\60\13\43", "", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\4\43\1\61\25\43", "", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\1\64\3\43\1\62\6\43\1\63\16\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\14\43\1\65\1\66\14\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\1\67\31\43", - "\1\43\1\45\1\uffff\12\43\4\uffff\1\70\2\uffff\32\43\4\uffff" + "\1\43\1\uffff\32\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\15\43\1\72\14\43", "", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\16\43\1\73\13\43", "", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\16\43\1\74\4\43\1\75\6\43", "", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\22\43\1\76\7\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\16\43\1\77\13\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\21\43\1\100\10\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", "\1\36\1\uffff\12\35\13\uffff\1\36\37\uffff\1\36", "", "", "", - "\1\103\4\uffff\1\102", "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\22\43\1\104\7\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", "", "", "", "", "", "", "", "", "", "", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\15\43\1\105\14\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\15\43\1\106\14\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\22\43\1\107\7\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\1\110\31\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\16\43\1\111\13\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\13\43\1\112\16\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\17\43\1\113\12\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\22\43\1\114\1\115\6\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\15\43\1\116\14\43", "", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\4\43\1\117\25\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\21\43\1\120\10\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\14\43\1\121\15\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\21\43\1\122\10\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\4\43\1\123\25\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\16\43\1\124\13\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\24\43\1\125\5\43", "", "", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\23\43\1\126\6\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\23\43\1\127\6\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\2\43\1\130\17\43\1\131\7\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\2\43\1\132\27\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\23\43\1\133\6\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\1\134\31\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\22\43\1\135\7\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\16\43\1\136\13\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\23\43\1\137\6\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\4\43\1\140\25\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\3\43\1\142\26\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\16\43\1\143\13\43\4\uffff" + "\1\43\1\uffff\32\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\4\43\1\145\25\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\10\43\1\146\21\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\13\43\1\150\16\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\4\43\1\151\25\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\21\43\1\152\10\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\4\43\1\153\25\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\4\43\1\154\25\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\23\43\1\155\6\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\21\43\1\156\10\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\24\43\1\157\5\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\23\43\1\160\6\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\4\43\1\161\25\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\21\43\1\162\10\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\1\163\31\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\21\43\1\164\10\43", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\1\165\31\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\5\43\1\166\24\43", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\16\43\1\167\13\43\4\uffff" + "\1\43\1\uffff\32\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\15\43\1\170\14\43", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\1\173\31\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\21\43\1\174\10\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\17\43\1\175\12\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\21\43\1\176\10\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\10\43\1\177\21\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\21\43\1\u0080\10\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\23\43\1\u0082\6\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\15\43\1\u0083\14\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\5\43\1\u0084\24\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\23\43\1\u0085\6\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\5\43\1\u0087\24\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\6\43\1\u0088\23\43", "", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\2\43\1\u0089\27\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\5\43\1\u008a\24\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\23\43\1\u008b\6\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\1\u008c\31\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\17\43\1\u008d\12\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\4\43\1\u008e\25\43", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\2\43\1\u0090\27\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\1\u0091\31\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\16\43\1\u0092\13\43", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\23\43\1\u0095\6\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\1\u0096\31\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\10\43\1\u0098\21\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\23\43\1\u0099\6\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\4\43\1\u009b\25\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\2\43\1\u009c\27\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\21\43\1\u009d\10\43", "", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\2\43\1\u009f\27\43", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\15\43\1\u00a0\14\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\10\43\1\u00a1\21\43", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\4\43\1\u00a3\25\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\30\43\1\u00a4\1\43", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\4\43\1\u00a5\25\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\23\43\1\u00a6\6\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\16\43\1\u00a7\13\43", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\15\43\1\u00ac\14\43", "", "", "", "", - "\1\43\1\45\1\uffff\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff" + "\32\43", "" }; + @Override + public String[] getChannelNames() { return channelNames; } - static final short[] DFA19_eot = DFA.unpackEncodedString(DFA19_eotS); - static final short[] DFA19_eof = DFA.unpackEncodedString(DFA19_eofS); - static final char[] DFA19_min = DFA.unpackEncodedStringToUnsignedChars(DFA19_minS); - static final char[] DFA19_max = DFA.unpackEncodedStringToUnsignedChars(DFA19_maxS); - static final short[] DFA19_accept = DFA.unpackEncodedString(DFA19_acceptS); - static final short[] DFA19_special = DFA.unpackEncodedString(DFA19_specialS); - static final short[][] DFA19_transition; + @Override + public String[] getModeNames() { return modeNames; } + @Override + public ATN getATN() { return _ATN; } + + public static final String _serializedATN = + "\u0004\u00009\u020a\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+ + "\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004"+ + "\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007"+ + "\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b"+ + "\u0007\u000b\u0002\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002"+ + "\u000f\u0007\u000f\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002"+ + "\u0012\u0007\u0012\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002"+ + "\u0015\u0007\u0015\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002"+ + "\u0018\u0007\u0018\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0002"+ + "\u001b\u0007\u001b\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d\u0002"+ + "\u001e\u0007\u001e\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007"+ + "!\u0002\"\u0007\"\u0002#\u0007#\u0002$\u0007$\u0002%\u0007%\u0002&\u0007"+ + "&\u0002\'\u0007\'\u0002(\u0007(\u0002)\u0007)\u0002*\u0007*\u0002+\u0007"+ + "+\u0002,\u0007,\u0002-\u0007-\u0002.\u0007.\u0002/\u0007/\u00020\u0007"+ + "0\u00021\u00071\u00022\u00072\u00023\u00073\u00024\u00074\u00025\u0007"+ + "5\u00026\u00076\u00027\u00077\u00028\u00078\u00029\u00079\u0002:\u0007"+ + ":\u0002;\u0007;\u0002<\u0007<\u0002=\u0007=\u0001\u0000\u0001\u0000\u0001"+ + "\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0001"+ + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+ + "\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001\u0002\u0001"+ + "\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001"+ + "\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001"+ + "\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001"+ + "\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001"+ + "\u0005\u0001\u0005\u0001\u0005\u0001\u0006\u0001\u0006\u0001\u0006\u0001"+ + "\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001"+ + "\u0006\u0001\u0006\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001"+ + "\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001"+ + "\u0007\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b"+ + "\u0001\t\u0001\t\u0001\t\u0001\t\u0001\n\u0001\n\u0001\n\u0001\n\u0001"+ + "\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0001\u000b"+ + "\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b"+ + "\u0001\u000b\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001"+ + "\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\r\u0001\r\u0001\r\u0001\r\u0001"+ + "\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001"+ + "\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001"+ + "\u000f\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001"+ + "\u0011\u0001\u0011\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013\u0001"+ + "\u0014\u0001\u0014\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016\u0001"+ + "\u0017\u0001\u0017\u0001\u0018\u0001\u0018\u0001\u0019\u0001\u0019\u0001"+ + "\u001a\u0001\u001a\u0001\u001b\u0001\u001b\u0001\u001c\u0001\u001c\u0001"+ + "\u001c\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001e\u0001\u001e\u0001"+ + "\u001e\u0001\u001e\u0001\u001f\u0001\u001f\u0001\u001f\u0001 \u0001 \u0001"+ + " \u0001 \u0001!\u0001!\u0001!\u0001\"\u0001\"\u0001\"\u0001#\u0001#\u0001"+ + "$\u0001$\u0001%\u0001%\u0001%\u0001&\u0001&\u0001&\u0001\'\u0001\'\u0001"+ + "\'\u0001\'\u0001\'\u0001\'\u0001(\u0001(\u0001(\u0001(\u0001(\u0001(\u0001"+ + "(\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0001*\u0001"+ + "*\u0001*\u0001*\u0001*\u0001*\u0001*\u0001*\u0001+\u0001+\u0001+\u0001"+ + "+\u0001,\u0001,\u0001,\u0001,\u0001,\u0001,\u0001-\u0001-\u0001-\u0001"+ + "-\u0001-\u0001.\u0001.\u0001.\u0001.\u0001.\u0001.\u0001.\u0001.\u0001"+ + "/\u0001/\u0001/\u0001/\u0001/\u0001/\u0001/\u0001/\u00010\u00010\u0001"+ + "0\u00010\u00010\u00010\u00010\u00010\u00010\u00030\u0180\b0\u00011\u0001"+ + "1\u00051\u0184\b1\n1\f1\u0187\t1\u00012\u00012\u00012\u00042\u018c\b2"+ + "\u000b2\f2\u018d\u00013\u00043\u0191\b3\u000b3\f3\u0192\u00014\u00044"+ + "\u0196\b4\u000b4\f4\u0197\u00014\u00014\u00054\u019c\b4\n4\f4\u019f\t"+ + "4\u00014\u00034\u01a2\b4\u00014\u00014\u00044\u01a6\b4\u000b4\f4\u01a7"+ + "\u00014\u00034\u01ab\b4\u00014\u00044\u01ae\b4\u000b4\f4\u01af\u00014"+ + "\u00034\u01b3\b4\u00015\u00015\u00015\u00055\u01b8\b5\n5\f5\u01bb\t5\u0001"+ + "5\u00015\u00016\u00016\u00036\u01c1\b6\u00016\u00046\u01c4\b6\u000b6\f"+ + "6\u01c5\u00017\u00017\u00018\u00018\u00018\u00018\u00018\u00038\u01cf"+ + "\b8\u00018\u00018\u00038\u01d3\b8\u00019\u00019\u00019\u00019\u00039\u01d9"+ + "\b9\u00019\u00019\u00019\u00039\u01de\b9\u00019\u00019\u00039\u01e2\b"+ + "9\u0001:\u0001:\u0001:\u0001:\u0001:\u0001:\u0001:\u0001;\u0004;\u01ec"+ + "\b;\u000b;\f;\u01ed\u0001;\u0001;\u0001<\u0001<\u0001<\u0001<\u0005<\u01f6"+ + "\b<\n<\f<\u01f9\t<\u0001<\u0001<\u0001=\u0001=\u0001=\u0001=\u0005=\u0201"+ + "\b=\n=\f=\u0204\t=\u0001=\u0001=\u0001=\u0001=\u0001=\u0001\u0202\u0000"+ + ">\u0001\u0001\u0003\u0002\u0005\u0003\u0007\u0004\t\u0005\u000b\u0006"+ + "\r\u0007\u000f\b\u0011\t\u0013\n\u0015\u000b\u0017\f\u0019\r\u001b\u000e"+ + "\u001d\u000f\u001f\u0010!\u0011#\u0012%\u0013\'\u0014)\u0015+\u0016-\u0017"+ + "/\u00181\u00193\u001a5\u001b7\u001c9\u001d;\u001e=\u001f? A!C\"E#G$I%"+ + "K&M\'O(Q)S*U+W,Y-[.]/_0a1c2e3g4i5k6m\u0000o\u0000q\u0000s\u0000u\u0000"+ + "w7y8{9\u0001\u0000\n\u0004\u0000--AZ__az\u0005\u0000--09AZ__az\u0002\u0000"+ + "\"\"\\\\\u0002\u0000EEee\u0002\u0000++--\u0003\u000009AFaf\u0005\u0000"+ + "bbffnnrrtt\u0002\u0000\'\'\\\\\u0003\u0000\t\n\r\r \u0002\u0000\n\n\r"+ + "\r\u021f\u0000\u0001\u0001\u0000\u0000\u0000\u0000\u0003\u0001\u0000\u0000"+ + "\u0000\u0000\u0005\u0001\u0000\u0000\u0000\u0000\u0007\u0001\u0000\u0000"+ + "\u0000\u0000\t\u0001\u0000\u0000\u0000\u0000\u000b\u0001\u0000\u0000\u0000"+ + "\u0000\r\u0001\u0000\u0000\u0000\u0000\u000f\u0001\u0000\u0000\u0000\u0000"+ + "\u0011\u0001\u0000\u0000\u0000\u0000\u0013\u0001\u0000\u0000\u0000\u0000"+ + "\u0015\u0001\u0000\u0000\u0000\u0000\u0017\u0001\u0000\u0000\u0000\u0000"+ + "\u0019\u0001\u0000\u0000\u0000\u0000\u001b\u0001\u0000\u0000\u0000\u0000"+ + "\u001d\u0001\u0000\u0000\u0000\u0000\u001f\u0001\u0000\u0000\u0000\u0000"+ + "!\u0001\u0000\u0000\u0000\u0000#\u0001\u0000\u0000\u0000\u0000%\u0001"+ + "\u0000\u0000\u0000\u0000\'\u0001\u0000\u0000\u0000\u0000)\u0001\u0000"+ + "\u0000\u0000\u0000+\u0001\u0000\u0000\u0000\u0000-\u0001\u0000\u0000\u0000"+ + "\u0000/\u0001\u0000\u0000\u0000\u00001\u0001\u0000\u0000\u0000\u00003"+ + "\u0001\u0000\u0000\u0000\u00005\u0001\u0000\u0000\u0000\u00007\u0001\u0000"+ + "\u0000\u0000\u00009\u0001\u0000\u0000\u0000\u0000;\u0001\u0000\u0000\u0000"+ + "\u0000=\u0001\u0000\u0000\u0000\u0000?\u0001\u0000\u0000\u0000\u0000A"+ + "\u0001\u0000\u0000\u0000\u0000C\u0001\u0000\u0000\u0000\u0000E\u0001\u0000"+ + "\u0000\u0000\u0000G\u0001\u0000\u0000\u0000\u0000I\u0001\u0000\u0000\u0000"+ + "\u0000K\u0001\u0000\u0000\u0000\u0000M\u0001\u0000\u0000\u0000\u0000O"+ + "\u0001\u0000\u0000\u0000\u0000Q\u0001\u0000\u0000\u0000\u0000S\u0001\u0000"+ + "\u0000\u0000\u0000U\u0001\u0000\u0000\u0000\u0000W\u0001\u0000\u0000\u0000"+ + "\u0000Y\u0001\u0000\u0000\u0000\u0000[\u0001\u0000\u0000\u0000\u0000]"+ + "\u0001\u0000\u0000\u0000\u0000_\u0001\u0000\u0000\u0000\u0000a\u0001\u0000"+ + "\u0000\u0000\u0000c\u0001\u0000\u0000\u0000\u0000e\u0001\u0000\u0000\u0000"+ + "\u0000g\u0001\u0000\u0000\u0000\u0000i\u0001\u0000\u0000\u0000\u0000k"+ + "\u0001\u0000\u0000\u0000\u0000w\u0001\u0000\u0000\u0000\u0000y\u0001\u0000"+ + "\u0000\u0000\u0000{\u0001\u0000\u0000\u0000\u0001}\u0001\u0000\u0000\u0000"+ + "\u0003\u0084\u0001\u0000\u0000\u0000\u0005\u008e\u0001\u0000\u0000\u0000"+ + "\u0007\u0097\u0001\u0000\u0000\u0000\t\u009e\u0001\u0000\u0000\u0000\u000b"+ + "\u00a4\u0001\u0000\u0000\u0000\r\u00ac\u0001\u0000\u0000\u0000\u000f\u00b7"+ + "\u0001\u0000\u0000\u0000\u0011\u00c2\u0001\u0000\u0000\u0000\u0013\u00ca"+ + "\u0001\u0000\u0000\u0000\u0015\u00ce\u0001\u0000\u0000\u0000\u0017\u00d7"+ + "\u0001\u0000\u0000\u0000\u0019\u00e1\u0001\u0000\u0000\u0000\u001b\u00ed"+ + "\u0001\u0000\u0000\u0000\u001d\u00f1\u0001\u0000\u0000\u0000\u001f\u00f7"+ + "\u0001\u0000\u0000\u0000!\u00fe\u0001\u0000\u0000\u0000#\u0103\u0001\u0000"+ + "\u0000\u0000%\u0105\u0001\u0000\u0000\u0000\'\u0107\u0001\u0000\u0000"+ + "\u0000)\u0109\u0001\u0000\u0000\u0000+\u010b\u0001\u0000\u0000\u0000-"+ + "\u010d\u0001\u0000\u0000\u0000/\u010f\u0001\u0000\u0000\u00001\u0111\u0001"+ + "\u0000\u0000\u00003\u0113\u0001\u0000\u0000\u00005\u0115\u0001\u0000\u0000"+ + "\u00007\u0117\u0001\u0000\u0000\u00009\u0119\u0001\u0000\u0000\u0000;"+ + "\u011c\u0001\u0000\u0000\u0000=\u011f\u0001\u0000\u0000\u0000?\u0123\u0001"+ + "\u0000\u0000\u0000A\u0126\u0001\u0000\u0000\u0000C\u012a\u0001\u0000\u0000"+ + "\u0000E\u012d\u0001\u0000\u0000\u0000G\u0130\u0001\u0000\u0000\u0000I"+ + "\u0132\u0001\u0000\u0000\u0000K\u0134\u0001\u0000\u0000\u0000M\u0137\u0001"+ + "\u0000\u0000\u0000O\u013a\u0001\u0000\u0000\u0000Q\u0140\u0001\u0000\u0000"+ + "\u0000S\u0147\u0001\u0000\u0000\u0000U\u014f\u0001\u0000\u0000\u0000W"+ + "\u0157\u0001\u0000\u0000\u0000Y\u015b\u0001\u0000\u0000\u0000[\u0161\u0001"+ + "\u0000\u0000\u0000]\u0166\u0001\u0000\u0000\u0000_\u016e\u0001\u0000\u0000"+ + "\u0000a\u017f\u0001\u0000\u0000\u0000c\u0181\u0001\u0000\u0000\u0000e"+ + "\u0188\u0001\u0000\u0000\u0000g\u0190\u0001\u0000\u0000\u0000i\u01b2\u0001"+ + "\u0000\u0000\u0000k\u01b4\u0001\u0000\u0000\u0000m\u01be\u0001\u0000\u0000"+ + "\u0000o\u01c7\u0001\u0000\u0000\u0000q\u01d2\u0001\u0000\u0000\u0000s"+ + "\u01e1\u0001\u0000\u0000\u0000u\u01e3\u0001\u0000\u0000\u0000w\u01eb\u0001"+ + "\u0000\u0000\u0000y\u01f1\u0001\u0000\u0000\u0000{\u01fc\u0001\u0000\u0000"+ + "\u0000}~\u0005i\u0000\u0000~\u007f\u0005m\u0000\u0000\u007f\u0080\u0005"+ + "p\u0000\u0000\u0080\u0081\u0005o\u0000\u0000\u0081\u0082\u0005r\u0000"+ + "\u0000\u0082\u0083\u0005t\u0000\u0000\u0083\u0002\u0001\u0000\u0000\u0000"+ + "\u0084\u0085\u0005m\u0000\u0000\u0085\u0086\u0005a\u0000\u0000\u0086\u0087"+ + "\u0005n\u0000\u0000\u0087\u0088\u0005d\u0000\u0000\u0088\u0089\u0005a"+ + "\u0000\u0000\u0089\u008a\u0005t\u0000\u0000\u008a\u008b\u0005o\u0000\u0000"+ + "\u008b\u008c\u0005r\u0000\u0000\u008c\u008d\u0005y\u0000\u0000\u008d\u0004"+ + "\u0001\u0000\u0000\u0000\u008e\u008f\u0005a\u0000\u0000\u008f\u0090\u0005"+ + "b\u0000\u0000\u0090\u0091\u0005s\u0000\u0000\u0091\u0092\u0005t\u0000"+ + "\u0000\u0092\u0093\u0005r\u0000\u0000\u0093\u0094\u0005a\u0000\u0000\u0094"+ + "\u0095\u0005c\u0000\u0000\u0095\u0096\u0005t\u0000\u0000\u0096\u0006\u0001"+ + "\u0000\u0000\u0000\u0097\u0098\u0005s\u0000\u0000\u0098\u0099\u0005o\u0000"+ + "\u0000\u0099\u009a\u0005m\u0000\u0000\u009a\u009b\u0005e\u0000\u0000\u009b"+ + "\u009c\u0005O\u0000\u0000\u009c\u009d\u0005f\u0000\u0000\u009d\b\u0001"+ + "\u0000\u0000\u0000\u009e\u009f\u0005o\u0000\u0000\u009f\u00a0\u0005n\u0000"+ + "\u0000\u00a0\u00a1\u0005e\u0000\u0000\u00a1\u00a2\u0005O\u0000\u0000\u00a2"+ + "\u00a3\u0005f\u0000\u0000\u00a3\n\u0001\u0000\u0000\u0000\u00a4\u00a5"+ + "\u0005c\u0000\u0000\u00a5\u00a6\u0005o\u0000\u0000\u00a6\u00a7\u0005n"+ + "\u0000\u0000\u00a7\u00a8\u0005c\u0000\u0000\u00a8\u00a9\u0005e\u0000\u0000"+ + "\u00a9\u00aa\u0005p\u0000\u0000\u00aa\u00ab\u0005t\u0000\u0000\u00ab\f"+ + "\u0001\u0000\u0000\u0000\u00ac\u00ad\u0005c\u0000\u0000\u00ad\u00ae\u0005"+ + "i\u0000\u0000\u00ae\u00af\u0005n\u0000\u0000\u00af\u00b0\u0005t\u0000"+ + "\u0000\u00b0\u00b1\u0005e\u0000\u0000\u00b1\u00b2\u0005r\u0000\u0000\u00b2"+ + "\u00b3\u0005f\u0000\u0000\u00b3\u00b4\u0005a\u0000\u0000\u00b4\u00b5\u0005"+ + "c\u0000\u0000\u00b5\u00b6\u0005e\u0000\u0000\u00b6\u000e\u0001\u0000\u0000"+ + "\u0000\u00b7\u00b8\u0005c\u0000\u0000\u00b8\u00b9\u0005o\u0000\u0000\u00b9"+ + "\u00ba\u0005n\u0000\u0000\u00ba\u00bb\u0005s\u0000\u0000\u00bb\u00bc\u0005"+ + "t\u0000\u0000\u00bc\u00bd\u0005r\u0000\u0000\u00bd\u00be\u0005a\u0000"+ + "\u0000\u00be\u00bf\u0005i\u0000\u0000\u00bf\u00c0\u0005n\u0000\u0000\u00c0"+ + "\u00c1\u0005t\u0000\u0000\u00c1\u0010\u0001\u0000\u0000\u0000\u00c2\u00c3"+ + "\u0005f\u0000\u0000\u00c3\u00c4\u0005e\u0000\u0000\u00c4\u00c5\u0005a"+ + "\u0000\u0000\u00c5\u00c6\u0005t\u0000\u0000\u00c6\u00c7\u0005u\u0000\u0000"+ + "\u00c7\u00c8\u0005r\u0000\u0000\u00c8\u00c9\u0005e\u0000\u0000\u00c9\u0012"+ + "\u0001\u0000\u0000\u0000\u00ca\u00cb\u0005u\u0000\u0000\u00cb\u00cc\u0005"+ + "s\u0000\u0000\u00cc\u00cd\u0005e\u0000\u0000\u00cd\u0014\u0001\u0000\u0000"+ + "\u0000\u00ce\u00cf\u0005i\u0000\u0000\u00cf\u00d0\u0005n\u0000\u0000\u00d0"+ + "\u00d1\u0005s\u0000\u0000\u00d1\u00d2\u0005t\u0000\u0000\u00d2\u00d3\u0005"+ + "a\u0000\u0000\u00d3\u00d4\u0005n\u0000\u0000\u00d4\u00d5\u0005c\u0000"+ + "\u0000\u00d5\u00d6\u0005e\u0000\u0000\u00d6\u0016\u0001\u0000\u0000\u0000"+ + "\u00d7\u00d8\u0005i\u0000\u0000\u00d8\u00d9\u0005n\u0000\u0000\u00d9\u00da"+ + "\u0005t\u0000\u0000\u00da\u00db\u0005e\u0000\u0000\u00db\u00dc\u0005r"+ + "\u0000\u0000\u00dc\u00dd\u0005f\u0000\u0000\u00dd\u00de\u0005a\u0000\u0000"+ + "\u00de\u00df\u0005c\u0000\u0000\u00df\u00e0\u0005e\u0000\u0000\u00e0\u0018"+ + "\u0001\u0000\u0000\u0000\u00e1\u00e2\u0005d\u0000\u0000\u00e2\u00e3\u0005"+ + "e\u0000\u0000\u00e3\u00e4\u0005s\u0000\u0000\u00e4\u00e5\u0005c\u0000"+ + "\u0000\u00e5\u00e6\u0005r\u0000\u0000\u00e6\u00e7\u0005i\u0000\u0000\u00e7"+ + "\u00e8\u0005p\u0000\u0000\u00e8\u00e9\u0005t\u0000\u0000\u00e9\u00ea\u0005"+ + "i\u0000\u0000\u00ea\u00eb\u0005o\u0000\u0000\u00eb\u00ec\u0005n\u0000"+ + "\u0000\u00ec\u001a\u0001\u0000\u0000\u0000\u00ed\u00ee\u0005i\u0000\u0000"+ + "\u00ee\u00ef\u0005n\u0000\u0000\u00ef\u00f0\u0005t\u0000\u0000\u00f0\u001c"+ + "\u0001\u0000\u0000\u0000\u00f1\u00f2\u0005f\u0000\u0000\u00f2\u00f3\u0005"+ + "l\u0000\u0000\u00f3\u00f4\u0005o\u0000\u0000\u00f4\u00f5\u0005a\u0000"+ + "\u0000\u00f5\u00f6\u0005t\u0000\u0000\u00f6\u001e\u0001\u0000\u0000\u0000"+ + "\u00f7\u00f8\u0005s\u0000\u0000\u00f8\u00f9\u0005t\u0000\u0000\u00f9\u00fa"+ + "\u0005r\u0000\u0000\u00fa\u00fb\u0005i\u0000\u0000\u00fb\u00fc\u0005n"+ + "\u0000\u0000\u00fc\u00fd\u0005g\u0000\u0000\u00fd \u0001\u0000\u0000\u0000"+ + "\u00fe\u00ff\u0005b\u0000\u0000\u00ff\u0100\u0005o\u0000\u0000\u0100\u0101"+ + "\u0005o\u0000\u0000\u0101\u0102\u0005l\u0000\u0000\u0102\"\u0001\u0000"+ + "\u0000\u0000\u0103\u0104\u0005;\u0000\u0000\u0104$\u0001\u0000\u0000\u0000"+ + "\u0105\u0106\u0005{\u0000\u0000\u0106&\u0001\u0000\u0000\u0000\u0107\u0108"+ + "\u0005}\u0000\u0000\u0108(\u0001\u0000\u0000\u0000\u0109\u010a\u0005("+ + "\u0000\u0000\u010a*\u0001\u0000\u0000\u0000\u010b\u010c\u0005)\u0000\u0000"+ + "\u010c,\u0001\u0000\u0000\u0000\u010d\u010e\u0005=\u0000\u0000\u010e."+ + "\u0001\u0000\u0000\u0000\u010f\u0110\u0005,\u0000\u0000\u01100\u0001\u0000"+ + "\u0000\u0000\u0111\u0112\u0005:\u0000\u0000\u01122\u0001\u0000\u0000\u0000"+ + "\u0113\u0114\u0005+\u0000\u0000\u01144\u0001\u0000\u0000\u0000\u0115\u0116"+ + "\u0005-\u0000\u0000\u01166\u0001\u0000\u0000\u0000\u0117\u0118\u0005!"+ + "\u0000\u0000\u01188\u0001\u0000\u0000\u0000\u0119\u011a\u0005&\u0000\u0000"+ + "\u011a\u011b\u0005&\u0000\u0000\u011b:\u0001\u0000\u0000\u0000\u011c\u011d"+ + "\u0005|\u0000\u0000\u011d\u011e\u0005|\u0000\u0000\u011e<\u0001\u0000"+ + "\u0000\u0000\u011f\u0120\u0005x\u0000\u0000\u0120\u0121\u0005o\u0000\u0000"+ + "\u0121\u0122\u0005r\u0000\u0000\u0122>\u0001\u0000\u0000\u0000\u0123\u0124"+ + "\u0005-\u0000\u0000\u0124\u0125\u0005>\u0000\u0000\u0125@\u0001\u0000"+ + "\u0000\u0000\u0126\u0127\u0005<\u0000\u0000\u0127\u0128\u0005-\u0000\u0000"+ + "\u0128\u0129\u0005>\u0000\u0000\u0129B\u0001\u0000\u0000\u0000\u012a\u012b"+ + "\u0005=\u0000\u0000\u012b\u012c\u0005=\u0000\u0000\u012cD\u0001\u0000"+ + "\u0000\u0000\u012d\u012e\u0005!\u0000\u0000\u012e\u012f\u0005=\u0000\u0000"+ + "\u012fF\u0001\u0000\u0000\u0000\u0130\u0131\u0005>\u0000\u0000\u0131H"+ + "\u0001\u0000\u0000\u0000\u0132\u0133\u0005<\u0000\u0000\u0133J\u0001\u0000"+ + "\u0000\u0000\u0134\u0135\u0005>\u0000\u0000\u0135\u0136\u0005=\u0000\u0000"+ + "\u0136L\u0001\u0000\u0000\u0000\u0137\u0138\u0005<\u0000\u0000\u0138\u0139"+ + "\u0005=\u0000\u0000\u0139N\u0001\u0000\u0000\u0000\u013a\u013b\u0005E"+ + "\u0000\u0000\u013b\u013c\u0005M\u0000\u0000\u013c\u013d\u0005P\u0000\u0000"+ + "\u013d\u013e\u0005T\u0000\u0000\u013e\u013f\u0005Y\u0000\u0000\u013fP"+ + "\u0001\u0000\u0000\u0000\u0140\u0141\u0005C\u0000\u0000\u0141\u0142\u0005"+ + "O\u0000\u0000\u0142\u0143\u0005N\u0000\u0000\u0143\u0144\u0005S\u0000"+ + "\u0000\u0144\u0145\u0005T\u0000\u0000\u0145\u0146\u0005R\u0000\u0000\u0146"+ + "R\u0001\u0000\u0000\u0000\u0147\u0148\u0005A\u0000\u0000\u0148\u0149\u0005"+ + "C\u0000\u0000\u0149\u014a\u0005O\u0000\u0000\u014a\u014b\u0005N\u0000"+ + "\u0000\u014b\u014c\u0005S\u0000\u0000\u014c\u014d\u0005T\u0000\u0000\u014d"+ + "\u014e\u0005R\u0000\u0000\u014eT\u0001\u0000\u0000\u0000\u014f\u0150\u0005"+ + "B\u0000\u0000\u0150\u0151\u0005A\u0000\u0000\u0151\u0152\u0005S\u0000"+ + "\u0000\u0152\u0153\u0005E\u0000\u0000\u0153\u0154\u0005E\u0000\u0000\u0154"+ + "\u0155\u0005X\u0000\u0000\u0155\u0156\u0005T\u0000\u0000\u0156V\u0001"+ + "\u0000\u0000\u0000\u0157\u0158\u0005D\u0000\u0000\u0158\u0159\u0005E\u0000"+ + "\u0000\u0159\u015a\u0005F\u0000\u0000\u015aX\u0001\u0000\u0000\u0000\u015b"+ + "\u015c\u0005G\u0000\u0000\u015c\u015d\u0005R\u0000\u0000\u015d\u015e\u0005"+ + "O\u0000\u0000\u015e\u015f\u0005U\u0000\u0000\u015f\u0160\u0005P\u0000"+ + "\u0000\u0160Z\u0001\u0000\u0000\u0000\u0161\u0162\u0005A\u0000\u0000\u0162"+ + "\u0163\u0005T\u0000\u0000\u0163\u0164\u0005T\u0000\u0000\u0164\u0165\u0005"+ + "R\u0000\u0000\u0165\\\u0001\u0000\u0000\u0000\u0166\u0167\u0005U\u0000"+ + "\u0000\u0167\u0168\u0005N\u0000\u0000\u0168\u0169\u0005A\u0000\u0000\u0169"+ + "\u016a\u0005R\u0000\u0000\u016a\u016b\u0005Y\u0000\u0000\u016b\u016c\u0005"+ + "O\u0000\u0000\u016c\u016d\u0005P\u0000\u0000\u016d^\u0001\u0000\u0000"+ + "\u0000\u016e\u016f\u0005O\u0000\u0000\u016f\u0170\u0005P\u0000\u0000\u0170"+ + "\u0171\u0005E\u0000\u0000\u0171\u0172\u0005R\u0000\u0000\u0172\u0173\u0005"+ + "A\u0000\u0000\u0173\u0174\u0005N\u0000\u0000\u0174\u0175\u0005D\u0000"+ + "\u0000\u0175`\u0001\u0000\u0000\u0000\u0176\u0177\u0005t\u0000\u0000\u0177"+ + "\u0178\u0005r\u0000\u0000\u0178\u0179\u0005u\u0000\u0000\u0179\u0180\u0005"+ + "e\u0000\u0000\u017a\u017b\u0005f\u0000\u0000\u017b\u017c\u0005a\u0000"+ + "\u0000\u017c\u017d\u0005l\u0000\u0000\u017d\u017e\u0005s\u0000\u0000\u017e"+ + "\u0180\u0005e\u0000\u0000\u017f\u0176\u0001\u0000\u0000\u0000\u017f\u017a"+ + "\u0001\u0000\u0000\u0000\u0180b\u0001\u0000\u0000\u0000\u0181\u0185\u0007"+ + "\u0000\u0000\u0000\u0182\u0184\u0007\u0001\u0000\u0000\u0183\u0182\u0001"+ + "\u0000\u0000\u0000\u0184\u0187\u0001\u0000\u0000\u0000\u0185\u0183\u0001"+ + "\u0000\u0000\u0000\u0185\u0186\u0001\u0000\u0000\u0000\u0186d\u0001\u0000"+ + "\u0000\u0000\u0187\u0185\u0001\u0000\u0000\u0000\u0188\u018b\u0003c1\u0000"+ + "\u0189\u018a\u0005.\u0000\u0000\u018a\u018c\u0003c1\u0000\u018b\u0189"+ + "\u0001\u0000\u0000\u0000\u018c\u018d\u0001\u0000\u0000\u0000\u018d\u018b"+ + "\u0001\u0000\u0000\u0000\u018d\u018e\u0001\u0000\u0000\u0000\u018ef\u0001"+ + "\u0000\u0000\u0000\u018f\u0191\u000209\u0000\u0190\u018f\u0001\u0000\u0000"+ + "\u0000\u0191\u0192\u0001\u0000\u0000\u0000\u0192\u0190\u0001\u0000\u0000"+ + "\u0000\u0192\u0193\u0001\u0000\u0000\u0000\u0193h\u0001\u0000\u0000\u0000"+ + "\u0194\u0196\u000209\u0000\u0195\u0194\u0001\u0000\u0000\u0000\u0196\u0197"+ + "\u0001\u0000\u0000\u0000\u0197\u0195\u0001\u0000\u0000\u0000\u0197\u0198"+ + "\u0001\u0000\u0000\u0000\u0198\u0199\u0001\u0000\u0000\u0000\u0199\u019d"+ + "\u0005.\u0000\u0000\u019a\u019c\u000209\u0000\u019b\u019a\u0001\u0000"+ + "\u0000\u0000\u019c\u019f\u0001\u0000\u0000\u0000\u019d\u019b\u0001\u0000"+ + "\u0000\u0000\u019d\u019e\u0001\u0000\u0000\u0000\u019e\u01a1\u0001\u0000"+ + "\u0000\u0000\u019f\u019d\u0001\u0000\u0000\u0000\u01a0\u01a2\u0003m6\u0000"+ + "\u01a1\u01a0\u0001\u0000\u0000\u0000\u01a1\u01a2\u0001\u0000\u0000\u0000"+ + "\u01a2\u01b3\u0001\u0000\u0000\u0000\u01a3\u01a5\u0005.\u0000\u0000\u01a4"+ + "\u01a6\u000209\u0000\u01a5\u01a4\u0001\u0000\u0000\u0000\u01a6\u01a7\u0001"+ + "\u0000\u0000\u0000\u01a7\u01a5\u0001\u0000\u0000\u0000\u01a7\u01a8\u0001"+ + "\u0000\u0000\u0000\u01a8\u01aa\u0001\u0000\u0000\u0000\u01a9\u01ab\u0003"+ + "m6\u0000\u01aa\u01a9\u0001\u0000\u0000\u0000\u01aa\u01ab\u0001\u0000\u0000"+ + "\u0000\u01ab\u01b3\u0001\u0000\u0000\u0000\u01ac\u01ae\u000209\u0000\u01ad"+ + "\u01ac\u0001\u0000\u0000\u0000\u01ae\u01af\u0001\u0000\u0000\u0000\u01af"+ + "\u01ad\u0001\u0000\u0000\u0000\u01af\u01b0\u0001\u0000\u0000\u0000\u01b0"+ + "\u01b1\u0001\u0000\u0000\u0000\u01b1\u01b3\u0003m6\u0000\u01b2\u0195\u0001"+ + "\u0000\u0000\u0000\u01b2\u01a3\u0001\u0000\u0000\u0000\u01b2\u01ad\u0001"+ + "\u0000\u0000\u0000\u01b3j\u0001\u0000\u0000\u0000\u01b4\u01b9\u0005\""+ + "\u0000\u0000\u01b5\u01b8\u0003q8\u0000\u01b6\u01b8\b\u0002\u0000\u0000"+ + "\u01b7\u01b5\u0001\u0000\u0000\u0000\u01b7\u01b6\u0001\u0000\u0000\u0000"+ + "\u01b8\u01bb\u0001\u0000\u0000\u0000\u01b9\u01b7\u0001\u0000\u0000\u0000"+ + "\u01b9\u01ba\u0001\u0000\u0000\u0000\u01ba\u01bc\u0001\u0000\u0000\u0000"+ + "\u01bb\u01b9\u0001\u0000\u0000\u0000\u01bc\u01bd\u0005\"\u0000\u0000\u01bd"+ + "l\u0001\u0000\u0000\u0000\u01be\u01c0\u0007\u0003\u0000\u0000\u01bf\u01c1"+ + "\u0007\u0004\u0000\u0000\u01c0\u01bf\u0001\u0000\u0000\u0000\u01c0\u01c1"+ + "\u0001\u0000\u0000\u0000\u01c1\u01c3\u0001\u0000\u0000\u0000\u01c2\u01c4"+ + "\u000209\u0000\u01c3\u01c2\u0001\u0000\u0000\u0000\u01c4\u01c5\u0001\u0000"+ + "\u0000\u0000\u01c5\u01c3\u0001\u0000\u0000\u0000\u01c5\u01c6\u0001\u0000"+ + "\u0000\u0000\u01c6n\u0001\u0000\u0000\u0000\u01c7\u01c8\u0007\u0005\u0000"+ + "\u0000\u01c8p\u0001\u0000\u0000\u0000\u01c9\u01ce\u0005\\\u0000\u0000"+ + "\u01ca\u01cf\u0007\u0006\u0000\u0000\u01cb\u01cc\u0005\\\u0000\u0000\u01cc"+ + "\u01cf\u0005\"\u0000\u0000\u01cd\u01cf\u0007\u0007\u0000\u0000\u01ce\u01ca"+ + "\u0001\u0000\u0000\u0000\u01ce\u01cb\u0001\u0000\u0000\u0000\u01ce\u01cd"+ + "\u0001\u0000\u0000\u0000\u01cf\u01d3\u0001\u0000\u0000\u0000\u01d0\u01d3"+ + "\u0003u:\u0000\u01d1\u01d3\u0003s9\u0000\u01d2\u01c9\u0001\u0000\u0000"+ + "\u0000\u01d2\u01d0\u0001\u0000\u0000\u0000\u01d2\u01d1\u0001\u0000\u0000"+ + "\u0000\u01d3r\u0001\u0000\u0000\u0000\u01d4\u01d5\u0005\\\u0000\u0000"+ + "\u01d5\u01d6\u000203\u0000\u01d6\u01d8\u000207\u0000\u01d7\u01d9\u0002"+ + "07\u0000\u01d8\u01d7\u0001\u0000\u0000\u0000\u01d8\u01d9\u0001\u0000\u0000"+ + "\u0000\u01d9\u01e2\u0001\u0000\u0000\u0000\u01da\u01db\u0005\\\u0000\u0000"+ + "\u01db\u01dd\u000207\u0000\u01dc\u01de\u000207\u0000\u01dd\u01dc\u0001"+ + "\u0000\u0000\u0000\u01dd\u01de\u0001\u0000\u0000\u0000\u01de\u01e2\u0001"+ + "\u0000\u0000\u0000\u01df\u01e0\u0005\\\u0000\u0000\u01e0\u01e2\u00020"+ + "7\u0000\u01e1\u01d4\u0001\u0000\u0000\u0000\u01e1\u01da\u0001\u0000\u0000"+ + "\u0000\u01e1\u01df\u0001\u0000\u0000\u0000\u01e2t\u0001\u0000\u0000\u0000"+ + "\u01e3\u01e4\u0005\\\u0000\u0000\u01e4\u01e5\u0005u\u0000\u0000\u01e5"+ + "\u01e6\u0003o7\u0000\u01e6\u01e7\u0003o7\u0000\u01e7\u01e8\u0003o7\u0000"+ + "\u01e8\u01e9\u0003o7\u0000\u01e9v\u0001\u0000\u0000\u0000\u01ea\u01ec"+ + "\u0007\b\u0000\u0000\u01eb\u01ea\u0001\u0000\u0000\u0000\u01ec\u01ed\u0001"+ + "\u0000\u0000\u0000\u01ed\u01eb\u0001\u0000\u0000\u0000\u01ed\u01ee\u0001"+ + "\u0000\u0000\u0000\u01ee\u01ef\u0001\u0000\u0000\u0000\u01ef\u01f0\u0006"+ + ";\u0000\u0000\u01f0x\u0001\u0000\u0000\u0000\u01f1\u01f2\u0005/\u0000"+ + "\u0000\u01f2\u01f3\u0005/\u0000\u0000\u01f3\u01f7\u0001\u0000\u0000\u0000"+ + "\u01f4\u01f6\b\t\u0000\u0000\u01f5\u01f4\u0001\u0000\u0000\u0000\u01f6"+ + "\u01f9\u0001\u0000\u0000\u0000\u01f7\u01f5\u0001\u0000\u0000\u0000\u01f7"+ + "\u01f8\u0001\u0000\u0000\u0000\u01f8\u01fa\u0001\u0000\u0000\u0000\u01f9"+ + "\u01f7\u0001\u0000\u0000\u0000\u01fa\u01fb\u0006<\u0000\u0000\u01fbz\u0001"+ + "\u0000\u0000\u0000\u01fc\u01fd\u0005/\u0000\u0000\u01fd\u01fe\u0005*\u0000"+ + "\u0000\u01fe\u0202\u0001\u0000\u0000\u0000\u01ff\u0201\t\u0000\u0000\u0000"+ + "\u0200\u01ff\u0001\u0000\u0000\u0000\u0201\u0204\u0001\u0000\u0000\u0000"+ + "\u0202\u0203\u0001\u0000\u0000\u0000\u0202\u0200\u0001\u0000\u0000\u0000"+ + "\u0203\u0205\u0001\u0000\u0000\u0000\u0204\u0202\u0001\u0000\u0000\u0000"+ + "\u0205\u0206\u0005*\u0000\u0000\u0206\u0207\u0005/\u0000\u0000\u0207\u0208"+ + "\u0001\u0000\u0000\u0000\u0208\u0209\u0006=\u0000\u0000\u0209|\u0001\u0000"+ + "\u0000\u0000\u0018\u0000\u017f\u0185\u018d\u0192\u0197\u019d\u01a1\u01a7"+ + "\u01aa\u01af\u01b2\u01b7\u01b9\u01c0\u01c5\u01ce\u01d2\u01d8\u01dd\u01e1"+ + "\u01ed\u01f7\u0202\u0001\u0006\u0000\u0000"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { - final int numStates = DFA19_transitionS.length; - DFA19_transition = new short[numStates][]; - for (int i = 0; i < numStates; i++) { - DFA19_transition[i] = DFA.unpackEncodedString(DFA19_transitionS[i]); - } - } - - class DFA19 extends DFA { - - public DFA19(BaseRecognizer recognizer) { - this.recognizer = recognizer; - decisionNumber = 19; - eot = DFA19_eot; - eof = DFA19_eof; - min = DFA19_min; - max = DFA19_max; - accept = DFA19_accept; - special = DFA19_special; - transition = DFA19_transition; - } - - @Override - public String getDescription() { - return "1:1: Tokens : ( ABSTRACT | ATTR_OP_EQUALS | ATTR_OP_GREATER | ATTR_OP_GREATER_EQ | ATTR_OP_LESS | ATTR_OP_LESS_EQ | ATTR_OP_NOT_EQUALS | CINTERFACE | COLON | COMMA | CONCEPT | CONSTRAINT | DESCRIPTION | END_C | END_R | EQ | FEATURE | IMPORT | IMPORTINSTANCE | IMPORTINTERFACE | MANDATORY | MINUS | ONEOF | OP_AND | OP_EQUIVALENT | OP_IMPLIES | OP_NOT | OP_OR | OP_XOR | PLUS | SEMI | SOMEOF | START_C | START_R | USE | VAR_BOOL | VAR_FLOAT | VAR_INT | VAR_STRING | BOOLEAN | ID | IDPath | INT | FLOAT | STRING | WS | SL_COMMENT | ML_COMMENT );"; + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); } } - -} +} \ No newline at end of file diff --git a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetLexer.tokens b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetLexer.tokens new file mode 100644 index 0000000000..3c8e8941ac --- /dev/null +++ b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetLexer.tokens @@ -0,0 +1,105 @@ +IMPORT=1 +MANDATORY=2 +ABSTRACT=3 +SOMEOF=4 +ONEOF=5 +CONCEPT=6 +CINTERFACE=7 +CONSTRAINT=8 +FEATURE=9 +USE=10 +IMPORTINSTANCE=11 +IMPORTINTERFACE=12 +DESCRIPTION=13 +VAR_INT=14 +VAR_FLOAT=15 +VAR_STRING=16 +VAR_BOOL=17 +SEMI=18 +START_C=19 +END_C=20 +START_R=21 +END_R=22 +EQ=23 +COMMA=24 +COLON=25 +PLUS=26 +MINUS=27 +OP_NOT=28 +OP_AND=29 +OP_OR=30 +OP_XOR=31 +OP_IMPLIES=32 +OP_EQUIVALENT=33 +ATTR_OP_EQUALS=34 +ATTR_OP_NOT_EQUALS=35 +ATTR_OP_GREATER=36 +ATTR_OP_LESS=37 +ATTR_OP_GREATER_EQ=38 +ATTR_OP_LESS_EQ=39 +EMPTY=40 +CONSTR=41 +ACONSTR=42 +BASEEXT=43 +DEF=44 +GROUP=45 +ATTR=46 +UNARYOP=47 +OPERAND=48 +BOOLEAN=49 +ID=50 +IDPath=51 +INT=52 +FLOAT=53 +STRING=54 +WS=55 +SL_COMMENT=56 +ML_COMMENT=57 +'import'=1 +'mandatory'=2 +'abstract'=3 +'someOf'=4 +'oneOf'=5 +'concept'=6 +'cinterface'=7 +'constraint'=8 +'feature'=9 +'use'=10 +'instance'=11 +'interface'=12 +'description'=13 +'int'=14 +'float'=15 +'string'=16 +'bool'=17 +';'=18 +'{'=19 +'}'=20 +'('=21 +')'=22 +'='=23 +','=24 +':'=25 +'+'=26 +'-'=27 +'!'=28 +'&&'=29 +'||'=30 +'xor'=31 +'->'=32 +'<->'=33 +'=='=34 +'!='=35 +'>'=36 +'<'=37 +'>='=38 +'<='=39 +'EMPTY'=40 +'CONSTR'=41 +'ACONSTR'=42 +'BASEEXT'=43 +'DEF'=44 +'GROUP'=45 +'ATTR'=46 +'UNARYOP'=47 +'OPERAND'=48 diff --git a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetListener.java b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetListener.java new file mode 100644 index 0000000000..37bbe342df --- /dev/null +++ b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetListener.java @@ -0,0 +1,323 @@ +// Generated from Velvet.g4 by ANTLR 4.13.2 + +package de.ovgu.featureide.fm.core.io.velvet; + +import de.ovgu.featureide.fm.core.FMCorePlugin; +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link VelvetParser}. + */ +public interface VelvetListener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link VelvetParser#velvetModel}. + * @param ctx the parse tree + */ + void enterVelvetModel(VelvetParser.VelvetModelContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#velvetModel}. + * @param ctx the parse tree + */ + void exitVelvetModel(VelvetParser.VelvetModelContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#imp}. + * @param ctx the parse tree + */ + void enterImp(VelvetParser.ImpContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#imp}. + * @param ctx the parse tree + */ + void exitImp(VelvetParser.ImpContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#concept}. + * @param ctx the parse tree + */ + void enterConcept(VelvetParser.ConceptContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#concept}. + * @param ctx the parse tree + */ + void exitConcept(VelvetParser.ConceptContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#cinterface}. + * @param ctx the parse tree + */ + void enterCinterface(VelvetParser.CinterfaceContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#cinterface}. + * @param ctx the parse tree + */ + void exitCinterface(VelvetParser.CinterfaceContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#conceptBaseExt}. + * @param ctx the parse tree + */ + void enterConceptBaseExt(VelvetParser.ConceptBaseExtContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#conceptBaseExt}. + * @param ctx the parse tree + */ + void exitConceptBaseExt(VelvetParser.ConceptBaseExtContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#instanceImports}. + * @param ctx the parse tree + */ + void enterInstanceImports(VelvetParser.InstanceImportsContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#instanceImports}. + * @param ctx the parse tree + */ + void exitInstanceImports(VelvetParser.InstanceImportsContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#interfaceImports}. + * @param ctx the parse tree + */ + void enterInterfaceImports(VelvetParser.InterfaceImportsContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#interfaceImports}. + * @param ctx the parse tree + */ + void exitInterfaceImports(VelvetParser.InterfaceImportsContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#name}. + * @param ctx the parse tree + */ + void enterName(VelvetParser.NameContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#name}. + * @param ctx the parse tree + */ + void exitName(VelvetParser.NameContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#definitions}. + * @param ctx the parse tree + */ + void enterDefinitions(VelvetParser.DefinitionsContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#definitions}. + * @param ctx the parse tree + */ + void exitDefinitions(VelvetParser.DefinitionsContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#definition}. + * @param ctx the parse tree + */ + void enterDefinition(VelvetParser.DefinitionContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#definition}. + * @param ctx the parse tree + */ + void exitDefinition(VelvetParser.DefinitionContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#nonFeatureDefinition}. + * @param ctx the parse tree + */ + void enterNonFeatureDefinition(VelvetParser.NonFeatureDefinitionContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#nonFeatureDefinition}. + * @param ctx the parse tree + */ + void exitNonFeatureDefinition(VelvetParser.NonFeatureDefinitionContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#use}. + * @param ctx the parse tree + */ + void enterUse(VelvetParser.UseContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#use}. + * @param ctx the parse tree + */ + void exitUse(VelvetParser.UseContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#feature}. + * @param ctx the parse tree + */ + void enterFeature(VelvetParser.FeatureContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#feature}. + * @param ctx the parse tree + */ + void exitFeature(VelvetParser.FeatureContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#featureGroup}. + * @param ctx the parse tree + */ + void enterFeatureGroup(VelvetParser.FeatureGroupContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#featureGroup}. + * @param ctx the parse tree + */ + void exitFeatureGroup(VelvetParser.FeatureGroupContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#groupType}. + * @param ctx the parse tree + */ + void enterGroupType(VelvetParser.GroupTypeContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#groupType}. + * @param ctx the parse tree + */ + void exitGroupType(VelvetParser.GroupTypeContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#description}. + * @param ctx the parse tree + */ + void enterDescription(VelvetParser.DescriptionContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#description}. + * @param ctx the parse tree + */ + void exitDescription(VelvetParser.DescriptionContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#constraint}. + * @param ctx the parse tree + */ + void enterConstraint(VelvetParser.ConstraintContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#constraint}. + * @param ctx the parse tree + */ + void exitConstraint(VelvetParser.ConstraintContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#constraintDefinition}. + * @param ctx the parse tree + */ + void enterConstraintDefinition(VelvetParser.ConstraintDefinitionContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#constraintDefinition}. + * @param ctx the parse tree + */ + void exitConstraintDefinition(VelvetParser.ConstraintDefinitionContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#constraintOperand}. + * @param ctx the parse tree + */ + void enterConstraintOperand(VelvetParser.ConstraintOperandContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#constraintOperand}. + * @param ctx the parse tree + */ + void exitConstraintOperand(VelvetParser.ConstraintOperandContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#attribute}. + * @param ctx the parse tree + */ + void enterAttribute(VelvetParser.AttributeContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#attribute}. + * @param ctx the parse tree + */ + void exitAttribute(VelvetParser.AttributeContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#attributeConstraint}. + * @param ctx the parse tree + */ + void enterAttributeConstraint(VelvetParser.AttributeConstraintContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#attributeConstraint}. + * @param ctx the parse tree + */ + void exitAttributeConstraint(VelvetParser.AttributeConstraintContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#attribNumExpr}. + * @param ctx the parse tree + */ + void enterAttribNumExpr(VelvetParser.AttribNumExprContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#attribNumExpr}. + * @param ctx the parse tree + */ + void exitAttribNumExpr(VelvetParser.AttribNumExprContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#attribOperator}. + * @param ctx the parse tree + */ + void enterAttribOperator(VelvetParser.AttribOperatorContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#attribOperator}. + * @param ctx the parse tree + */ + void exitAttribOperator(VelvetParser.AttribOperatorContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#attribNumInstance}. + * @param ctx the parse tree + */ + void enterAttribNumInstance(VelvetParser.AttribNumInstanceContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#attribNumInstance}. + * @param ctx the parse tree + */ + void exitAttribNumInstance(VelvetParser.AttribNumInstanceContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#intAttribute}. + * @param ctx the parse tree + */ + void enterIntAttribute(VelvetParser.IntAttributeContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#intAttribute}. + * @param ctx the parse tree + */ + void exitIntAttribute(VelvetParser.IntAttributeContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#floatAttribute}. + * @param ctx the parse tree + */ + void enterFloatAttribute(VelvetParser.FloatAttributeContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#floatAttribute}. + * @param ctx the parse tree + */ + void exitFloatAttribute(VelvetParser.FloatAttributeContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#stringAttribute}. + * @param ctx the parse tree + */ + void enterStringAttribute(VelvetParser.StringAttributeContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#stringAttribute}. + * @param ctx the parse tree + */ + void exitStringAttribute(VelvetParser.StringAttributeContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#boolAttribute}. + * @param ctx the parse tree + */ + void enterBoolAttribute(VelvetParser.BoolAttributeContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#boolAttribute}. + * @param ctx the parse tree + */ + void exitBoolAttribute(VelvetParser.BoolAttributeContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#unaryOp}. + * @param ctx the parse tree + */ + void enterUnaryOp(VelvetParser.UnaryOpContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#unaryOp}. + * @param ctx the parse tree + */ + void exitUnaryOp(VelvetParser.UnaryOpContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#binaryOp}. + * @param ctx the parse tree + */ + void enterBinaryOp(VelvetParser.BinaryOpContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#binaryOp}. + * @param ctx the parse tree + */ + void exitBinaryOp(VelvetParser.BinaryOpContext ctx); + /** + * Enter a parse tree produced by {@link VelvetParser#attribRelation}. + * @param ctx the parse tree + */ + void enterAttribRelation(VelvetParser.AttribRelationContext ctx); + /** + * Exit a parse tree produced by {@link VelvetParser#attribRelation}. + * @param ctx the parse tree + */ + void exitAttribRelation(VelvetParser.AttribRelationContext ctx); +} \ No newline at end of file diff --git a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetParser.java b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetParser.java index 053f4ce203..8c1e26272d 100644 --- a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetParser.java +++ b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetParser.java @@ -1,4051 +1,2537 @@ -// $ANTLR 3.4 Velvet.g 2016-07-17 21:07:30 -/* FeatureIDE - A Framework for Feature-Oriented Software Development - * Copyright (C) 2005-2019 FeatureIDE team, University of Magdeburg, Germany - * - * This file is part of FeatureIDE. - * - * FeatureIDE is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * FeatureIDE is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with FeatureIDE. If not, see . - * - * See http://featureide.cs.ovgu.de/ for further information. - */ +// Generated from Velvet.g4 by ANTLR 4.13.2 + package de.ovgu.featureide.fm.core.io.velvet; -import org.antlr.runtime.BaseRecognizer; -import org.antlr.runtime.BitSet; -import org.antlr.runtime.DFA; -import org.antlr.runtime.EarlyExitException; -import org.antlr.runtime.MismatchedSetException; -import org.antlr.runtime.NoViableAltException; -import org.antlr.runtime.Parser; -import org.antlr.runtime.ParserRuleReturnScope; -import org.antlr.runtime.RecognitionException; -import org.antlr.runtime.RecognizerSharedState; -import org.antlr.runtime.Token; -import org.antlr.runtime.TokenStream; -import org.antlr.runtime.tree.CommonTreeAdaptor; -import org.antlr.runtime.tree.RewriteEarlyExitException; -import org.antlr.runtime.tree.RewriteRuleSubtreeStream; -import org.antlr.runtime.tree.RewriteRuleTokenStream; -import org.antlr.runtime.tree.Tree; -import org.antlr.runtime.tree.TreeAdaptor; - -import de.ovgu.featureide.fm.core.Logger; - -@SuppressWarnings({ "all", "warnings", "unchecked" }) +import de.ovgu.featureide.fm.core.FMCorePlugin; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.misc.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; +import java.util.Iterator; +import java.util.ArrayList; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue", "this-escape"}) public class VelvetParser extends Parser { - - public static final String[] tokenNames = new String[] { "", "", "", "", "ABSTRACT", "ACONSTR", "ATTR", "ATTR_OP_EQUALS", - "ATTR_OP_GREATER", "ATTR_OP_GREATER_EQ", "ATTR_OP_LESS", "ATTR_OP_LESS_EQ", "ATTR_OP_NOT_EQUALS", "BASEEXT", "BOOLEAN", "CINTERFACE", "COLON", "COMMA", - "CONCEPT", "CONSTR", "CONSTRAINT", "DEF", "DESCRIPTION", "EMPTY", "END_C", "END_R", "EQ", "ESC_SEQ", "EXPONENT", "FEATURE", "FLOAT", "GROUP", - "HEX_DIGIT", "ID", "IDPath", "IMPORT", "IMPORTINSTANCE", "IMPORTINTERFACE", "INT", "MANDATORY", "MINUS", "ML_COMMENT", "OCTAL_ESC", "ONEOF", "OPERAND", - "OP_AND", "OP_EQUIVALENT", "OP_IMPLIES", "OP_NOT", "OP_OR", "OP_XOR", "PLUS", "SEMI", "SL_COMMENT", "SOMEOF", "START_C", "START_R", "STRING", "UNARYOP", - "UNICODE_ESC", "USE", "VAR_BOOL", "VAR_FLOAT", "VAR_INT", "VAR_STRING", "WS" }; - - public static final int EOF = -1; - public static final int ABSTRACT = 4; - public static final int ACONSTR = 5; - public static final int ATTR = 6; - public static final int ATTR_OP_EQUALS = 7; - public static final int ATTR_OP_GREATER = 8; - public static final int ATTR_OP_GREATER_EQ = 9; - public static final int ATTR_OP_LESS = 10; - public static final int ATTR_OP_LESS_EQ = 11; - public static final int ATTR_OP_NOT_EQUALS = 12; - public static final int BASEEXT = 13; - public static final int BOOLEAN = 14; - public static final int CINTERFACE = 15; - public static final int COLON = 16; - public static final int COMMA = 17; - public static final int CONCEPT = 18; - public static final int CONSTR = 19; - public static final int CONSTRAINT = 20; - public static final int DEF = 21; - public static final int DESCRIPTION = 22; - public static final int EMPTY = 23; - public static final int END_C = 24; - public static final int END_R = 25; - public static final int EQ = 26; - public static final int ESC_SEQ = 27; - public static final int EXPONENT = 28; - public static final int FEATURE = 29; - public static final int FLOAT = 30; - public static final int GROUP = 31; - public static final int HEX_DIGIT = 32; - public static final int ID = 33; - public static final int IDPath = 34; - public static final int IMPORT = 35; - public static final int IMPORTINSTANCE = 36; - public static final int IMPORTINTERFACE = 37; - public static final int INT = 38; - public static final int MANDATORY = 39; - public static final int MINUS = 40; - public static final int ML_COMMENT = 41; - public static final int OCTAL_ESC = 42; - public static final int ONEOF = 43; - public static final int OPERAND = 44; - public static final int OP_AND = 45; - public static final int OP_EQUIVALENT = 46; - public static final int OP_IMPLIES = 47; - public static final int OP_NOT = 48; - public static final int OP_OR = 49; - public static final int OP_XOR = 50; - public static final int PLUS = 51; - public static final int SEMI = 52; - public static final int SL_COMMENT = 53; - public static final int SOMEOF = 54; - public static final int START_C = 55; - public static final int START_R = 56; - public static final int STRING = 57; - public static final int UNARYOP = 58; - public static final int UNICODE_ESC = 59; - public static final int USE = 60; - public static final int VAR_BOOL = 61; - public static final int VAR_FLOAT = 62; - public static final int VAR_INT = 63; - public static final int VAR_STRING = 64; - public static final int WS = 65; - - // delegates - public Parser[] getDelegates() { - return new Parser[] {}; - } - - // delegators - - public VelvetParser(TokenStream input) { - this(input, new RecognizerSharedState()); + static { RuntimeMetaData.checkVersion("4.13.2", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + IMPORT=1, MANDATORY=2, ABSTRACT=3, SOMEOF=4, ONEOF=5, CONCEPT=6, CINTERFACE=7, + CONSTRAINT=8, FEATURE=9, USE=10, IMPORTINSTANCE=11, IMPORTINTERFACE=12, + DESCRIPTION=13, VAR_INT=14, VAR_FLOAT=15, VAR_STRING=16, VAR_BOOL=17, + SEMI=18, START_C=19, END_C=20, START_R=21, END_R=22, EQ=23, COMMA=24, + COLON=25, PLUS=26, MINUS=27, OP_NOT=28, OP_AND=29, OP_OR=30, OP_XOR=31, + OP_IMPLIES=32, OP_EQUIVALENT=33, ATTR_OP_EQUALS=34, ATTR_OP_NOT_EQUALS=35, + ATTR_OP_GREATER=36, ATTR_OP_LESS=37, ATTR_OP_GREATER_EQ=38, ATTR_OP_LESS_EQ=39, + EMPTY=40, CONSTR=41, ACONSTR=42, BASEEXT=43, DEF=44, GROUP=45, ATTR=46, + UNARYOP=47, OPERAND=48, BOOLEAN=49, ID=50, IDPath=51, INT=52, FLOAT=53, + STRING=54, WS=55, SL_COMMENT=56, ML_COMMENT=57; + public static final int + RULE_velvetModel = 0, RULE_imp = 1, RULE_concept = 2, RULE_cinterface = 3, + RULE_conceptBaseExt = 4, RULE_instanceImports = 5, RULE_interfaceImports = 6, + RULE_name = 7, RULE_definitions = 8, RULE_definition = 9, RULE_nonFeatureDefinition = 10, + RULE_use = 11, RULE_feature = 12, RULE_featureGroup = 13, RULE_groupType = 14, + RULE_description = 15, RULE_constraint = 16, RULE_constraintDefinition = 17, + RULE_constraintOperand = 18, RULE_attribute = 19, RULE_attributeConstraint = 20, + RULE_attribNumExpr = 21, RULE_attribOperator = 22, RULE_attribNumInstance = 23, + RULE_intAttribute = 24, RULE_floatAttribute = 25, RULE_stringAttribute = 26, + RULE_boolAttribute = 27, RULE_unaryOp = 28, RULE_binaryOp = 29, RULE_attribRelation = 30; + private static String[] makeRuleNames() { + return new String[] { + "velvetModel", "imp", "concept", "cinterface", "conceptBaseExt", "instanceImports", + "interfaceImports", "name", "definitions", "definition", "nonFeatureDefinition", + "use", "feature", "featureGroup", "groupType", "description", "constraint", + "constraintDefinition", "constraintOperand", "attribute", "attributeConstraint", + "attribNumExpr", "attribOperator", "attribNumInstance", "intAttribute", + "floatAttribute", "stringAttribute", "boolAttribute", "unaryOp", "binaryOp", + "attribRelation" + }; } - - public VelvetParser(TokenStream input, RecognizerSharedState state) { - super(input, state); + public static final String[] ruleNames = makeRuleNames(); + + private static String[] makeLiteralNames() { + return new String[] { + null, "'import'", "'mandatory'", "'abstract'", "'someOf'", "'oneOf'", + "'concept'", "'cinterface'", "'constraint'", "'feature'", "'use'", "'instance'", + "'interface'", "'description'", "'int'", "'float'", "'string'", "'bool'", + "';'", "'{'", "'}'", "'('", "')'", "'='", "','", "':'", "'+'", "'-'", + "'!'", "'&&'", "'||'", "'xor'", "'->'", "'<->'", "'=='", "'!='", "'>'", + "'<'", "'>='", "'<='", "'EMPTY'", "'CONSTR'", "'ACONSTR'", "'BASEEXT'", + "'DEF'", "'GROUP'", "'ATTR'", "'UNARYOP'", "'OPERAND'" + }; } - - protected TreeAdaptor adaptor = new CommonTreeAdaptor(); - - public void setTreeAdaptor(TreeAdaptor adaptor) { - this.adaptor = adaptor; + private static final String[] _LITERAL_NAMES = makeLiteralNames(); + private static String[] makeSymbolicNames() { + return new String[] { + null, "IMPORT", "MANDATORY", "ABSTRACT", "SOMEOF", "ONEOF", "CONCEPT", + "CINTERFACE", "CONSTRAINT", "FEATURE", "USE", "IMPORTINSTANCE", "IMPORTINTERFACE", + "DESCRIPTION", "VAR_INT", "VAR_FLOAT", "VAR_STRING", "VAR_BOOL", "SEMI", + "START_C", "END_C", "START_R", "END_R", "EQ", "COMMA", "COLON", "PLUS", + "MINUS", "OP_NOT", "OP_AND", "OP_OR", "OP_XOR", "OP_IMPLIES", "OP_EQUIVALENT", + "ATTR_OP_EQUALS", "ATTR_OP_NOT_EQUALS", "ATTR_OP_GREATER", "ATTR_OP_LESS", + "ATTR_OP_GREATER_EQ", "ATTR_OP_LESS_EQ", "EMPTY", "CONSTR", "ACONSTR", + "BASEEXT", "DEF", "GROUP", "ATTR", "UNARYOP", "OPERAND", "BOOLEAN", "ID", + "IDPath", "INT", "FLOAT", "STRING", "WS", "SL_COMMENT", "ML_COMMENT" + }; } + private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } - public TreeAdaptor getTreeAdaptor() { - return adaptor; + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } } @Override + @Deprecated public String[] getTokenNames() { - return VelvetParser.tokenNames; + return tokenNames; } @Override - public String getGrammarFileName() { - return "Velvet.g"; + + public Vocabulary getVocabulary() { + return VOCABULARY; } @Override - public void emitErrorMessage(String msg) { - Logger.logError(new Exception(msg)); - } + public String getGrammarFileName() { return "Velvet.g4"; } @Override - public void reportError(RecognitionException e) { - throw new InternalSyntaxException(e); - } + public String[] getRuleNames() { return ruleNames; } - public class InternalSyntaxException extends RuntimeException { + @Override + public String getSerializedATN() { return _serializedATN; } - private final RecognitionException e; + @Override + public ATN getATN() { return _ATN; } - public InternalSyntaxException(RecognitionException e) { - this.e = e; - } - public RecognitionException getException() { + public class InternalSyntaxException extends RuntimeException{ + private final RecognitionException e; + public InternalSyntaxException(RecognitionException e){ + this.e = e; + } + + public RecognitionException getException(){ return e; } } - public static class velvetModel_return extends ParserRuleReturnScope { - - Tree tree; + public VelvetParser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + @SuppressWarnings("CheckReturnValue") + public static class VelvetModelContext extends ParserRuleContext { + public TerminalNode EOF() { return getToken(VelvetParser.EOF, 0); } + public ConceptContext concept() { + return getRuleContext(ConceptContext.class,0); + } + public CinterfaceContext cinterface() { + return getRuleContext(CinterfaceContext.class,0); + } + public ImpContext imp() { + return getRuleContext(ImpContext.class,0); + } + public VelvetModelContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_velvetModel; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterVelvetModel(this); } - }; - - // $ANTLR start "velvetModel" - // Velvet.g:93:1: velvetModel : ( imp )? ( concept | cinterface ) EOF ; - public final VelvetParser.velvetModel_return velvetModel() throws RecognitionException { - final VelvetParser.velvetModel_return retval = new VelvetParser.velvetModel_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token EOF4 = null; - VelvetParser.imp_return imp1 = null; - - VelvetParser.concept_return concept2 = null; - - VelvetParser.cinterface_return cinterface3 = null; - - Tree EOF4_tree = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitVelvetModel(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitVelvetModel(this); + else return visitor.visitChildren(this); + } + } + public final VelvetModelContext velvetModel() throws RecognitionException { + VelvetModelContext _localctx = new VelvetModelContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_velvetModel); + int _la; try { - // Velvet.g:94:2: ( ( imp )? ( concept | cinterface ) EOF ) - // Velvet.g:94:4: ( imp )? ( concept | cinterface ) EOF + enterOuterAlt(_localctx, 1); { - root_0 = (Tree) adaptor.nil(); - - // Velvet.g:94:4: ( imp )? - int alt1 = 2; - final int LA1_0 = input.LA(1); - - if ((LA1_0 == IMPORT)) { - alt1 = 1; - } - switch (alt1) { - case 1: - // Velvet.g:94:4: imp + setState(63); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==IMPORT) { { - pushFollow(FOLLOW_imp_in_velvetModel472); - imp1 = imp(); - - state._fsp--; - - adaptor.addChild(root_0, imp1.getTree()); - + setState(62); + imp(); } - break; - - } - - // Velvet.g:94:9: ( concept | cinterface ) - int alt2 = 2; - final int LA2_0 = input.LA(1); - - if ((LA2_0 == CONCEPT)) { - alt2 = 1; - } else if ((LA2_0 == CINTERFACE)) { - alt2 = 2; - } else { - final NoViableAltException nvae = new NoViableAltException("", 2, 0, input); - - throw nvae; + } - } - switch (alt2) { - case 1: - // Velvet.g:94:10: concept + setState(67); + _errHandler.sync(this); + switch (_input.LA(1)) { + case CONCEPT: { - pushFollow(FOLLOW_concept_in_velvetModel476); - concept2 = concept(); - - state._fsp--; - - adaptor.addChild(root_0, concept2.getTree()); - + setState(65); + concept(); } - break; - case 2: - // Velvet.g:94:18: cinterface + break; + case CINTERFACE: { - pushFollow(FOLLOW_cinterface_in_velvetModel478); - cinterface3 = cinterface(); - - state._fsp--; - - adaptor.addChild(root_0, cinterface3.getTree()); - - } - break; - + setState(66); + cinterface(); } - - EOF4 = (Token) match(input, EOF, FOLLOW_EOF_in_velvetModel481); - EOF4_tree = (Tree) adaptor.create(EOF4); - adaptor.addChild(root_0, EOF4_tree); - + break; + default: + throw new NoViableAltException(this); + } + setState(69); + match(EOF); } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "velvetModel" - - public static class imp_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class ImpContext extends ParserRuleContext { + public List IMPORT() { return getTokens(VelvetParser.IMPORT); } + public TerminalNode IMPORT(int i) { + return getToken(VelvetParser.IMPORT, i); + } + public List name() { + return getRuleContexts(NameContext.class); + } + public NameContext name(int i) { + return getRuleContext(NameContext.class,i); + } + public List SEMI() { return getTokens(VelvetParser.SEMI); } + public TerminalNode SEMI(int i) { + return getToken(VelvetParser.SEMI, i); + } + public ImpContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_imp; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterImp(this); } - }; - - // $ANTLR start "imp" - // Velvet.g:97:1: imp : ( IMPORT name SEMI )+ -> ^( IMPORT ( name )+ ) ; - public final VelvetParser.imp_return imp() throws RecognitionException { - final VelvetParser.imp_return retval = new VelvetParser.imp_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token IMPORT5 = null; - Token SEMI7 = null; - VelvetParser.name_return name6 = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitImp(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitImp(this); + else return visitor.visitChildren(this); + } + } - final Tree IMPORT5_tree = null; - final Tree SEMI7_tree = null; - final RewriteRuleTokenStream stream_IMPORT = new RewriteRuleTokenStream(adaptor, "token IMPORT"); - final RewriteRuleTokenStream stream_SEMI = new RewriteRuleTokenStream(adaptor, "token SEMI"); - final RewriteRuleSubtreeStream stream_name = new RewriteRuleSubtreeStream(adaptor, "rule name"); + public final ImpContext imp() throws RecognitionException { + ImpContext _localctx = new ImpContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_imp); + int _la; try { - // Velvet.g:98:2: ( ( IMPORT name SEMI )+ -> ^( IMPORT ( name )+ ) ) - // Velvet.g:98:4: ( IMPORT name SEMI )+ + enterOuterAlt(_localctx, 1); { - // Velvet.g:98:4: ( IMPORT name SEMI )+ - int cnt3 = 0; - loop3: do { - int alt3 = 2; - final int LA3_0 = input.LA(1); - - if ((LA3_0 == IMPORT)) { - alt3 = 1; - } - - switch (alt3) { - case 1: - // Velvet.g:98:5: IMPORT name SEMI - { - IMPORT5 = (Token) match(input, IMPORT, FOLLOW_IMPORT_in_imp493); - stream_IMPORT.add(IMPORT5); - - pushFollow(FOLLOW_name_in_imp495); - name6 = name(); - - state._fsp--; - - stream_name.add(name6.getTree()); - - SEMI7 = (Token) match(input, SEMI, FOLLOW_SEMI_in_imp497); - stream_SEMI.add(SEMI7); - - } - break; - - default: - if (cnt3 >= 1) { - break loop3; - } - final EarlyExitException eee = new EarlyExitException(3, input); - throw eee; - } - cnt3++; - } while (true); - - // AST REWRITE - // elements: IMPORT, name - // token labels: - // rule labels: retval - // token list labels: - // rule list labels: - // wildcard labels: - retval.tree = root_0; - final RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null); - - root_0 = (Tree) adaptor.nil(); - // 99:2: -> ^( IMPORT ( name )+ ) + setState(75); + _errHandler.sync(this); + _la = _input.LA(1); + do { { - // Velvet.g:99:5: ^( IMPORT ( name )+ ) - { - Tree root_1 = (Tree) adaptor.nil(); - root_1 = (Tree) adaptor.becomeRoot(stream_IMPORT.nextNode(), root_1); - - if (!(stream_name.hasNext())) { - throw new RewriteEarlyExitException(); - } - while (stream_name.hasNext()) { - adaptor.addChild(root_1, stream_name.nextTree()); - - } - stream_name.reset(); - - adaptor.addChild(root_0, root_1); - } - - } - - retval.tree = root_0; - + { + setState(71); + match(IMPORT); + setState(72); + name(); + setState(73); + match(SEMI); + } + } + setState(77); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==IMPORT ); } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "imp" - - public static class concept_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class ConceptContext extends ParserRuleContext { + public TerminalNode CONCEPT() { return getToken(VelvetParser.CONCEPT, 0); } + public TerminalNode ID() { return getToken(VelvetParser.ID, 0); } + public TerminalNode COLON() { return getToken(VelvetParser.COLON, 0); } + public ConceptBaseExtContext conceptBaseExt() { + return getRuleContext(ConceptBaseExtContext.class,0); + } + public InstanceImportsContext instanceImports() { + return getRuleContext(InstanceImportsContext.class,0); + } + public InterfaceImportsContext interfaceImports() { + return getRuleContext(InterfaceImportsContext.class,0); + } + public DefinitionsContext definitions() { + return getRuleContext(DefinitionsContext.class,0); + } + public ConceptContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_concept; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterConcept(this); } - }; - - // $ANTLR start "concept" - // Velvet.g:102:1: concept : CONCEPT ID ( COLON conceptBaseExt )? ( instanceImports interfaceImports | interfaceImports instanceImports | interfaceImports | - // instanceImports )? ( definitions )? -> ^( CONCEPT ID ( conceptBaseExt )? ( instanceImports )? ( interfaceImports )? ( definitions )? ) ; - public final VelvetParser.concept_return concept() throws RecognitionException { - final VelvetParser.concept_return retval = new VelvetParser.concept_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token CONCEPT8 = null; - Token ID9 = null; - Token COLON10 = null; - VelvetParser.conceptBaseExt_return conceptBaseExt11 = null; - - VelvetParser.instanceImports_return instanceImports12 = null; - - VelvetParser.interfaceImports_return interfaceImports13 = null; - - VelvetParser.interfaceImports_return interfaceImports14 = null; - - VelvetParser.instanceImports_return instanceImports15 = null; - - VelvetParser.interfaceImports_return interfaceImports16 = null; - - VelvetParser.instanceImports_return instanceImports17 = null; - - VelvetParser.definitions_return definitions18 = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitConcept(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitConcept(this); + else return visitor.visitChildren(this); + } + } - final Tree CONCEPT8_tree = null; - final Tree ID9_tree = null; - final Tree COLON10_tree = null; - final RewriteRuleTokenStream stream_COLON = new RewriteRuleTokenStream(adaptor, "token COLON"); - final RewriteRuleTokenStream stream_ID = new RewriteRuleTokenStream(adaptor, "token ID"); - final RewriteRuleTokenStream stream_CONCEPT = new RewriteRuleTokenStream(adaptor, "token CONCEPT"); - final RewriteRuleSubtreeStream stream_conceptBaseExt = new RewriteRuleSubtreeStream(adaptor, "rule conceptBaseExt"); - final RewriteRuleSubtreeStream stream_instanceImports = new RewriteRuleSubtreeStream(adaptor, "rule instanceImports"); - final RewriteRuleSubtreeStream stream_interfaceImports = new RewriteRuleSubtreeStream(adaptor, "rule interfaceImports"); - final RewriteRuleSubtreeStream stream_definitions = new RewriteRuleSubtreeStream(adaptor, "rule definitions"); + public final ConceptContext concept() throws RecognitionException { + ConceptContext _localctx = new ConceptContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_concept); + int _la; try { - // Velvet.g:103:2: ( CONCEPT ID ( COLON conceptBaseExt )? ( instanceImports interfaceImports | interfaceImports instanceImports | interfaceImports | - // instanceImports )? ( definitions )? -> ^( CONCEPT ID ( conceptBaseExt )? ( instanceImports )? ( interfaceImports )? ( definitions )? ) ) - // Velvet.g:103:4: CONCEPT ID ( COLON conceptBaseExt )? ( instanceImports interfaceImports | interfaceImports instanceImports | interfaceImports | - // instanceImports )? ( definitions )? + enterOuterAlt(_localctx, 1); { - CONCEPT8 = (Token) match(input, CONCEPT, FOLLOW_CONCEPT_in_concept521); - stream_CONCEPT.add(CONCEPT8); - - ID9 = (Token) match(input, ID, FOLLOW_ID_in_concept523); - stream_ID.add(ID9); - - // Velvet.g:104:3: ( COLON conceptBaseExt )? - int alt4 = 2; - final int LA4_0 = input.LA(1); - - if ((LA4_0 == COLON)) { - alt4 = 1; - } - switch (alt4) { - case 1: - // Velvet.g:104:4: COLON conceptBaseExt + setState(79); + match(CONCEPT); + setState(80); + match(ID); + setState(83); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COLON) { { - COLON10 = (Token) match(input, COLON, FOLLOW_COLON_in_concept530); - stream_COLON.add(COLON10); - - pushFollow(FOLLOW_conceptBaseExt_in_concept532); - conceptBaseExt11 = conceptBaseExt(); - - state._fsp--; - - stream_conceptBaseExt.add(conceptBaseExt11.getTree()); - - } - break; - + setState(81); + match(COLON); + setState(82); + conceptBaseExt(); } + } - // Velvet.g:104:27: ( instanceImports interfaceImports | interfaceImports instanceImports | interfaceImports | instanceImports )? - int alt5 = 5; - alt5 = dfa5.predict(input); - switch (alt5) { - case 1: - // Velvet.g:104:28: instanceImports interfaceImports + setState(93); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) { + case 1: { - pushFollow(FOLLOW_instanceImports_in_concept537); - instanceImports12 = instanceImports(); - - state._fsp--; - - stream_instanceImports.add(instanceImports12.getTree()); - - pushFollow(FOLLOW_interfaceImports_in_concept539); - interfaceImports13 = interfaceImports(); - - state._fsp--; - - stream_interfaceImports.add(interfaceImports13.getTree()); - + setState(85); + instanceImports(); + setState(86); + interfaceImports(); } - break; - case 2: - // Velvet.g:104:63: interfaceImports instanceImports + break; + case 2: { - pushFollow(FOLLOW_interfaceImports_in_concept543); - interfaceImports14 = interfaceImports(); - - state._fsp--; - - stream_interfaceImports.add(interfaceImports14.getTree()); - - pushFollow(FOLLOW_instanceImports_in_concept545); - instanceImports15 = instanceImports(); - - state._fsp--; - - stream_instanceImports.add(instanceImports15.getTree()); - + setState(88); + interfaceImports(); + setState(89); + instanceImports(); } - break; - case 3: - // Velvet.g:104:98: interfaceImports + break; + case 3: { - pushFollow(FOLLOW_interfaceImports_in_concept549); - interfaceImports16 = interfaceImports(); - - state._fsp--; - - stream_interfaceImports.add(interfaceImports16.getTree()); - + setState(91); + interfaceImports(); } - break; - case 4: - // Velvet.g:104:117: instanceImports + break; + case 4: { - pushFollow(FOLLOW_instanceImports_in_concept553); - instanceImports17 = instanceImports(); - - state._fsp--; - - stream_instanceImports.add(instanceImports17.getTree()); - + setState(92); + instanceImports(); } - break; - - } - - // Velvet.g:105:3: ( definitions )? - int alt6 = 2; - final int LA6_0 = input.LA(1); - - if ((LA6_0 == START_C)) { - alt6 = 1; - } - switch (alt6) { - case 1: - // Velvet.g:105:3: definitions + break; + } + setState(96); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==START_C) { { - pushFollow(FOLLOW_definitions_in_concept560); - definitions18 = definitions(); - - state._fsp--; - - stream_definitions.add(definitions18.getTree()); - - } - break; - + setState(95); + definitions(); } + } - // AST REWRITE - // elements: ID, definitions, interfaceImports, instanceImports, CONCEPT, conceptBaseExt - // token labels: - // rule labels: retval - // token list labels: - // rule list labels: - // wildcard labels: - retval.tree = root_0; - final RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null); - - root_0 = (Tree) adaptor.nil(); - // 106:2: -> ^( CONCEPT ID ( conceptBaseExt )? ( instanceImports )? ( interfaceImports )? ( definitions )? ) - { - // Velvet.g:106:5: ^( CONCEPT ID ( conceptBaseExt )? ( instanceImports )? ( interfaceImports )? ( definitions )? ) - { - Tree root_1 = (Tree) adaptor.nil(); - root_1 = (Tree) adaptor.becomeRoot(stream_CONCEPT.nextNode(), root_1); - - adaptor.addChild(root_1, stream_ID.nextNode()); - - // Velvet.g:106:18: ( conceptBaseExt )? - if (stream_conceptBaseExt.hasNext()) { - adaptor.addChild(root_1, stream_conceptBaseExt.nextTree()); - - } - stream_conceptBaseExt.reset(); - - // Velvet.g:106:34: ( instanceImports )? - if (stream_instanceImports.hasNext()) { - adaptor.addChild(root_1, stream_instanceImports.nextTree()); - - } - stream_instanceImports.reset(); - - // Velvet.g:106:51: ( interfaceImports )? - if (stream_interfaceImports.hasNext()) { - adaptor.addChild(root_1, stream_interfaceImports.nextTree()); - - } - stream_interfaceImports.reset(); - - // Velvet.g:106:69: ( definitions )? - if (stream_definitions.hasNext()) { - adaptor.addChild(root_1, stream_definitions.nextTree()); - - } - stream_definitions.reset(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } - adaptor.addChild(root_0, root_1); - } + @SuppressWarnings("CheckReturnValue") + public static class CinterfaceContext extends ParserRuleContext { + public TerminalNode CINTERFACE() { return getToken(VelvetParser.CINTERFACE, 0); } + public TerminalNode ID() { return getToken(VelvetParser.ID, 0); } + public DefinitionsContext definitions() { + return getRuleContext(DefinitionsContext.class,0); + } + public TerminalNode COLON() { return getToken(VelvetParser.COLON, 0); } + public ConceptBaseExtContext conceptBaseExt() { + return getRuleContext(ConceptBaseExtContext.class,0); + } + public CinterfaceContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_cinterface; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterCinterface(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitCinterface(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitCinterface(this); + else return visitor.visitChildren(this); + } + } + public final CinterfaceContext cinterface() throws RecognitionException { + CinterfaceContext _localctx = new CinterfaceContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_cinterface); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(98); + match(CINTERFACE); + setState(99); + match(ID); + setState(102); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COLON) { + { + setState(100); + match(COLON); + setState(101); + conceptBaseExt(); } - - retval.tree = root_0; - } - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - + setState(104); + definitions(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); } - finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "concept" - - public static class cinterface_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class ConceptBaseExtContext extends ParserRuleContext { + public List ID() { return getTokens(VelvetParser.ID); } + public TerminalNode ID(int i) { + return getToken(VelvetParser.ID, i); + } + public List COMMA() { return getTokens(VelvetParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(VelvetParser.COMMA, i); + } + public ConceptBaseExtContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_conceptBaseExt; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterConceptBaseExt(this); } - }; - - // $ANTLR start "cinterface" - // Velvet.g:109:1: cinterface : CINTERFACE ID ( COLON conceptBaseExt )? definitions -> ^( CINTERFACE ID ( conceptBaseExt )? definitions ) ; - public final VelvetParser.cinterface_return cinterface() throws RecognitionException { - final VelvetParser.cinterface_return retval = new VelvetParser.cinterface_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token CINTERFACE19 = null; - Token ID20 = null; - Token COLON21 = null; - VelvetParser.conceptBaseExt_return conceptBaseExt22 = null; - - VelvetParser.definitions_return definitions23 = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitConceptBaseExt(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitConceptBaseExt(this); + else return visitor.visitChildren(this); + } + } - final Tree CINTERFACE19_tree = null; - final Tree ID20_tree = null; - final Tree COLON21_tree = null; - final RewriteRuleTokenStream stream_COLON = new RewriteRuleTokenStream(adaptor, "token COLON"); - final RewriteRuleTokenStream stream_ID = new RewriteRuleTokenStream(adaptor, "token ID"); - final RewriteRuleTokenStream stream_CINTERFACE = new RewriteRuleTokenStream(adaptor, "token CINTERFACE"); - final RewriteRuleSubtreeStream stream_conceptBaseExt = new RewriteRuleSubtreeStream(adaptor, "rule conceptBaseExt"); - final RewriteRuleSubtreeStream stream_definitions = new RewriteRuleSubtreeStream(adaptor, "rule definitions"); + public final ConceptBaseExtContext conceptBaseExt() throws RecognitionException { + ConceptBaseExtContext _localctx = new ConceptBaseExtContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_conceptBaseExt); + int _la; try { - // Velvet.g:109:12: ( CINTERFACE ID ( COLON conceptBaseExt )? definitions -> ^( CINTERFACE ID ( conceptBaseExt )? definitions ) ) - // Velvet.g:109:14: CINTERFACE ID ( COLON conceptBaseExt )? definitions + enterOuterAlt(_localctx, 1); { - CINTERFACE19 = (Token) match(input, CINTERFACE, FOLLOW_CINTERFACE_in_cinterface593); - stream_CINTERFACE.add(CINTERFACE19); - - ID20 = (Token) match(input, ID, FOLLOW_ID_in_cinterface595); - stream_ID.add(ID20); - - // Velvet.g:109:29: ( COLON conceptBaseExt )? - int alt7 = 2; - final int LA7_0 = input.LA(1); - - if ((LA7_0 == COLON)) { - alt7 = 1; - } - switch (alt7) { - case 1: - // Velvet.g:109:30: COLON conceptBaseExt + setState(106); + match(ID); + setState(111); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { { - COLON21 = (Token) match(input, COLON, FOLLOW_COLON_in_cinterface599); - stream_COLON.add(COLON21); - - pushFollow(FOLLOW_conceptBaseExt_in_cinterface601); - conceptBaseExt22 = conceptBaseExt(); - - state._fsp--; - - stream_conceptBaseExt.add(conceptBaseExt22.getTree()); - + { + setState(107); + match(COMMA); + setState(108); + match(ID); } - break; - } - - pushFollow(FOLLOW_definitions_in_cinterface605); - definitions23 = definitions(); - - state._fsp--; - - stream_definitions.add(definitions23.getTree()); - - // AST REWRITE - // elements: conceptBaseExt, ID, definitions, CINTERFACE - // token labels: - // rule labels: retval - // token list labels: - // rule list labels: - // wildcard labels: - retval.tree = root_0; - final RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null); - - root_0 = (Tree) adaptor.nil(); - // 110:2: -> ^( CINTERFACE ID ( conceptBaseExt )? definitions ) - { - // Velvet.g:110:5: ^( CINTERFACE ID ( conceptBaseExt )? definitions ) - { - Tree root_1 = (Tree) adaptor.nil(); - root_1 = (Tree) adaptor.becomeRoot(stream_CINTERFACE.nextNode(), root_1); - - adaptor.addChild(root_1, stream_ID.nextNode()); - - // Velvet.g:110:21: ( conceptBaseExt )? - if (stream_conceptBaseExt.hasNext()) { - adaptor.addChild(root_1, stream_conceptBaseExt.nextTree()); - - } - stream_conceptBaseExt.reset(); - - adaptor.addChild(root_1, stream_definitions.nextTree()); - - adaptor.addChild(root_0, root_1); - } - - } - - retval.tree = root_0; - + setState(113); + _errHandler.sync(this); + _la = _input.LA(1); + } } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "cinterface" - - public static class conceptBaseExt_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class InstanceImportsContext extends ParserRuleContext { + public TerminalNode IMPORTINSTANCE() { return getToken(VelvetParser.IMPORTINSTANCE, 0); } + public List ID() { return getTokens(VelvetParser.ID); } + public TerminalNode ID(int i) { + return getToken(VelvetParser.ID, i); + } + public List name() { + return getRuleContexts(NameContext.class); + } + public NameContext name(int i) { + return getRuleContext(NameContext.class,i); + } + public List COMMA() { return getTokens(VelvetParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(VelvetParser.COMMA, i); + } + public InstanceImportsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_instanceImports; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterInstanceImports(this); } - }; - - // $ANTLR start "conceptBaseExt" - // Velvet.g:113:1: conceptBaseExt : ID ( COMMA ID )* -> ^( BASEEXT ( ID )+ ) ; - public final VelvetParser.conceptBaseExt_return conceptBaseExt() throws RecognitionException { - final VelvetParser.conceptBaseExt_return retval = new VelvetParser.conceptBaseExt_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token ID24 = null; - Token COMMA25 = null; - Token ID26 = null; - - final Tree ID24_tree = null; - final Tree COMMA25_tree = null; - final Tree ID26_tree = null; - final RewriteRuleTokenStream stream_ID = new RewriteRuleTokenStream(adaptor, "token ID"); - final RewriteRuleTokenStream stream_COMMA = new RewriteRuleTokenStream(adaptor, "token COMMA"); + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitInstanceImports(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitInstanceImports(this); + else return visitor.visitChildren(this); + } + } + public final InstanceImportsContext instanceImports() throws RecognitionException { + InstanceImportsContext _localctx = new InstanceImportsContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_instanceImports); + int _la; try { - // Velvet.g:114:2: ( ID ( COMMA ID )* -> ^( BASEEXT ( ID )+ ) ) - // Velvet.g:114:4: ID ( COMMA ID )* + enterOuterAlt(_localctx, 1); { - ID24 = (Token) match(input, ID, FOLLOW_ID_in_conceptBaseExt632); - stream_ID.add(ID24); - - // Velvet.g:114:7: ( COMMA ID )* - loop8: do { - int alt8 = 2; - final int LA8_0 = input.LA(1); - - if ((LA8_0 == COMMA)) { - alt8 = 1; - } - - switch (alt8) { - case 1: - // Velvet.g:114:8: COMMA ID - { - COMMA25 = (Token) match(input, COMMA, FOLLOW_COMMA_in_conceptBaseExt635); - stream_COMMA.add(COMMA25); - - ID26 = (Token) match(input, ID, FOLLOW_ID_in_conceptBaseExt637); - stream_ID.add(ID26); - - } - break; - - default: - break loop8; - } - } while (true); - - // AST REWRITE - // elements: ID - // token labels: - // rule labels: retval - // token list labels: - // rule list labels: - // wildcard labels: - retval.tree = root_0; - final RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null); - - root_0 = (Tree) adaptor.nil(); - // 115:2: -> ^( BASEEXT ( ID )+ ) + setState(114); + match(IMPORTINSTANCE); + setState(115); + match(ID); + setState(116); + name(); + setState(122); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { { - // Velvet.g:115:5: ^( BASEEXT ( ID )+ ) - { - Tree root_1 = (Tree) adaptor.nil(); - root_1 = (Tree) adaptor.becomeRoot(adaptor.create(BASEEXT, "BASEEXT"), root_1); - - if (!(stream_ID.hasNext())) { - throw new RewriteEarlyExitException(); - } - while (stream_ID.hasNext()) { - adaptor.addChild(root_1, stream_ID.nextNode()); - - } - stream_ID.reset(); - - adaptor.addChild(root_0, root_1); - } - + { + setState(117); + match(COMMA); + setState(118); + match(ID); + setState(119); + name(); } - - retval.tree = root_0; - + } + setState(124); + _errHandler.sync(this); + _la = _input.LA(1); + } } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "conceptBaseExt" - - public static class instanceImports_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class InterfaceImportsContext extends ParserRuleContext { + public TerminalNode IMPORTINTERFACE() { return getToken(VelvetParser.IMPORTINTERFACE, 0); } + public List ID() { return getTokens(VelvetParser.ID); } + public TerminalNode ID(int i) { + return getToken(VelvetParser.ID, i); + } + public List name() { + return getRuleContexts(NameContext.class); + } + public NameContext name(int i) { + return getRuleContext(NameContext.class,i); + } + public List COMMA() { return getTokens(VelvetParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(VelvetParser.COMMA, i); + } + public InterfaceImportsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceImports; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterInterfaceImports(this); } - }; - - // $ANTLR start "instanceImports" - // Velvet.g:118:1: instanceImports : IMPORTINSTANCE ID name ( COMMA ID name )* -> ^( IMPORTINSTANCE ( ID name )+ ) ; - public final VelvetParser.instanceImports_return instanceImports() throws RecognitionException { - final VelvetParser.instanceImports_return retval = new VelvetParser.instanceImports_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token IMPORTINSTANCE27 = null; - Token ID28 = null; - Token COMMA30 = null; - Token ID31 = null; - VelvetParser.name_return name29 = null; - - VelvetParser.name_return name32 = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitInterfaceImports(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitInterfaceImports(this); + else return visitor.visitChildren(this); + } + } - final Tree IMPORTINSTANCE27_tree = null; - final Tree ID28_tree = null; - final Tree COMMA30_tree = null; - final Tree ID31_tree = null; - final RewriteRuleTokenStream stream_ID = new RewriteRuleTokenStream(adaptor, "token ID"); - final RewriteRuleTokenStream stream_COMMA = new RewriteRuleTokenStream(adaptor, "token COMMA"); - final RewriteRuleTokenStream stream_IMPORTINSTANCE = new RewriteRuleTokenStream(adaptor, "token IMPORTINSTANCE"); - final RewriteRuleSubtreeStream stream_name = new RewriteRuleSubtreeStream(adaptor, "rule name"); + public final InterfaceImportsContext interfaceImports() throws RecognitionException { + InterfaceImportsContext _localctx = new InterfaceImportsContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_interfaceImports); + int _la; try { - // Velvet.g:119:2: ( IMPORTINSTANCE ID name ( COMMA ID name )* -> ^( IMPORTINSTANCE ( ID name )+ ) ) - // Velvet.g:119:4: IMPORTINSTANCE ID name ( COMMA ID name )* + enterOuterAlt(_localctx, 1); { - IMPORTINSTANCE27 = (Token) match(input, IMPORTINSTANCE, FOLLOW_IMPORTINSTANCE_in_instanceImports662); - stream_IMPORTINSTANCE.add(IMPORTINSTANCE27); - - ID28 = (Token) match(input, ID, FOLLOW_ID_in_instanceImports664); - stream_ID.add(ID28); - - pushFollow(FOLLOW_name_in_instanceImports666); - name29 = name(); - - state._fsp--; - - stream_name.add(name29.getTree()); - - // Velvet.g:119:27: ( COMMA ID name )* - loop9: do { - int alt9 = 2; - final int LA9_0 = input.LA(1); - - if ((LA9_0 == COMMA)) { - alt9 = 1; - } - - switch (alt9) { - case 1: - // Velvet.g:119:28: COMMA ID name - { - COMMA30 = (Token) match(input, COMMA, FOLLOW_COMMA_in_instanceImports669); - stream_COMMA.add(COMMA30); - - ID31 = (Token) match(input, ID, FOLLOW_ID_in_instanceImports671); - stream_ID.add(ID31); - - pushFollow(FOLLOW_name_in_instanceImports673); - name32 = name(); - - state._fsp--; - - stream_name.add(name32.getTree()); - - } - break; - - default: - break loop9; - } - } while (true); - - // AST REWRITE - // elements: ID, name, IMPORTINSTANCE - // token labels: - // rule labels: retval - // token list labels: - // rule list labels: - // wildcard labels: - retval.tree = root_0; - final RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null); - - root_0 = (Tree) adaptor.nil(); - // 120:2: -> ^( IMPORTINSTANCE ( ID name )+ ) + setState(125); + match(IMPORTINTERFACE); + setState(126); + match(ID); + setState(127); + name(); + setState(133); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { { - // Velvet.g:120:5: ^( IMPORTINSTANCE ( ID name )+ ) - { - Tree root_1 = (Tree) adaptor.nil(); - root_1 = (Tree) adaptor.becomeRoot(stream_IMPORTINSTANCE.nextNode(), root_1); - - if (!(stream_ID.hasNext() || stream_name.hasNext())) { - throw new RewriteEarlyExitException(); - } - while (stream_ID.hasNext() || stream_name.hasNext()) { - adaptor.addChild(root_1, stream_ID.nextNode()); - - adaptor.addChild(root_1, stream_name.nextTree()); - - } - stream_ID.reset(); - stream_name.reset(); - - adaptor.addChild(root_0, root_1); - } - + { + setState(128); + match(COMMA); + setState(129); + match(ID); + setState(130); + name(); } - - retval.tree = root_0; - + } + setState(135); + _errHandler.sync(this); + _la = _input.LA(1); + } } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "instanceImports" - - public static class interfaceImports_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class NameContext extends ParserRuleContext { + public TerminalNode ID() { return getToken(VelvetParser.ID, 0); } + public TerminalNode IDPath() { return getToken(VelvetParser.IDPath, 0); } + public NameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_name; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterName(this); } - }; - - // $ANTLR start "interfaceImports" - // Velvet.g:123:1: interfaceImports : IMPORTINTERFACE ID name ( COMMA ID name )* -> ^( IMPORTINTERFACE ( ID name )+ ) ; - public final VelvetParser.interfaceImports_return interfaceImports() throws RecognitionException { - final VelvetParser.interfaceImports_return retval = new VelvetParser.interfaceImports_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token IMPORTINTERFACE33 = null; - Token ID34 = null; - Token COMMA36 = null; - Token ID37 = null; - VelvetParser.name_return name35 = null; - - VelvetParser.name_return name38 = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitName(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitName(this); + else return visitor.visitChildren(this); + } + } - final Tree IMPORTINTERFACE33_tree = null; - final Tree ID34_tree = null; - final Tree COMMA36_tree = null; - final Tree ID37_tree = null; - final RewriteRuleTokenStream stream_ID = new RewriteRuleTokenStream(adaptor, "token ID"); - final RewriteRuleTokenStream stream_COMMA = new RewriteRuleTokenStream(adaptor, "token COMMA"); - final RewriteRuleTokenStream stream_IMPORTINTERFACE = new RewriteRuleTokenStream(adaptor, "token IMPORTINTERFACE"); - final RewriteRuleSubtreeStream stream_name = new RewriteRuleSubtreeStream(adaptor, "rule name"); + public final NameContext name() throws RecognitionException { + NameContext _localctx = new NameContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_name); + int _la; try { - // Velvet.g:124:2: ( IMPORTINTERFACE ID name ( COMMA ID name )* -> ^( IMPORTINTERFACE ( ID name )+ ) ) - // Velvet.g:124:4: IMPORTINTERFACE ID name ( COMMA ID name )* + enterOuterAlt(_localctx, 1); { - IMPORTINTERFACE33 = (Token) match(input, IMPORTINTERFACE, FOLLOW_IMPORTINTERFACE_in_interfaceImports702); - stream_IMPORTINTERFACE.add(IMPORTINTERFACE33); - - ID34 = (Token) match(input, ID, FOLLOW_ID_in_interfaceImports704); - stream_ID.add(ID34); - - pushFollow(FOLLOW_name_in_interfaceImports706); - name35 = name(); - - state._fsp--; - - stream_name.add(name35.getTree()); - - // Velvet.g:124:28: ( COMMA ID name )* - loop10: do { - int alt10 = 2; - final int LA10_0 = input.LA(1); - - if ((LA10_0 == COMMA)) { - alt10 = 1; - } - - switch (alt10) { - case 1: - // Velvet.g:124:29: COMMA ID name - { - COMMA36 = (Token) match(input, COMMA, FOLLOW_COMMA_in_interfaceImports709); - stream_COMMA.add(COMMA36); - - ID37 = (Token) match(input, ID, FOLLOW_ID_in_interfaceImports711); - stream_ID.add(ID37); - - pushFollow(FOLLOW_name_in_interfaceImports713); - name38 = name(); - - state._fsp--; - - stream_name.add(name38.getTree()); - - } - break; - - default: - break loop10; - } - } while (true); - - // AST REWRITE - // elements: IMPORTINTERFACE, name, ID - // token labels: - // rule labels: retval - // token list labels: - // rule list labels: - // wildcard labels: - retval.tree = root_0; - final RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null); - - root_0 = (Tree) adaptor.nil(); - // 125:2: -> ^( IMPORTINTERFACE ( ID name )+ ) - { - // Velvet.g:125:5: ^( IMPORTINTERFACE ( ID name )+ ) - { - Tree root_1 = (Tree) adaptor.nil(); - root_1 = (Tree) adaptor.becomeRoot(stream_IMPORTINTERFACE.nextNode(), root_1); - - if (!(stream_name.hasNext() || stream_ID.hasNext())) { - throw new RewriteEarlyExitException(); - } - while (stream_name.hasNext() || stream_ID.hasNext()) { - adaptor.addChild(root_1, stream_ID.nextNode()); - - adaptor.addChild(root_1, stream_name.nextTree()); - - } - stream_name.reset(); - stream_ID.reset(); - - adaptor.addChild(root_0, root_1); - } - - } - - retval.tree = root_0; - + setState(136); + _la = _input.LA(1); + if ( !(_la==ID || _la==IDPath) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "interfaceImports" - - public static class name_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class DefinitionsContext extends ParserRuleContext { + public TerminalNode START_C() { return getToken(VelvetParser.START_C, 0); } + public DefinitionContext definition() { + return getRuleContext(DefinitionContext.class,0); + } + public TerminalNode END_C() { return getToken(VelvetParser.END_C, 0); } + public DefinitionsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_definitions; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterDefinitions(this); } - }; - - // $ANTLR start "name" - // Velvet.g:128:1: name : ( ID | IDPath ); - public final VelvetParser.name_return name() throws RecognitionException { - final VelvetParser.name_return retval = new VelvetParser.name_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token set39 = null; - - final Tree set39_tree = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitDefinitions(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitDefinitions(this); + else return visitor.visitChildren(this); + } + } + public final DefinitionsContext definitions() throws RecognitionException { + DefinitionsContext _localctx = new DefinitionsContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_definitions); try { - // Velvet.g:128:5: ( ID | IDPath ) - // Velvet.g: + enterOuterAlt(_localctx, 1); { - root_0 = (Tree) adaptor.nil(); - - set39 = input.LT(1); - - if (((input.LA(1) >= ID) && (input.LA(1) <= IDPath))) { - input.consume(); - adaptor.addChild(root_0, adaptor.create(set39)); - state.errorRecovery = false; - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - throw mse; - } - + setState(138); + match(START_C); + setState(139); + definition(); + setState(140); + match(END_C); } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "name" - - public static class definitions_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class DefinitionContext extends ParserRuleContext { + public List nonFeatureDefinition() { + return getRuleContexts(NonFeatureDefinitionContext.class); + } + public NonFeatureDefinitionContext nonFeatureDefinition(int i) { + return getRuleContext(NonFeatureDefinitionContext.class,i); + } + public FeatureGroupContext featureGroup() { + return getRuleContext(FeatureGroupContext.class,0); + } + public List feature() { + return getRuleContexts(FeatureContext.class); + } + public FeatureContext feature(int i) { + return getRuleContext(FeatureContext.class,i); + } + public DefinitionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_definition; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterDefinition(this); } - }; - - // $ANTLR start "definitions" - // Velvet.g:132:1: definitions : START_C definition END_C -> ^( DEF ( definition )? EMPTY ) ; - public final VelvetParser.definitions_return definitions() throws RecognitionException { - final VelvetParser.definitions_return retval = new VelvetParser.definitions_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token START_C40 = null; - Token END_C42 = null; - VelvetParser.definition_return definition41 = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitDefinition(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitDefinition(this); + else return visitor.visitChildren(this); + } + } - final Tree START_C40_tree = null; - final Tree END_C42_tree = null; - final RewriteRuleTokenStream stream_END_C = new RewriteRuleTokenStream(adaptor, "token END_C"); - final RewriteRuleTokenStream stream_START_C = new RewriteRuleTokenStream(adaptor, "token START_C"); - final RewriteRuleSubtreeStream stream_definition = new RewriteRuleSubtreeStream(adaptor, "rule definition"); + public final DefinitionContext definition() throws RecognitionException { + DefinitionContext _localctx = new DefinitionContext(_ctx, getState()); + enterRule(_localctx, 18, RULE_definition); + int _la; try { - // Velvet.g:133:2: ( START_C definition END_C -> ^( DEF ( definition )? EMPTY ) ) - // Velvet.g:133:4: START_C definition END_C + enterOuterAlt(_localctx, 1); { - START_C40 = (Token) match(input, START_C, FOLLOW_START_C_in_definitions757); - stream_START_C.add(START_C40); - - pushFollow(FOLLOW_definition_in_definitions759); - definition41 = definition(); - - state._fsp--; - - stream_definition.add(definition41.getTree()); - - END_C42 = (Token) match(input, END_C, FOLLOW_END_C_in_definitions761); - stream_END_C.add(END_C42); - - // AST REWRITE - // elements: definition - // token labels: - // rule labels: retval - // token list labels: - // rule list labels: - // wildcard labels: - retval.tree = root_0; - final RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null); - - root_0 = (Tree) adaptor.nil(); - // 134:2: -> ^( DEF ( definition )? EMPTY ) + setState(145); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 255232L) != 0)) { { - // Velvet.g:134:5: ^( DEF ( definition )? EMPTY ) + { + setState(142); + nonFeatureDefinition(); + } + } + setState(147); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(163); + _errHandler.sync(this); + switch (_input.LA(1)) { + case SOMEOF: + case ONEOF: + { + { + setState(148); + featureGroup(); + setState(152); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 255232L) != 0)) { { - Tree root_1 = (Tree) adaptor.nil(); - root_1 = (Tree) adaptor.becomeRoot(adaptor.create(DEF, "DEF"), root_1); - - // Velvet.g:134:11: ( definition )? - if (stream_definition.hasNext()) { - adaptor.addChild(root_1, stream_definition.nextTree()); - + { + setState(149); + nonFeatureDefinition(); + } + } + setState(154); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + break; + case MANDATORY: + case ABSTRACT: + case FEATURE: + { + { + setState(155); + feature(); + setState(160); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 255756L) != 0)) { + { + setState(158); + _errHandler.sync(this); + switch (_input.LA(1)) { + case MANDATORY: + case ABSTRACT: + case FEATURE: + { + setState(156); + feature(); } - stream_definition.reset(); - - adaptor.addChild(root_1, adaptor.create(EMPTY, "EMPTY")); - - adaptor.addChild(root_0, root_1); + break; + case CONSTRAINT: + case USE: + case DESCRIPTION: + case VAR_INT: + case VAR_FLOAT: + case VAR_STRING: + case VAR_BOOL: + { + setState(157); + nonFeatureDefinition(); + } + break; + default: + throw new NoViableAltException(this); } - + } + setState(162); + _errHandler.sync(this); + _la = _input.LA(1); } - - retval.tree = root_0; - - } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - + } + } + break; + case END_C: + break; + default: + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); } - finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "definitions" - - public static class definition_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class NonFeatureDefinitionContext extends ParserRuleContext { + public ConstraintContext constraint() { + return getRuleContext(ConstraintContext.class,0); + } + public UseContext use() { + return getRuleContext(UseContext.class,0); + } + public AttributeContext attribute() { + return getRuleContext(AttributeContext.class,0); + } + public DescriptionContext description() { + return getRuleContext(DescriptionContext.class,0); + } + public NonFeatureDefinitionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_nonFeatureDefinition; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterNonFeatureDefinition(this); } - }; - - // $ANTLR start "definition" - // Velvet.g:137:1: definition : ( nonFeatureDefinition )* ( ( featureGroup ( nonFeatureDefinition )* ) | ( feature ( feature | nonFeatureDefinition )* ) )? - // ; - public final VelvetParser.definition_return definition() throws RecognitionException { - final VelvetParser.definition_return retval = new VelvetParser.definition_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - VelvetParser.nonFeatureDefinition_return nonFeatureDefinition43 = null; - - VelvetParser.featureGroup_return featureGroup44 = null; - - VelvetParser.nonFeatureDefinition_return nonFeatureDefinition45 = null; - - VelvetParser.feature_return feature46 = null; - - VelvetParser.feature_return feature47 = null; - - VelvetParser.nonFeatureDefinition_return nonFeatureDefinition48 = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitNonFeatureDefinition(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitNonFeatureDefinition(this); + else return visitor.visitChildren(this); + } + } + public final NonFeatureDefinitionContext nonFeatureDefinition() throws RecognitionException { + NonFeatureDefinitionContext _localctx = new NonFeatureDefinitionContext(_ctx, getState()); + enterRule(_localctx, 20, RULE_nonFeatureDefinition); try { - // Velvet.g:138:2: ( ( nonFeatureDefinition )* ( ( featureGroup ( nonFeatureDefinition )* ) | ( feature ( feature | nonFeatureDefinition )* ) )? ) - // Velvet.g:138:4: ( nonFeatureDefinition )* ( ( featureGroup ( nonFeatureDefinition )* ) | ( feature ( feature | nonFeatureDefinition )* ) )? - { - root_0 = (Tree) adaptor.nil(); - - // Velvet.g:138:4: ( nonFeatureDefinition )* - loop11: do { - int alt11 = 2; - final int LA11_0 = input.LA(1); - - if (((LA11_0 == CONSTRAINT) || (LA11_0 == DESCRIPTION) || ((LA11_0 >= USE) && (LA11_0 <= VAR_STRING)))) { - alt11 = 1; - } - - switch (alt11) { - case 1: - // Velvet.g:138:4: nonFeatureDefinition - { - pushFollow(FOLLOW_nonFeatureDefinition_in_definition785); - nonFeatureDefinition43 = nonFeatureDefinition(); - - state._fsp--; - - adaptor.addChild(root_0, nonFeatureDefinition43.getTree()); - - } - break; - - default: - break loop11; - } - } while (true); - - // Velvet.g:138:26: ( ( featureGroup ( nonFeatureDefinition )* ) | ( feature ( feature | nonFeatureDefinition )* ) )? - int alt14 = 3; - final int LA14_0 = input.LA(1); - - if (((LA14_0 == ONEOF) || (LA14_0 == SOMEOF))) { - alt14 = 1; - } else if (((LA14_0 == ABSTRACT) || (LA14_0 == FEATURE) || (LA14_0 == MANDATORY))) { - alt14 = 2; + setState(169); + _errHandler.sync(this); + switch (_input.LA(1)) { + case CONSTRAINT: + enterOuterAlt(_localctx, 1); + { + setState(165); + constraint(); } - switch (alt14) { - case 1: - // Velvet.g:139:3: ( featureGroup ( nonFeatureDefinition )* ) + break; + case USE: + enterOuterAlt(_localctx, 2); { - // Velvet.g:139:3: ( featureGroup ( nonFeatureDefinition )* ) - // Velvet.g:139:4: featureGroup ( nonFeatureDefinition )* - { - pushFollow(FOLLOW_featureGroup_in_definition793); - featureGroup44 = featureGroup(); - - state._fsp--; - - adaptor.addChild(root_0, featureGroup44.getTree()); - - // Velvet.g:139:17: ( nonFeatureDefinition )* - loop12: do { - int alt12 = 2; - final int LA12_0 = input.LA(1); - - if (((LA12_0 == CONSTRAINT) || (LA12_0 == DESCRIPTION) || ((LA12_0 >= USE) && (LA12_0 <= VAR_STRING)))) { - alt12 = 1; - } - - switch (alt12) { - case 1: - // Velvet.g:139:17: nonFeatureDefinition - { - pushFollow(FOLLOW_nonFeatureDefinition_in_definition795); - nonFeatureDefinition45 = nonFeatureDefinition(); - - state._fsp--; - - adaptor.addChild(root_0, nonFeatureDefinition45.getTree()); - - } - break; - - default: - break loop12; - } - } while (true); - - } - + setState(166); + use(); } - break; - case 2: - // Velvet.g:139:42: ( feature ( feature | nonFeatureDefinition )* ) + break; + case VAR_INT: + case VAR_FLOAT: + case VAR_STRING: + case VAR_BOOL: + enterOuterAlt(_localctx, 3); { - // Velvet.g:139:42: ( feature ( feature | nonFeatureDefinition )* ) - // Velvet.g:139:43: feature ( feature | nonFeatureDefinition )* - { - pushFollow(FOLLOW_feature_in_definition802); - feature46 = feature(); - - state._fsp--; - - adaptor.addChild(root_0, feature46.getTree()); - - // Velvet.g:139:51: ( feature | nonFeatureDefinition )* - loop13: do { - int alt13 = 3; - final int LA13_0 = input.LA(1); - - if (((LA13_0 == ABSTRACT) || (LA13_0 == FEATURE) || (LA13_0 == MANDATORY))) { - alt13 = 1; - } else if (((LA13_0 == CONSTRAINT) || (LA13_0 == DESCRIPTION) || ((LA13_0 >= USE) && (LA13_0 <= VAR_STRING)))) { - alt13 = 2; - } - - switch (alt13) { - case 1: - // Velvet.g:139:52: feature - { - pushFollow(FOLLOW_feature_in_definition805); - feature47 = feature(); - - state._fsp--; - - adaptor.addChild(root_0, feature47.getTree()); - - } - break; - case 2: - // Velvet.g:139:62: nonFeatureDefinition - { - pushFollow(FOLLOW_nonFeatureDefinition_in_definition809); - nonFeatureDefinition48 = nonFeatureDefinition(); - - state._fsp--; - - adaptor.addChild(root_0, nonFeatureDefinition48.getTree()); - - } - break; - - default: - break loop13; - } - } while (true); - - } - + setState(167); + attribute(); } - break; - + break; + case DESCRIPTION: + enterOuterAlt(_localctx, 4); + { + setState(168); + description(); } - + break; + default: + throw new NoViableAltException(this); } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "definition" - - public static class nonFeatureDefinition_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class UseContext extends ParserRuleContext { + public TerminalNode USE() { return getToken(VelvetParser.USE, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public TerminalNode SEMI() { return getToken(VelvetParser.SEMI, 0); } + public UseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_use; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterUse(this); } - }; - - // $ANTLR start "nonFeatureDefinition" - // Velvet.g:143:1: nonFeatureDefinition : ( constraint | use | attribute | description ); - public final VelvetParser.nonFeatureDefinition_return nonFeatureDefinition() throws RecognitionException { - final VelvetParser.nonFeatureDefinition_return retval = new VelvetParser.nonFeatureDefinition_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - VelvetParser.constraint_return constraint49 = null; - - VelvetParser.use_return use50 = null; - - VelvetParser.attribute_return attribute51 = null; - - VelvetParser.description_return description52 = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitUse(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitUse(this); + else return visitor.visitChildren(this); + } + } + public final UseContext use() throws RecognitionException { + UseContext _localctx = new UseContext(_ctx, getState()); + enterRule(_localctx, 22, RULE_use); try { - // Velvet.g:144:2: ( constraint | use | attribute | description ) - int alt15 = 4; - switch (input.LA(1)) { - case CONSTRAINT: { - alt15 = 1; - } - break; - case USE: { - alt15 = 2; - } - break; - case VAR_BOOL: - case VAR_FLOAT: - case VAR_INT: - case VAR_STRING: { - alt15 = 3; - } - break; - case DESCRIPTION: { - alt15 = 4; + enterOuterAlt(_localctx, 1); + { + setState(171); + match(USE); + setState(172); + name(); + setState(173); + match(SEMI); } - break; - default: - final NoViableAltException nvae = new NoViableAltException("", 15, 0, input); - - throw nvae; + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } - } + @SuppressWarnings("CheckReturnValue") + public static class FeatureContext extends ParserRuleContext { + public TerminalNode FEATURE() { return getToken(VelvetParser.FEATURE, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public DefinitionsContext definitions() { + return getRuleContext(DefinitionsContext.class,0); + } + public TerminalNode SEMI() { return getToken(VelvetParser.SEMI, 0); } + public TerminalNode MANDATORY() { return getToken(VelvetParser.MANDATORY, 0); } + public TerminalNode ABSTRACT() { return getToken(VelvetParser.ABSTRACT, 0); } + public FeatureContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_feature; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterFeature(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitFeature(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitFeature(this); + else return visitor.visitChildren(this); + } + } - switch (alt15) { - case 1: - // Velvet.g:144:4: constraint + public final FeatureContext feature() throws RecognitionException { + FeatureContext _localctx = new FeatureContext(_ctx, getState()); + enterRule(_localctx, 24, RULE_feature); + try { + enterOuterAlt(_localctx, 1); { - root_0 = (Tree) adaptor.nil(); - - pushFollow(FOLLOW_constraint_in_nonFeatureDefinition831); - constraint49 = constraint(); - - state._fsp--; - - adaptor.addChild(root_0, constraint49.getTree()); - - } + setState(181); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,16,_ctx) ) { + case 1: + { + setState(175); + match(MANDATORY); + setState(176); + match(ABSTRACT); + } break; case 2: - // Velvet.g:145:4: use - { - root_0 = (Tree) adaptor.nil(); - - pushFollow(FOLLOW_use_in_nonFeatureDefinition836); - use50 = use(); - - state._fsp--; - - adaptor.addChild(root_0, use50.getTree()); - - } + { + setState(177); + match(ABSTRACT); + setState(178); + match(MANDATORY); + } break; case 3: - // Velvet.g:146:4: attribute - { - root_0 = (Tree) adaptor.nil(); - - pushFollow(FOLLOW_attribute_in_nonFeatureDefinition841); - attribute51 = attribute(); - - state._fsp--; - - adaptor.addChild(root_0, attribute51.getTree()); - - } + { + setState(179); + match(MANDATORY); + } break; case 4: - // Velvet.g:147:4: description - { - root_0 = (Tree) adaptor.nil(); - - pushFollow(FOLLOW_description_in_nonFeatureDefinition847); - description52 = description(); - - state._fsp--; - - adaptor.addChild(root_0, description52.getTree()); - + { + setState(180); + match(ABSTRACT); + } + break; } + setState(183); + match(FEATURE); + setState(184); + name(); + setState(187); + _errHandler.sync(this); + switch (_input.LA(1)) { + case START_C: + { + setState(185); + definitions(); + } break; - + case SEMI: + { + setState(186); + match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } } - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "nonFeatureDefinition" - - public static class use_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class FeatureGroupContext extends ParserRuleContext { + public GroupTypeContext groupType() { + return getRuleContext(GroupTypeContext.class,0); + } + public TerminalNode START_C() { return getToken(VelvetParser.START_C, 0); } + public TerminalNode END_C() { return getToken(VelvetParser.END_C, 0); } + public List feature() { + return getRuleContexts(FeatureContext.class); + } + public FeatureContext feature(int i) { + return getRuleContext(FeatureContext.class,i); + } + public FeatureGroupContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_featureGroup; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterFeatureGroup(this); } - }; - - // $ANTLR start "use" - // Velvet.g:150:1: use : USE name SEMI -> ^( USE name ) ; - public final VelvetParser.use_return use() throws RecognitionException { - final VelvetParser.use_return retval = new VelvetParser.use_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token USE53 = null; - Token SEMI55 = null; - VelvetParser.name_return name54 = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitFeatureGroup(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitFeatureGroup(this); + else return visitor.visitChildren(this); + } + } - final Tree USE53_tree = null; - final Tree SEMI55_tree = null; - final RewriteRuleTokenStream stream_USE = new RewriteRuleTokenStream(adaptor, "token USE"); - final RewriteRuleTokenStream stream_SEMI = new RewriteRuleTokenStream(adaptor, "token SEMI"); - final RewriteRuleSubtreeStream stream_name = new RewriteRuleSubtreeStream(adaptor, "rule name"); + public final FeatureGroupContext featureGroup() throws RecognitionException { + FeatureGroupContext _localctx = new FeatureGroupContext(_ctx, getState()); + enterRule(_localctx, 26, RULE_featureGroup); + int _la; try { - // Velvet.g:150:5: ( USE name SEMI -> ^( USE name ) ) - // Velvet.g:150:7: USE name SEMI + enterOuterAlt(_localctx, 1); { - USE53 = (Token) match(input, USE, FOLLOW_USE_in_use858); - stream_USE.add(USE53); - - pushFollow(FOLLOW_name_in_use860); - name54 = name(); - - state._fsp--; - - stream_name.add(name54.getTree()); - - SEMI55 = (Token) match(input, SEMI, FOLLOW_SEMI_in_use862); - stream_SEMI.add(SEMI55); - - // AST REWRITE - // elements: name, USE - // token labels: - // rule labels: retval - // token list labels: - // rule list labels: - // wildcard labels: - retval.tree = root_0; - final RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null); - - root_0 = (Tree) adaptor.nil(); - // 151:2: -> ^( USE name ) + setState(189); + groupType(); + setState(190); + match(START_C); + setState(192); + _errHandler.sync(this); + _la = _input.LA(1); + do { { - // Velvet.g:151:5: ^( USE name ) - { - Tree root_1 = (Tree) adaptor.nil(); - root_1 = (Tree) adaptor.becomeRoot(stream_USE.nextNode(), root_1); - - adaptor.addChild(root_1, stream_name.nextTree()); - - adaptor.addChild(root_0, root_1); - } - + { + setState(191); + feature(); } - - retval.tree = root_0; - + } + setState(194); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & 524L) != 0) ); + setState(196); + match(END_C); } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "use" - - public static class feature_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class GroupTypeContext extends ParserRuleContext { + public TerminalNode SOMEOF() { return getToken(VelvetParser.SOMEOF, 0); } + public TerminalNode ONEOF() { return getToken(VelvetParser.ONEOF, 0); } + public GroupTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_groupType; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterGroupType(this); } - }; - - // $ANTLR start "feature" - // Velvet.g:154:1: feature : ( MANDATORY ABSTRACT | ABSTRACT MANDATORY | MANDATORY | ABSTRACT )? FEATURE name ( definitions | SEMI ) -> ^( FEATURE name ( - // MANDATORY )? ( ABSTRACT )? ( definitions )? ) ; - public final VelvetParser.feature_return feature() throws RecognitionException { - final VelvetParser.feature_return retval = new VelvetParser.feature_return(); - retval.start = input.LT(1); - - Tree root_0 = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitGroupType(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitGroupType(this); + else return visitor.visitChildren(this); + } + } - Token MANDATORY56 = null; - Token ABSTRACT57 = null; - Token ABSTRACT58 = null; - Token MANDATORY59 = null; - Token MANDATORY60 = null; - Token ABSTRACT61 = null; - Token FEATURE62 = null; - Token SEMI65 = null; - VelvetParser.name_return name63 = null; + public final GroupTypeContext groupType() throws RecognitionException { + GroupTypeContext _localctx = new GroupTypeContext(_ctx, getState()); + enterRule(_localctx, 28, RULE_groupType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(198); + _la = _input.LA(1); + if ( !(_la==SOMEOF || _la==ONEOF) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } - VelvetParser.definitions_return definitions64 = null; + @SuppressWarnings("CheckReturnValue") + public static class DescriptionContext extends ParserRuleContext { + public TerminalNode DESCRIPTION() { return getToken(VelvetParser.DESCRIPTION, 0); } + public TerminalNode STRING() { return getToken(VelvetParser.STRING, 0); } + public TerminalNode SEMI() { return getToken(VelvetParser.SEMI, 0); } + public DescriptionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_description; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterDescription(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitDescription(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitDescription(this); + else return visitor.visitChildren(this); + } + } - final Tree MANDATORY56_tree = null; - final Tree ABSTRACT57_tree = null; - final Tree ABSTRACT58_tree = null; - final Tree MANDATORY59_tree = null; - final Tree MANDATORY60_tree = null; - final Tree ABSTRACT61_tree = null; - final Tree FEATURE62_tree = null; - final Tree SEMI65_tree = null; - final RewriteRuleTokenStream stream_ABSTRACT = new RewriteRuleTokenStream(adaptor, "token ABSTRACT"); - final RewriteRuleTokenStream stream_MANDATORY = new RewriteRuleTokenStream(adaptor, "token MANDATORY"); - final RewriteRuleTokenStream stream_SEMI = new RewriteRuleTokenStream(adaptor, "token SEMI"); - final RewriteRuleTokenStream stream_FEATURE = new RewriteRuleTokenStream(adaptor, "token FEATURE"); - final RewriteRuleSubtreeStream stream_name = new RewriteRuleSubtreeStream(adaptor, "rule name"); - final RewriteRuleSubtreeStream stream_definitions = new RewriteRuleSubtreeStream(adaptor, "rule definitions"); + public final DescriptionContext description() throws RecognitionException { + DescriptionContext _localctx = new DescriptionContext(_ctx, getState()); + enterRule(_localctx, 30, RULE_description); try { - // Velvet.g:155:2: ( ( MANDATORY ABSTRACT | ABSTRACT MANDATORY | MANDATORY | ABSTRACT )? FEATURE name ( definitions | SEMI ) -> ^( FEATURE name ( - // MANDATORY )? ( ABSTRACT )? ( definitions )? ) ) - // Velvet.g:155:4: ( MANDATORY ABSTRACT | ABSTRACT MANDATORY | MANDATORY | ABSTRACT )? FEATURE name ( definitions | SEMI ) + enterOuterAlt(_localctx, 1); { - // Velvet.g:155:4: ( MANDATORY ABSTRACT | ABSTRACT MANDATORY | MANDATORY | ABSTRACT )? - int alt16 = 5; - final int LA16_0 = input.LA(1); + setState(200); + match(DESCRIPTION); + setState(201); + match(STRING); + setState(202); + match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } - if ((LA16_0 == MANDATORY)) { - final int LA16_1 = input.LA(2); - - if ((LA16_1 == ABSTRACT)) { - alt16 = 1; - } else if ((LA16_1 == FEATURE)) { - alt16 = 3; - } - } else if ((LA16_0 == ABSTRACT)) { - final int LA16_2 = input.LA(2); + @SuppressWarnings("CheckReturnValue") + public static class ConstraintContext extends ParserRuleContext { + public TerminalNode CONSTRAINT() { return getToken(VelvetParser.CONSTRAINT, 0); } + public TerminalNode SEMI() { return getToken(VelvetParser.SEMI, 0); } + public TerminalNode ID() { return getToken(VelvetParser.ID, 0); } + public TerminalNode EQ() { return getToken(VelvetParser.EQ, 0); } + public ConstraintDefinitionContext constraintDefinition() { + return getRuleContext(ConstraintDefinitionContext.class,0); + } + public AttributeConstraintContext attributeConstraint() { + return getRuleContext(AttributeConstraintContext.class,0); + } + public ConstraintContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constraint; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterConstraint(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitConstraint(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitConstraint(this); + else return visitor.visitChildren(this); + } + } - if ((LA16_2 == MANDATORY)) { - alt16 = 2; - } else if ((LA16_2 == FEATURE)) { - alt16 = 4; - } - } - switch (alt16) { - case 1: - // Velvet.g:155:5: MANDATORY ABSTRACT + public final ConstraintContext constraint() throws RecognitionException { + ConstraintContext _localctx = new ConstraintContext(_ctx, getState()); + enterRule(_localctx, 32, RULE_constraint); + try { + enterOuterAlt(_localctx, 1); + { + setState(204); + match(CONSTRAINT); + { + setState(205); + match(ID); + setState(206); + match(EQ); + } + setState(210); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) { + case 1: { - MANDATORY56 = (Token) match(input, MANDATORY, FOLLOW_MANDATORY_in_feature883); - stream_MANDATORY.add(MANDATORY56); - - ABSTRACT57 = (Token) match(input, ABSTRACT, FOLLOW_ABSTRACT_in_feature885); - stream_ABSTRACT.add(ABSTRACT57); - + setState(208); + constraintDefinition(); } - break; - case 2: - // Velvet.g:155:26: ABSTRACT MANDATORY + break; + case 2: { - ABSTRACT58 = (Token) match(input, ABSTRACT, FOLLOW_ABSTRACT_in_feature889); - stream_ABSTRACT.add(ABSTRACT58); + setState(209); + attributeConstraint(); + } + break; + } + setState(212); + match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } - MANDATORY59 = (Token) match(input, MANDATORY, FOLLOW_MANDATORY_in_feature891); - stream_MANDATORY.add(MANDATORY59); + @SuppressWarnings("CheckReturnValue") + public static class ConstraintDefinitionContext extends ParserRuleContext { + public List constraintOperand() { + return getRuleContexts(ConstraintOperandContext.class); + } + public ConstraintOperandContext constraintOperand(int i) { + return getRuleContext(ConstraintOperandContext.class,i); + } + public List binaryOp() { + return getRuleContexts(BinaryOpContext.class); + } + public BinaryOpContext binaryOp(int i) { + return getRuleContext(BinaryOpContext.class,i); + } + public ConstraintDefinitionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constraintDefinition; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterConstraintDefinition(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitConstraintDefinition(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitConstraintDefinition(this); + else return visitor.visitChildren(this); + } + } - } - break; - case 3: - // Velvet.g:155:47: MANDATORY + public final ConstraintDefinitionContext constraintDefinition() throws RecognitionException { + ConstraintDefinitionContext _localctx = new ConstraintDefinitionContext(_ctx, getState()); + enterRule(_localctx, 34, RULE_constraintDefinition); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(214); + constraintOperand(); + setState(220); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 16642998272L) != 0)) { { - MANDATORY60 = (Token) match(input, MANDATORY, FOLLOW_MANDATORY_in_feature895); - stream_MANDATORY.add(MANDATORY60); - - } - break; - case 4: - // Velvet.g:155:59: ABSTRACT { - ABSTRACT61 = (Token) match(input, ABSTRACT, FOLLOW_ABSTRACT_in_feature899); - stream_ABSTRACT.add(ABSTRACT61); - + setState(215); + binaryOp(); + setState(216); + constraintOperand(); } - break; - } + setState(222); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } - FEATURE62 = (Token) match(input, FEATURE, FOLLOW_FEATURE_in_feature906); - stream_FEATURE.add(FEATURE62); - - pushFollow(FOLLOW_name_in_feature908); - name63 = name(); - - state._fsp--; - - stream_name.add(name63.getTree()); - - // Velvet.g:156:17: ( definitions | SEMI ) - int alt17 = 2; - final int LA17_0 = input.LA(1); - - if ((LA17_0 == START_C)) { - alt17 = 1; - } else if ((LA17_0 == SEMI)) { - alt17 = 2; - } else { - final NoViableAltException nvae = new NoViableAltException("", 17, 0, input); - - throw nvae; + @SuppressWarnings("CheckReturnValue") + public static class ConstraintOperandContext extends ParserRuleContext { + public TerminalNode START_R() { return getToken(VelvetParser.START_R, 0); } + public ConstraintDefinitionContext constraintDefinition() { + return getRuleContext(ConstraintDefinitionContext.class,0); + } + public TerminalNode END_R() { return getToken(VelvetParser.END_R, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public List unaryOp() { + return getRuleContexts(UnaryOpContext.class); + } + public UnaryOpContext unaryOp(int i) { + return getRuleContext(UnaryOpContext.class,i); + } + public ConstraintOperandContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constraintOperand; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterConstraintOperand(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitConstraintOperand(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitConstraintOperand(this); + else return visitor.visitChildren(this); + } + } - } - switch (alt17) { - case 1: - // Velvet.g:156:18: definitions + public final ConstraintOperandContext constraintOperand() throws RecognitionException { + ConstraintOperandContext _localctx = new ConstraintOperandContext(_ctx, getState()); + enterRule(_localctx, 36, RULE_constraintOperand); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(226); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==OP_NOT) { { - pushFollow(FOLLOW_definitions_in_feature911); - definitions64 = definitions(); - - state._fsp--; - - stream_definitions.add(definitions64.getTree()); - - } - break; - case 2: - // Velvet.g:156:32: SEMI { - SEMI65 = (Token) match(input, SEMI, FOLLOW_SEMI_in_feature915); - stream_SEMI.add(SEMI65); - + setState(223); + unaryOp(); } - break; - } - - // AST REWRITE - // elements: definitions, MANDATORY, ABSTRACT, FEATURE, name - // token labels: - // rule labels: retval - // token list labels: - // rule list labels: - // wildcard labels: - retval.tree = root_0; - final RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null); - - root_0 = (Tree) adaptor.nil(); - // 157:2: -> ^( FEATURE name ( MANDATORY )? ( ABSTRACT )? ( definitions )? ) + setState(228); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(234); + _errHandler.sync(this); + switch (_input.LA(1)) { + case START_R: { - // Velvet.g:157:5: ^( FEATURE name ( MANDATORY )? ( ABSTRACT )? ( definitions )? ) - { - Tree root_1 = (Tree) adaptor.nil(); - root_1 = (Tree) adaptor.becomeRoot(stream_FEATURE.nextNode(), root_1); - - adaptor.addChild(root_1, stream_name.nextTree()); - - // Velvet.g:157:20: ( MANDATORY )? - if (stream_MANDATORY.hasNext()) { - adaptor.addChild(root_1, stream_MANDATORY.nextNode()); - - } - stream_MANDATORY.reset(); - - // Velvet.g:157:31: ( ABSTRACT )? - if (stream_ABSTRACT.hasNext()) { - adaptor.addChild(root_1, stream_ABSTRACT.nextNode()); - - } - stream_ABSTRACT.reset(); - - // Velvet.g:157:41: ( definitions )? - if (stream_definitions.hasNext()) { - adaptor.addChild(root_1, stream_definitions.nextTree()); - - } - stream_definitions.reset(); - - adaptor.addChild(root_0, root_1); - } - + setState(229); + match(START_R); + setState(230); + constraintDefinition(); + setState(231); + match(END_R); } - - retval.tree = root_0; - + break; + case ID: + case IDPath: + { + setState(233); + name(); + } + break; + default: + throw new NoViableAltException(this); + } } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "feature" - - public static class featureGroup_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class AttributeContext extends ParserRuleContext { + public TerminalNode SEMI() { return getToken(VelvetParser.SEMI, 0); } + public IntAttributeContext intAttribute() { + return getRuleContext(IntAttributeContext.class,0); + } + public FloatAttributeContext floatAttribute() { + return getRuleContext(FloatAttributeContext.class,0); + } + public StringAttributeContext stringAttribute() { + return getRuleContext(StringAttributeContext.class,0); + } + public BoolAttributeContext boolAttribute() { + return getRuleContext(BoolAttributeContext.class,0); + } + public AttributeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_attribute; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterAttribute(this); } - }; - - // $ANTLR start "featureGroup" - // Velvet.g:160:1: featureGroup : groupType START_C ( feature )+ END_C -> ^( GROUP groupType ( feature )+ ) ; - public final VelvetParser.featureGroup_return featureGroup() throws RecognitionException { - final VelvetParser.featureGroup_return retval = new VelvetParser.featureGroup_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token START_C67 = null; - Token END_C69 = null; - VelvetParser.groupType_return groupType66 = null; - - VelvetParser.feature_return feature68 = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitAttribute(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitAttribute(this); + else return visitor.visitChildren(this); + } + } - final Tree START_C67_tree = null; - final Tree END_C69_tree = null; - final RewriteRuleTokenStream stream_END_C = new RewriteRuleTokenStream(adaptor, "token END_C"); - final RewriteRuleTokenStream stream_START_C = new RewriteRuleTokenStream(adaptor, "token START_C"); - final RewriteRuleSubtreeStream stream_groupType = new RewriteRuleSubtreeStream(adaptor, "rule groupType"); - final RewriteRuleSubtreeStream stream_feature = new RewriteRuleSubtreeStream(adaptor, "rule feature"); + public final AttributeContext attribute() throws RecognitionException { + AttributeContext _localctx = new AttributeContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_attribute); try { - // Velvet.g:161:2: ( groupType START_C ( feature )+ END_C -> ^( GROUP groupType ( feature )+ ) ) - // Velvet.g:161:4: groupType START_C ( feature )+ END_C + enterOuterAlt(_localctx, 1); { - pushFollow(FOLLOW_groupType_in_featureGroup946); - groupType66 = groupType(); - - state._fsp--; - - stream_groupType.add(groupType66.getTree()); - - START_C67 = (Token) match(input, START_C, FOLLOW_START_C_in_featureGroup948); - stream_START_C.add(START_C67); - - // Velvet.g:161:22: ( feature )+ - int cnt18 = 0; - loop18: do { - int alt18 = 2; - final int LA18_0 = input.LA(1); - - if (((LA18_0 == ABSTRACT) || (LA18_0 == FEATURE) || (LA18_0 == MANDATORY))) { - alt18 = 1; - } - - switch (alt18) { - case 1: - // Velvet.g:161:22: feature - { - pushFollow(FOLLOW_feature_in_featureGroup950); - feature68 = feature(); - - state._fsp--; - - stream_feature.add(feature68.getTree()); - - } - break; - - default: - if (cnt18 >= 1) { - break loop18; - } - final EarlyExitException eee = new EarlyExitException(18, input); - throw eee; - } - cnt18++; - } while (true); - - END_C69 = (Token) match(input, END_C, FOLLOW_END_C_in_featureGroup953); - stream_END_C.add(END_C69); - - // AST REWRITE - // elements: feature, groupType - // token labels: - // rule labels: retval - // token list labels: - // rule list labels: - // wildcard labels: - retval.tree = root_0; - final RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null); - - root_0 = (Tree) adaptor.nil(); - // 162:2: -> ^( GROUP groupType ( feature )+ ) + setState(240); + _errHandler.sync(this); + switch (_input.LA(1)) { + case VAR_INT: { - // Velvet.g:162:5: ^( GROUP groupType ( feature )+ ) - { - Tree root_1 = (Tree) adaptor.nil(); - root_1 = (Tree) adaptor.becomeRoot(adaptor.create(GROUP, "GROUP"), root_1); - - adaptor.addChild(root_1, stream_groupType.nextTree()); - - if (!(stream_feature.hasNext())) { - throw new RewriteEarlyExitException(); - } - while (stream_feature.hasNext()) { - adaptor.addChild(root_1, stream_feature.nextTree()); - - } - stream_feature.reset(); - - adaptor.addChild(root_0, root_1); - } - + setState(236); + intAttribute(); } - - retval.tree = root_0; - + break; + case VAR_FLOAT: + { + setState(237); + floatAttribute(); + } + break; + case VAR_STRING: + { + setState(238); + stringAttribute(); + } + break; + case VAR_BOOL: + { + setState(239); + boolAttribute(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(242); + match(SEMI); } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "featureGroup" - - public static class groupType_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class AttributeConstraintContext extends ParserRuleContext { + public List attribNumExpr() { + return getRuleContexts(AttribNumExprContext.class); + } + public AttribNumExprContext attribNumExpr(int i) { + return getRuleContext(AttribNumExprContext.class,i); + } + public AttribRelationContext attribRelation() { + return getRuleContext(AttribRelationContext.class,0); + } + public AttributeConstraintContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_attributeConstraint; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterAttributeConstraint(this); } - }; - - // $ANTLR start "groupType" - // Velvet.g:165:1: groupType : ( SOMEOF | ONEOF ); - public final VelvetParser.groupType_return groupType() throws RecognitionException { - final VelvetParser.groupType_return retval = new VelvetParser.groupType_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token set70 = null; - - final Tree set70_tree = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitAttributeConstraint(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitAttributeConstraint(this); + else return visitor.visitChildren(this); + } + } + public final AttributeConstraintContext attributeConstraint() throws RecognitionException { + AttributeConstraintContext _localctx = new AttributeConstraintContext(_ctx, getState()); + enterRule(_localctx, 40, RULE_attributeConstraint); try { - // Velvet.g:166:2: ( SOMEOF | ONEOF ) - // Velvet.g: + enterOuterAlt(_localctx, 1); { - root_0 = (Tree) adaptor.nil(); - - set70 = input.LT(1); - - if ((input.LA(1) == ONEOF) || (input.LA(1) == SOMEOF)) { - input.consume(); - adaptor.addChild(root_0, adaptor.create(set70)); - state.errorRecovery = false; - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - throw mse; - } - + setState(244); + attribNumExpr(); + setState(245); + attribRelation(); + setState(246); + attribNumExpr(); } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "groupType" - - public static class description_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class AttribNumExprContext extends ParserRuleContext { + public List attribNumInstance() { + return getRuleContexts(AttribNumInstanceContext.class); + } + public AttribNumInstanceContext attribNumInstance(int i) { + return getRuleContext(AttribNumInstanceContext.class,i); + } + public List attribOperator() { + return getRuleContexts(AttribOperatorContext.class); + } + public AttribOperatorContext attribOperator(int i) { + return getRuleContext(AttribOperatorContext.class,i); + } + public AttribNumExprContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_attribNumExpr; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterAttribNumExpr(this); } - }; - - // $ANTLR start "description" - // Velvet.g:170:1: description : DESCRIPTION STRING SEMI -> ^( DESCRIPTION STRING ) ; - public final VelvetParser.description_return description() throws RecognitionException { - final VelvetParser.description_return retval = new VelvetParser.description_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token DESCRIPTION71 = null; - Token STRING72 = null; - Token SEMI73 = null; - - final Tree DESCRIPTION71_tree = null; - final Tree STRING72_tree = null; - final Tree SEMI73_tree = null; - final RewriteRuleTokenStream stream_DESCRIPTION = new RewriteRuleTokenStream(adaptor, "token DESCRIPTION"); - final RewriteRuleTokenStream stream_SEMI = new RewriteRuleTokenStream(adaptor, "token SEMI"); - final RewriteRuleTokenStream stream_STRING = new RewriteRuleTokenStream(adaptor, "token STRING"); + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitAttribNumExpr(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitAttribNumExpr(this); + else return visitor.visitChildren(this); + } + } + public final AttribNumExprContext attribNumExpr() throws RecognitionException { + AttribNumExprContext _localctx = new AttribNumExprContext(_ctx, getState()); + enterRule(_localctx, 42, RULE_attribNumExpr); + int _la; try { - // Velvet.g:171:2: ( DESCRIPTION STRING SEMI -> ^( DESCRIPTION STRING ) ) - // Velvet.g:171:4: DESCRIPTION STRING SEMI + enterOuterAlt(_localctx, 1); { - DESCRIPTION71 = (Token) match(input, DESCRIPTION, FOLLOW_DESCRIPTION_in_description995); - stream_DESCRIPTION.add(DESCRIPTION71); - - STRING72 = (Token) match(input, STRING, FOLLOW_STRING_in_description997); - stream_STRING.add(STRING72); - - SEMI73 = (Token) match(input, SEMI, FOLLOW_SEMI_in_description999); - stream_SEMI.add(SEMI73); - - // AST REWRITE - // elements: STRING, DESCRIPTION - // token labels: - // rule labels: retval - // token list labels: - // rule list labels: - // wildcard labels: - retval.tree = root_0; - final RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null); - - root_0 = (Tree) adaptor.nil(); - // 172:2: -> ^( DESCRIPTION STRING ) + setState(248); + attribNumInstance(); + setState(254); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==PLUS || _la==MINUS) { { - // Velvet.g:172:5: ^( DESCRIPTION STRING ) - { - Tree root_1 = (Tree) adaptor.nil(); - root_1 = (Tree) adaptor.becomeRoot(stream_DESCRIPTION.nextNode(), root_1); - - adaptor.addChild(root_1, stream_STRING.nextNode()); - - adaptor.addChild(root_0, root_1); - } - + { + setState(249); + attribOperator(); + setState(250); + attribNumInstance(); } - - retval.tree = root_0; - + } + setState(256); + _errHandler.sync(this); + _la = _input.LA(1); + } } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "description" - - public static class constraint_return extends ParserRuleReturnScope { - Tree tree; - - @Override - public Object getTree() { - return tree; + @SuppressWarnings("CheckReturnValue") + public static class AttribOperatorContext extends ParserRuleContext { + public TerminalNode PLUS() { return getToken(VelvetParser.PLUS, 0); } + public TerminalNode MINUS() { return getToken(VelvetParser.MINUS, 0); } + public AttribOperatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); } - }; - - // $ANTLR start "constraint" - // Velvet.g:175:1: constraint : CONSTRAINT ^ ( ID EQ !)? ( constraintDefinition | attributeConstraint ) SEMI !; - public final VelvetParser.constraint_return constraint() throws RecognitionException { - final VelvetParser.constraint_return retval = new VelvetParser.constraint_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token CONSTRAINT74 = null; - Token ID75 = null; - Token EQ76 = null; - Token SEMI79 = null; - VelvetParser.constraintDefinition_return constraintDefinition77 = null; - - VelvetParser.attributeConstraint_return attributeConstraint78 = null; - - Tree CONSTRAINT74_tree = null; - Tree ID75_tree = null; - final Tree EQ76_tree = null; - final Tree SEMI79_tree = null; - - try { - // Velvet.g:176:2: ( CONSTRAINT ^ ( ID EQ !)? ( constraintDefinition | attributeConstraint ) SEMI !) - // Velvet.g:176:4: CONSTRAINT ^ ( ID EQ !)? ( constraintDefinition | attributeConstraint ) SEMI ! - { - root_0 = (Tree) adaptor.nil(); - - CONSTRAINT74 = (Token) match(input, CONSTRAINT, FOLLOW_CONSTRAINT_in_constraint1020); - CONSTRAINT74_tree = (Tree) adaptor.create(CONSTRAINT74); - root_0 = (Tree) adaptor.becomeRoot(CONSTRAINT74_tree, root_0); - - // Velvet.g:176:16: ( ID EQ !)? - int alt19 = 2; - final int LA19_0 = input.LA(1); - - if ((LA19_0 == ID)) { - final int LA19_1 = input.LA(2); - - if ((LA19_1 == EQ)) { - alt19 = 1; - } - } - switch (alt19) { - case 1: - // Velvet.g:176:17: ID EQ ! - { - ID75 = (Token) match(input, ID, FOLLOW_ID_in_constraint1024); - ID75_tree = (Tree) adaptor.create(ID75); - adaptor.addChild(root_0, ID75_tree); - - EQ76 = (Token) match(input, EQ, FOLLOW_EQ_in_constraint1026); - - } - break; - - } - - // Velvet.g:176:26: ( constraintDefinition | attributeConstraint ) - int alt20 = 2; - switch (input.LA(1)) { - case OP_NOT: - case START_R: { - alt20 = 1; - } - break; - case ID: - case IDPath: { - final int LA20_2 = input.LA(2); - - if ((((LA20_2 >= OP_AND) && (LA20_2 <= OP_IMPLIES)) || ((LA20_2 >= OP_OR) && (LA20_2 <= OP_XOR)) || (LA20_2 == SEMI))) { - alt20 = 1; - } else if (((LA20_2 == ATTR_OP_EQUALS) || (LA20_2 == ATTR_OP_GREATER_EQ) || (LA20_2 == ATTR_OP_LESS_EQ) || (LA20_2 == MINUS) - || (LA20_2 == PLUS))) { - alt20 = 2; - } else { - final NoViableAltException nvae = new NoViableAltException("", 20, 2, input); - - throw nvae; - - } - } - break; - case INT: { - alt20 = 2; - } - break; - default: - final NoViableAltException nvae = new NoViableAltException("", 20, 0, input); - - throw nvae; - - } - - switch (alt20) { - case 1: - // Velvet.g:176:27: constraintDefinition - { - pushFollow(FOLLOW_constraintDefinition_in_constraint1032); - constraintDefinition77 = constraintDefinition(); - - state._fsp--; - - adaptor.addChild(root_0, constraintDefinition77.getTree()); - - } - break; - case 2: - // Velvet.g:176:50: attributeConstraint - { - pushFollow(FOLLOW_attributeConstraint_in_constraint1036); - attributeConstraint78 = attributeConstraint(); - - state._fsp--; - - adaptor.addChild(root_0, attributeConstraint78.getTree()); - - } - break; - - } - - SEMI79 = (Token) match(input, SEMI, FOLLOW_SEMI_in_constraint1039); - - } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - - } - - finally { - // do for sure before leaving - } - return retval; - } - // $ANTLR end "constraint" - - public static class constraintDefinition_return extends ParserRuleReturnScope { - - Tree tree; - - @Override - public Object getTree() { - return tree; - } - }; - - // $ANTLR start "constraintDefinition" - // Velvet.g:179:1: constraintDefinition : constraintOperand ( binaryOp constraintOperand )* -> ^( CONSTR ( constraintOperand )+ ( binaryOp )* ) ; - public final VelvetParser.constraintDefinition_return constraintDefinition() throws RecognitionException { - final VelvetParser.constraintDefinition_return retval = new VelvetParser.constraintDefinition_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - VelvetParser.constraintOperand_return constraintOperand80 = null; - - VelvetParser.binaryOp_return binaryOp81 = null; - - VelvetParser.constraintOperand_return constraintOperand82 = null; - - final RewriteRuleSubtreeStream stream_constraintOperand = new RewriteRuleSubtreeStream(adaptor, "rule constraintOperand"); - final RewriteRuleSubtreeStream stream_binaryOp = new RewriteRuleSubtreeStream(adaptor, "rule binaryOp"); - try { - // Velvet.g:180:2: ( constraintOperand ( binaryOp constraintOperand )* -> ^( CONSTR ( constraintOperand )+ ( binaryOp )* ) ) - // Velvet.g:180:4: constraintOperand ( binaryOp constraintOperand )* - { - pushFollow(FOLLOW_constraintOperand_in_constraintDefinition1052); - constraintOperand80 = constraintOperand(); - - state._fsp--; - - stream_constraintOperand.add(constraintOperand80.getTree()); - - // Velvet.g:180:22: ( binaryOp constraintOperand )* - loop21: do { - int alt21 = 2; - final int LA21_0 = input.LA(1); - - if ((((LA21_0 >= OP_AND) && (LA21_0 <= OP_IMPLIES)) || ((LA21_0 >= OP_OR) && (LA21_0 <= OP_XOR)))) { - alt21 = 1; - } - - switch (alt21) { - case 1: - // Velvet.g:180:23: binaryOp constraintOperand - { - pushFollow(FOLLOW_binaryOp_in_constraintDefinition1055); - binaryOp81 = binaryOp(); - - state._fsp--; - - stream_binaryOp.add(binaryOp81.getTree()); - - pushFollow(FOLLOW_constraintOperand_in_constraintDefinition1057); - constraintOperand82 = constraintOperand(); - - state._fsp--; - - stream_constraintOperand.add(constraintOperand82.getTree()); - - } - break; - - default: - break loop21; - } - } while (true); - - // AST REWRITE - // elements: constraintOperand, binaryOp - // token labels: - // rule labels: retval - // token list labels: - // rule list labels: - // wildcard labels: - retval.tree = root_0; - final RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null); - - root_0 = (Tree) adaptor.nil(); - // 181:2: -> ^( CONSTR ( constraintOperand )+ ( binaryOp )* ) - { - // Velvet.g:181:5: ^( CONSTR ( constraintOperand )+ ( binaryOp )* ) - { - Tree root_1 = (Tree) adaptor.nil(); - root_1 = (Tree) adaptor.becomeRoot(adaptor.create(CONSTR, "CONSTR"), root_1); - - if (!(stream_constraintOperand.hasNext())) { - throw new RewriteEarlyExitException(); - } - while (stream_constraintOperand.hasNext()) { - adaptor.addChild(root_1, stream_constraintOperand.nextTree()); - - } - stream_constraintOperand.reset(); - - // Velvet.g:181:33: ( binaryOp )* - while (stream_binaryOp.hasNext()) { - adaptor.addChild(root_1, stream_binaryOp.nextTree()); - - } - stream_binaryOp.reset(); - - adaptor.addChild(root_0, root_1); - } - - } - - retval.tree = root_0; - - } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - - } - - finally { - // do for sure before leaving - } - return retval; - } - // $ANTLR end "constraintDefinition" - - public static class constraintOperand_return extends ParserRuleReturnScope { - - Tree tree; - - @Override - public Object getTree() { - return tree; - } - }; - - // $ANTLR start "constraintOperand" - // Velvet.g:184:1: constraintOperand : ( unaryOp )* ( START_R constraintDefinition END_R | name ) -> ( constraintDefinition )? ( ^( UNARYOP unaryOp ) )* ( - // ^( OPERAND name ) )? ; - public final VelvetParser.constraintOperand_return constraintOperand() throws RecognitionException { - final VelvetParser.constraintOperand_return retval = new VelvetParser.constraintOperand_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token START_R84 = null; - Token END_R86 = null; - VelvetParser.unaryOp_return unaryOp83 = null; - - VelvetParser.constraintDefinition_return constraintDefinition85 = null; - - VelvetParser.name_return name87 = null; - - final Tree START_R84_tree = null; - final Tree END_R86_tree = null; - final RewriteRuleTokenStream stream_END_R = new RewriteRuleTokenStream(adaptor, "token END_R"); - final RewriteRuleTokenStream stream_START_R = new RewriteRuleTokenStream(adaptor, "token START_R"); - final RewriteRuleSubtreeStream stream_name = new RewriteRuleSubtreeStream(adaptor, "rule name"); - final RewriteRuleSubtreeStream stream_unaryOp = new RewriteRuleSubtreeStream(adaptor, "rule unaryOp"); - final RewriteRuleSubtreeStream stream_constraintDefinition = new RewriteRuleSubtreeStream(adaptor, "rule constraintDefinition"); - try { - // Velvet.g:184:19: ( ( unaryOp )* ( START_R constraintDefinition END_R | name ) -> ( constraintDefinition )? ( ^( UNARYOP unaryOp ) )* ( ^( OPERAND - // name ) )? ) - // Velvet.g:184:21: ( unaryOp )* ( START_R constraintDefinition END_R | name ) - { - // Velvet.g:184:21: ( unaryOp )* - loop22: do { - int alt22 = 2; - final int LA22_0 = input.LA(1); - - if ((LA22_0 == OP_NOT)) { - alt22 = 1; - } - - switch (alt22) { - case 1: - // Velvet.g:184:21: unaryOp - { - pushFollow(FOLLOW_unaryOp_in_constraintOperand1084); - unaryOp83 = unaryOp(); - - state._fsp--; - - stream_unaryOp.add(unaryOp83.getTree()); - - } - break; - - default: - break loop22; - } - } while (true); - - // Velvet.g:184:30: ( START_R constraintDefinition END_R | name ) - int alt23 = 2; - final int LA23_0 = input.LA(1); - - if ((LA23_0 == START_R)) { - alt23 = 1; - } else if ((((LA23_0 >= ID) && (LA23_0 <= IDPath)))) { - alt23 = 2; - } else { - final NoViableAltException nvae = new NoViableAltException("", 23, 0, input); - - throw nvae; - - } - switch (alt23) { - case 1: - // Velvet.g:184:31: START_R constraintDefinition END_R - { - START_R84 = (Token) match(input, START_R, FOLLOW_START_R_in_constraintOperand1088); - stream_START_R.add(START_R84); - - pushFollow(FOLLOW_constraintDefinition_in_constraintOperand1090); - constraintDefinition85 = constraintDefinition(); - - state._fsp--; - - stream_constraintDefinition.add(constraintDefinition85.getTree()); - - END_R86 = (Token) match(input, END_R, FOLLOW_END_R_in_constraintOperand1092); - stream_END_R.add(END_R86); - - } - break; - case 2: - // Velvet.g:184:68: name - { - pushFollow(FOLLOW_name_in_constraintOperand1096); - name87 = name(); - - state._fsp--; - - stream_name.add(name87.getTree()); - - } - break; - - } - - // AST REWRITE - // elements: name, constraintDefinition, unaryOp - // token labels: - // rule labels: retval - // token list labels: - // rule list labels: - // wildcard labels: - retval.tree = root_0; - final RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null); - - root_0 = (Tree) adaptor.nil(); - // 185:2: -> ( constraintDefinition )? ( ^( UNARYOP unaryOp ) )* ( ^( OPERAND name ) )? - { - // Velvet.g:185:5: ( constraintDefinition )? - if (stream_constraintDefinition.hasNext()) { - adaptor.addChild(root_0, stream_constraintDefinition.nextTree()); - - } - stream_constraintDefinition.reset(); - - // Velvet.g:185:27: ( ^( UNARYOP unaryOp ) )* - while (stream_unaryOp.hasNext()) { - // Velvet.g:185:27: ^( UNARYOP unaryOp ) - { - Tree root_1 = (Tree) adaptor.nil(); - root_1 = (Tree) adaptor.becomeRoot(adaptor.create(UNARYOP, "UNARYOP"), root_1); - - adaptor.addChild(root_1, stream_unaryOp.nextTree()); - - adaptor.addChild(root_0, root_1); - } - - } - stream_unaryOp.reset(); - - // Velvet.g:185:47: ( ^( OPERAND name ) )? - if (stream_name.hasNext()) { - // Velvet.g:185:47: ^( OPERAND name ) - { - Tree root_1 = (Tree) adaptor.nil(); - root_1 = (Tree) adaptor.becomeRoot(adaptor.create(OPERAND, "OPERAND"), root_1); - - adaptor.addChild(root_1, stream_name.nextTree()); - - adaptor.addChild(root_0, root_1); - } - - } - stream_name.reset(); - - } - - retval.tree = root_0; - - } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - - } - - finally { - // do for sure before leaving - } - return retval; - } - // $ANTLR end "constraintOperand" - - public static class attribute_return extends ParserRuleReturnScope { - - Tree tree; - - @Override - public Object getTree() { - return tree; - } - }; - - // $ANTLR start "attribute" - // Velvet.g:188:1: attribute : ( intAttribute | floatAttribute | stringAttribute | boolAttribute ) SEMI -> ^( ATTR ( intAttribute )? ( floatAttribute )? ( - // stringAttribute )? ( boolAttribute )? ) ; - public final VelvetParser.attribute_return attribute() throws RecognitionException { - final VelvetParser.attribute_return retval = new VelvetParser.attribute_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token SEMI92 = null; - VelvetParser.intAttribute_return intAttribute88 = null; - - VelvetParser.floatAttribute_return floatAttribute89 = null; - - VelvetParser.stringAttribute_return stringAttribute90 = null; - - VelvetParser.boolAttribute_return boolAttribute91 = null; - - final Tree SEMI92_tree = null; - final RewriteRuleTokenStream stream_SEMI = new RewriteRuleTokenStream(adaptor, "token SEMI"); - final RewriteRuleSubtreeStream stream_intAttribute = new RewriteRuleSubtreeStream(adaptor, "rule intAttribute"); - final RewriteRuleSubtreeStream stream_stringAttribute = new RewriteRuleSubtreeStream(adaptor, "rule stringAttribute"); - final RewriteRuleSubtreeStream stream_floatAttribute = new RewriteRuleSubtreeStream(adaptor, "rule floatAttribute"); - final RewriteRuleSubtreeStream stream_boolAttribute = new RewriteRuleSubtreeStream(adaptor, "rule boolAttribute"); - try { - // Velvet.g:189:2: ( ( intAttribute | floatAttribute | stringAttribute | boolAttribute ) SEMI -> ^( ATTR ( intAttribute )? ( floatAttribute )? ( - // stringAttribute )? ( boolAttribute )? ) ) - // Velvet.g:189:4: ( intAttribute | floatAttribute | stringAttribute | boolAttribute ) SEMI - { - // Velvet.g:189:4: ( intAttribute | floatAttribute | stringAttribute | boolAttribute ) - int alt24 = 4; - switch (input.LA(1)) { - case VAR_INT: { - alt24 = 1; - } - break; - case VAR_FLOAT: { - alt24 = 2; - } - break; - case VAR_STRING: { - alt24 = 3; - } - break; - case VAR_BOOL: { - alt24 = 4; - } - break; - default: - final NoViableAltException nvae = new NoViableAltException("", 24, 0, input); - - throw nvae; - - } - - switch (alt24) { - case 1: - // Velvet.g:189:5: intAttribute - { - pushFollow(FOLLOW_intAttribute_in_attribute1132); - intAttribute88 = intAttribute(); - - state._fsp--; - - stream_intAttribute.add(intAttribute88.getTree()); - - } - break; - case 2: - // Velvet.g:189:20: floatAttribute - { - pushFollow(FOLLOW_floatAttribute_in_attribute1136); - floatAttribute89 = floatAttribute(); - - state._fsp--; - - stream_floatAttribute.add(floatAttribute89.getTree()); - - } - break; - case 3: - // Velvet.g:189:37: stringAttribute - { - pushFollow(FOLLOW_stringAttribute_in_attribute1140); - stringAttribute90 = stringAttribute(); - - state._fsp--; - - stream_stringAttribute.add(stringAttribute90.getTree()); - - } - break; - case 4: - // Velvet.g:189:55: boolAttribute - { - pushFollow(FOLLOW_boolAttribute_in_attribute1144); - boolAttribute91 = boolAttribute(); - - state._fsp--; - - stream_boolAttribute.add(boolAttribute91.getTree()); - - } - break; - - } - - SEMI92 = (Token) match(input, SEMI, FOLLOW_SEMI_in_attribute1147); - stream_SEMI.add(SEMI92); - - // AST REWRITE - // elements: stringAttribute, floatAttribute, intAttribute, boolAttribute - // token labels: - // rule labels: retval - // token list labels: - // rule list labels: - // wildcard labels: - retval.tree = root_0; - final RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null); - - root_0 = (Tree) adaptor.nil(); - // 190:2: -> ^( ATTR ( intAttribute )? ( floatAttribute )? ( stringAttribute )? ( boolAttribute )? ) - { - // Velvet.g:190:5: ^( ATTR ( intAttribute )? ( floatAttribute )? ( stringAttribute )? ( boolAttribute )? ) - { - Tree root_1 = (Tree) adaptor.nil(); - root_1 = (Tree) adaptor.becomeRoot(adaptor.create(ATTR, "ATTR"), root_1); - - // Velvet.g:190:12: ( intAttribute )? - if (stream_intAttribute.hasNext()) { - adaptor.addChild(root_1, stream_intAttribute.nextTree()); - - } - stream_intAttribute.reset(); - - // Velvet.g:190:26: ( floatAttribute )? - if (stream_floatAttribute.hasNext()) { - adaptor.addChild(root_1, stream_floatAttribute.nextTree()); - - } - stream_floatAttribute.reset(); - - // Velvet.g:190:42: ( stringAttribute )? - if (stream_stringAttribute.hasNext()) { - adaptor.addChild(root_1, stream_stringAttribute.nextTree()); - - } - stream_stringAttribute.reset(); - - // Velvet.g:190:59: ( boolAttribute )? - if (stream_boolAttribute.hasNext()) { - adaptor.addChild(root_1, stream_boolAttribute.nextTree()); - - } - stream_boolAttribute.reset(); - - adaptor.addChild(root_0, root_1); - } - - } - - retval.tree = root_0; - - } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - - } - - finally { - // do for sure before leaving - } - return retval; - } - // $ANTLR end "attribute" - - public static class attributeConstraint_return extends ParserRuleReturnScope { - - Tree tree; - - @Override - public Object getTree() { - return tree; - } - }; - - // $ANTLR start "attributeConstraint" - // Velvet.g:193:1: attributeConstraint : attribConstraint -> ^( ACONSTR attribConstraint ) ; - public final VelvetParser.attributeConstraint_return attributeConstraint() throws RecognitionException { - final VelvetParser.attributeConstraint_return retval = new VelvetParser.attributeConstraint_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - VelvetParser.attribConstraint_return attribConstraint93 = null; - - final RewriteRuleSubtreeStream stream_attribConstraint = new RewriteRuleSubtreeStream(adaptor, "rule attribConstraint"); - try { - // Velvet.g:194:2: ( attribConstraint -> ^( ACONSTR attribConstraint ) ) - // Velvet.g:194:4: attribConstraint - { - pushFollow(FOLLOW_attribConstraint_in_attributeConstraint1178); - attribConstraint93 = attribConstraint(); - - state._fsp--; - - stream_attribConstraint.add(attribConstraint93.getTree()); - - // AST REWRITE - // elements: attribConstraint - // token labels: - // rule labels: retval - // token list labels: - // rule list labels: - // wildcard labels: - retval.tree = root_0; - final RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null); - - root_0 = (Tree) adaptor.nil(); - // 195:2: -> ^( ACONSTR attribConstraint ) - { - // Velvet.g:195:5: ^( ACONSTR attribConstraint ) - { - Tree root_1 = (Tree) adaptor.nil(); - root_1 = (Tree) adaptor.becomeRoot(adaptor.create(ACONSTR, "ACONSTR"), root_1); - - adaptor.addChild(root_1, stream_attribConstraint.nextTree()); - - adaptor.addChild(root_0, root_1); - } - - } - - retval.tree = root_0; - - } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - - } - - finally { - // do for sure before leaving - } - return retval; - } - // $ANTLR end "attributeConstraint" - - public static class attribConstraint_return extends ParserRuleReturnScope { - - Tree tree; - + @Override public int getRuleIndex() { return RULE_attribOperator; } @Override - public Object getTree() { - return tree; - } - }; - - // $ANTLR start "attribConstraint" - // Velvet.g:198:1: attribConstraint : attribNumInstance ( attribOperator attribNumInstance )* attribRelation attribNumInstance ( attribOperator - // attribNumInstance )* ; - public final VelvetParser.attribConstraint_return attribConstraint() throws RecognitionException { - final VelvetParser.attribConstraint_return retval = new VelvetParser.attribConstraint_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - VelvetParser.attribNumInstance_return attribNumInstance94 = null; - - VelvetParser.attribOperator_return attribOperator95 = null; - - VelvetParser.attribNumInstance_return attribNumInstance96 = null; - - VelvetParser.attribRelation_return attribRelation97 = null; - - VelvetParser.attribNumInstance_return attribNumInstance98 = null; - - VelvetParser.attribOperator_return attribOperator99 = null; - - VelvetParser.attribNumInstance_return attribNumInstance100 = null; - - try { - // Velvet.g:199:2: ( attribNumInstance ( attribOperator attribNumInstance )* attribRelation attribNumInstance ( attribOperator attribNumInstance )* - // ) - // Velvet.g:199:4: attribNumInstance ( attribOperator attribNumInstance )* attribRelation attribNumInstance ( attribOperator attribNumInstance )* - { - root_0 = (Tree) adaptor.nil(); - - pushFollow(FOLLOW_attribNumInstance_in_attribConstraint1198); - attribNumInstance94 = attribNumInstance(); - - state._fsp--; - - adaptor.addChild(root_0, attribNumInstance94.getTree()); - - // Velvet.g:199:22: ( attribOperator attribNumInstance )* - loop25: do { - int alt25 = 2; - final int LA25_0 = input.LA(1); - - if (((LA25_0 == MINUS) || (LA25_0 == PLUS))) { - alt25 = 1; - } - - switch (alt25) { - case 1: - // Velvet.g:199:23: attribOperator attribNumInstance - { - pushFollow(FOLLOW_attribOperator_in_attribConstraint1201); - attribOperator95 = attribOperator(); - - state._fsp--; - - adaptor.addChild(root_0, attribOperator95.getTree()); - - pushFollow(FOLLOW_attribNumInstance_in_attribConstraint1203); - attribNumInstance96 = attribNumInstance(); - - state._fsp--; - - adaptor.addChild(root_0, attribNumInstance96.getTree()); - - } - break; - - default: - break loop25; - } - } while (true); - - pushFollow(FOLLOW_attribRelation_in_attribConstraint1211); - attribRelation97 = attribRelation(); - - state._fsp--; - - adaptor.addChild(root_0, attribRelation97.getTree()); - - pushFollow(FOLLOW_attribNumInstance_in_attribConstraint1217); - attribNumInstance98 = attribNumInstance(); - - state._fsp--; - - adaptor.addChild(root_0, attribNumInstance98.getTree()); - - // Velvet.g:201:22: ( attribOperator attribNumInstance )* - loop26: do { - int alt26 = 2; - final int LA26_0 = input.LA(1); - - if (((LA26_0 == MINUS) || (LA26_0 == PLUS))) { - alt26 = 1; - } - - switch (alt26) { - case 1: - // Velvet.g:201:23: attribOperator attribNumInstance - { - pushFollow(FOLLOW_attribOperator_in_attribConstraint1220); - attribOperator99 = attribOperator(); - - state._fsp--; - - adaptor.addChild(root_0, attribOperator99.getTree()); - - pushFollow(FOLLOW_attribNumInstance_in_attribConstraint1222); - attribNumInstance100 = attribNumInstance(); - - state._fsp--; - - adaptor.addChild(root_0, attribNumInstance100.getTree()); - - } - break; - - default: - break loop26; - } - } while (true); - - } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - - } - - finally { - // do for sure before leaving - } - return retval; - } - // $ANTLR end "attribConstraint" - - public static class attribOperator_return extends ParserRuleReturnScope { - - Tree tree; - + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterAttribOperator(this); + } @Override - public Object getTree() { - return tree; + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitAttribOperator(this); } - }; - - // $ANTLR start "attribOperator" - // Velvet.g:204:1: attribOperator : ( PLUS | MINUS ); - public final VelvetParser.attribOperator_return attribOperator() throws RecognitionException { - final VelvetParser.attribOperator_return retval = new VelvetParser.attribOperator_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token set101 = null; - - final Tree set101_tree = null; + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitAttribOperator(this); + else return visitor.visitChildren(this); + } + } + public final AttribOperatorContext attribOperator() throws RecognitionException { + AttribOperatorContext _localctx = new AttribOperatorContext(_ctx, getState()); + enterRule(_localctx, 44, RULE_attribOperator); + int _la; try { - // Velvet.g:205:2: ( PLUS | MINUS ) - // Velvet.g: + enterOuterAlt(_localctx, 1); { - root_0 = (Tree) adaptor.nil(); - - set101 = input.LT(1); - - if ((input.LA(1) == MINUS) || (input.LA(1) == PLUS)) { - input.consume(); - adaptor.addChild(root_0, adaptor.create(set101)); - state.errorRecovery = false; - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - throw mse; - } - + setState(257); + _la = _input.LA(1); + if ( !(_la==PLUS || _la==MINUS) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "attribOperator" - - public static class attribNumInstance_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class AttribNumInstanceContext extends ParserRuleContext { + public TerminalNode INT() { return getToken(VelvetParser.INT, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public AttribNumInstanceContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_attribNumInstance; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterAttribNumInstance(this); } - }; - - // $ANTLR start "attribNumInstance" - // Velvet.g:209:1: attribNumInstance : ( INT | name ); - public final VelvetParser.attribNumInstance_return attribNumInstance() throws RecognitionException { - final VelvetParser.attribNumInstance_return retval = new VelvetParser.attribNumInstance_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token INT102 = null; - VelvetParser.name_return name103 = null; - - Tree INT102_tree = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitAttribNumInstance(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitAttribNumInstance(this); + else return visitor.visitChildren(this); + } + } + public final AttribNumInstanceContext attribNumInstance() throws RecognitionException { + AttribNumInstanceContext _localctx = new AttribNumInstanceContext(_ctx, getState()); + enterRule(_localctx, 46, RULE_attribNumInstance); try { - // Velvet.g:210:2: ( INT | name ) - int alt27 = 2; - final int LA27_0 = input.LA(1); - - if ((LA27_0 == INT)) { - alt27 = 1; - } else if ((((LA27_0 >= ID) && (LA27_0 <= IDPath)))) { - alt27 = 2; - } else { - final NoViableAltException nvae = new NoViableAltException("", 27, 0, input); - - throw nvae; - - } - switch (alt27) { - case 1: - // Velvet.g:210:4: INT - { - root_0 = (Tree) adaptor.nil(); - - INT102 = (Token) match(input, INT, FOLLOW_INT_in_attribNumInstance1254); - INT102_tree = (Tree) adaptor.create(INT102); - adaptor.addChild(root_0, INT102_tree); - - } + setState(261); + _errHandler.sync(this); + switch (_input.LA(1)) { + case INT: + enterOuterAlt(_localctx, 1); + { + setState(259); + match(INT); + } break; - case 2: - // Velvet.g:212:4: name - { - root_0 = (Tree) adaptor.nil(); - - pushFollow(FOLLOW_name_in_attribNumInstance1261); - name103 = name(); - - state._fsp--; - - adaptor.addChild(root_0, name103.getTree()); - - } + case ID: + case IDPath: + enterOuterAlt(_localctx, 2); + { + setState(260); + name(); + } break; - + default: + throw new NoViableAltException(this); } - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "attribNumInstance" - - public static class intAttribute_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class IntAttributeContext extends ParserRuleContext { + public TerminalNode VAR_INT() { return getToken(VelvetParser.VAR_INT, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public TerminalNode EQ() { return getToken(VelvetParser.EQ, 0); } + public TerminalNode INT() { return getToken(VelvetParser.INT, 0); } + public IntAttributeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_intAttribute; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterIntAttribute(this); } - }; - - // $ANTLR start "intAttribute" - // Velvet.g:215:1: intAttribute : VAR_INT ! name ( EQ ! INT )? ; - public final VelvetParser.intAttribute_return intAttribute() throws RecognitionException { - final VelvetParser.intAttribute_return retval = new VelvetParser.intAttribute_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token VAR_INT104 = null; - Token EQ106 = null; - Token INT107 = null; - VelvetParser.name_return name105 = null; - - final Tree VAR_INT104_tree = null; - final Tree EQ106_tree = null; - Tree INT107_tree = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitIntAttribute(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitIntAttribute(this); + else return visitor.visitChildren(this); + } + } + public final IntAttributeContext intAttribute() throws RecognitionException { + IntAttributeContext _localctx = new IntAttributeContext(_ctx, getState()); + enterRule(_localctx, 48, RULE_intAttribute); + int _la; try { - // Velvet.g:215:13: ( VAR_INT ! name ( EQ ! INT )? ) - // Velvet.g:215:16: VAR_INT ! name ( EQ ! INT )? + enterOuterAlt(_localctx, 1); { - root_0 = (Tree) adaptor.nil(); - - VAR_INT104 = (Token) match(input, VAR_INT, FOLLOW_VAR_INT_in_intAttribute1271); - - pushFollow(FOLLOW_name_in_intAttribute1274); - name105 = name(); - - state._fsp--; - - adaptor.addChild(root_0, name105.getTree()); - - // Velvet.g:215:30: ( EQ ! INT )? - int alt28 = 2; - final int LA28_0 = input.LA(1); - - if ((LA28_0 == EQ)) { - alt28 = 1; - } - switch (alt28) { - case 1: - // Velvet.g:215:31: EQ ! INT + setState(263); + match(VAR_INT); + setState(264); + name(); + setState(267); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EQ) { { - EQ106 = (Token) match(input, EQ, FOLLOW_EQ_in_intAttribute1277); - - INT107 = (Token) match(input, INT, FOLLOW_INT_in_intAttribute1280); - INT107_tree = (Tree) adaptor.create(INT107); - adaptor.addChild(root_0, INT107_tree); - - } - break; - + setState(265); + match(EQ); + setState(266); + match(INT); } - } - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); } - finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "intAttribute" - - public static class floatAttribute_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class FloatAttributeContext extends ParserRuleContext { + public TerminalNode VAR_FLOAT() { return getToken(VelvetParser.VAR_FLOAT, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public TerminalNode EQ() { return getToken(VelvetParser.EQ, 0); } + public TerminalNode FLOAT() { return getToken(VelvetParser.FLOAT, 0); } + public FloatAttributeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_floatAttribute; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterFloatAttribute(this); } - }; - - // $ANTLR start "floatAttribute" - // Velvet.g:216:1: floatAttribute : VAR_FLOAT ! name ( EQ ! FLOAT )? ; - public final VelvetParser.floatAttribute_return floatAttribute() throws RecognitionException { - final VelvetParser.floatAttribute_return retval = new VelvetParser.floatAttribute_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token VAR_FLOAT108 = null; - Token EQ110 = null; - Token FLOAT111 = null; - VelvetParser.name_return name109 = null; - - final Tree VAR_FLOAT108_tree = null; - final Tree EQ110_tree = null; - Tree FLOAT111_tree = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitFloatAttribute(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitFloatAttribute(this); + else return visitor.visitChildren(this); + } + } + public final FloatAttributeContext floatAttribute() throws RecognitionException { + FloatAttributeContext _localctx = new FloatAttributeContext(_ctx, getState()); + enterRule(_localctx, 50, RULE_floatAttribute); + int _la; try { - // Velvet.g:216:15: ( VAR_FLOAT ! name ( EQ ! FLOAT )? ) - // Velvet.g:216:18: VAR_FLOAT ! name ( EQ ! FLOAT )? + enterOuterAlt(_localctx, 1); { - root_0 = (Tree) adaptor.nil(); - - VAR_FLOAT108 = (Token) match(input, VAR_FLOAT, FOLLOW_VAR_FLOAT_in_floatAttribute1289); - - pushFollow(FOLLOW_name_in_floatAttribute1292); - name109 = name(); - - state._fsp--; - - adaptor.addChild(root_0, name109.getTree()); - - // Velvet.g:216:34: ( EQ ! FLOAT )? - int alt29 = 2; - final int LA29_0 = input.LA(1); - - if ((LA29_0 == EQ)) { - alt29 = 1; - } - switch (alt29) { - case 1: - // Velvet.g:216:35: EQ ! FLOAT + setState(269); + match(VAR_FLOAT); + setState(270); + name(); + setState(273); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EQ) { { - EQ110 = (Token) match(input, EQ, FOLLOW_EQ_in_floatAttribute1295); - - FLOAT111 = (Token) match(input, FLOAT, FOLLOW_FLOAT_in_floatAttribute1298); - FLOAT111_tree = (Tree) adaptor.create(FLOAT111); - adaptor.addChild(root_0, FLOAT111_tree); - - } - break; - + setState(271); + match(EQ); + setState(272); + match(FLOAT); } - } - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); } - finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "floatAttribute" - - public static class stringAttribute_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class StringAttributeContext extends ParserRuleContext { + public TerminalNode VAR_STRING() { return getToken(VelvetParser.VAR_STRING, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public TerminalNode EQ() { return getToken(VelvetParser.EQ, 0); } + public TerminalNode STRING() { return getToken(VelvetParser.STRING, 0); } + public StringAttributeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_stringAttribute; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterStringAttribute(this); } - }; - - // $ANTLR start "stringAttribute" - // Velvet.g:217:1: stringAttribute : VAR_STRING ! name ( EQ ! STRING )? ; - public final VelvetParser.stringAttribute_return stringAttribute() throws RecognitionException { - final VelvetParser.stringAttribute_return retval = new VelvetParser.stringAttribute_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token VAR_STRING112 = null; - Token EQ114 = null; - Token STRING115 = null; - VelvetParser.name_return name113 = null; - - final Tree VAR_STRING112_tree = null; - final Tree EQ114_tree = null; - Tree STRING115_tree = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitStringAttribute(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitStringAttribute(this); + else return visitor.visitChildren(this); + } + } + public final StringAttributeContext stringAttribute() throws RecognitionException { + StringAttributeContext _localctx = new StringAttributeContext(_ctx, getState()); + enterRule(_localctx, 52, RULE_stringAttribute); + int _la; try { - // Velvet.g:217:16: ( VAR_STRING ! name ( EQ ! STRING )? ) - // Velvet.g:217:18: VAR_STRING ! name ( EQ ! STRING )? + enterOuterAlt(_localctx, 1); { - root_0 = (Tree) adaptor.nil(); - - VAR_STRING112 = (Token) match(input, VAR_STRING, FOLLOW_VAR_STRING_in_stringAttribute1306); - - pushFollow(FOLLOW_name_in_stringAttribute1309); - name113 = name(); - - state._fsp--; - - adaptor.addChild(root_0, name113.getTree()); - - // Velvet.g:217:35: ( EQ ! STRING )? - int alt30 = 2; - final int LA30_0 = input.LA(1); - - if ((LA30_0 == EQ)) { - alt30 = 1; - } - switch (alt30) { - case 1: - // Velvet.g:217:36: EQ ! STRING + setState(275); + match(VAR_STRING); + setState(276); + name(); + setState(279); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EQ) { { - EQ114 = (Token) match(input, EQ, FOLLOW_EQ_in_stringAttribute1312); - - STRING115 = (Token) match(input, STRING, FOLLOW_STRING_in_stringAttribute1315); - STRING115_tree = (Tree) adaptor.create(STRING115); - adaptor.addChild(root_0, STRING115_tree); - + setState(277); + match(EQ); + setState(278); + match(STRING); } - break; - - } - } - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); } - finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "stringAttribute" - - public static class boolAttribute_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class BoolAttributeContext extends ParserRuleContext { + public TerminalNode VAR_BOOL() { return getToken(VelvetParser.VAR_BOOL, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public TerminalNode EQ() { return getToken(VelvetParser.EQ, 0); } + public TerminalNode BOOLEAN() { return getToken(VelvetParser.BOOLEAN, 0); } + public BoolAttributeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_boolAttribute; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterBoolAttribute(this); } - }; - - // $ANTLR start "boolAttribute" - // Velvet.g:218:1: boolAttribute : VAR_BOOL ! name ( EQ ! BOOLEAN )? ; - public final VelvetParser.boolAttribute_return boolAttribute() throws RecognitionException { - final VelvetParser.boolAttribute_return retval = new VelvetParser.boolAttribute_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token VAR_BOOL116 = null; - Token EQ118 = null; - Token BOOLEAN119 = null; - VelvetParser.name_return name117 = null; - - final Tree VAR_BOOL116_tree = null; - final Tree EQ118_tree = null; - Tree BOOLEAN119_tree = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitBoolAttribute(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitBoolAttribute(this); + else return visitor.visitChildren(this); + } + } + public final BoolAttributeContext boolAttribute() throws RecognitionException { + BoolAttributeContext _localctx = new BoolAttributeContext(_ctx, getState()); + enterRule(_localctx, 54, RULE_boolAttribute); + int _la; try { - // Velvet.g:218:14: ( VAR_BOOL ! name ( EQ ! BOOLEAN )? ) - // Velvet.g:218:17: VAR_BOOL ! name ( EQ ! BOOLEAN )? + enterOuterAlt(_localctx, 1); { - root_0 = (Tree) adaptor.nil(); - - VAR_BOOL116 = (Token) match(input, VAR_BOOL, FOLLOW_VAR_BOOL_in_boolAttribute1324); - - pushFollow(FOLLOW_name_in_boolAttribute1327); - name117 = name(); - - state._fsp--; - - adaptor.addChild(root_0, name117.getTree()); - - // Velvet.g:218:32: ( EQ ! BOOLEAN )? - int alt31 = 2; - final int LA31_0 = input.LA(1); - - if ((LA31_0 == EQ)) { - alt31 = 1; - } - switch (alt31) { - case 1: - // Velvet.g:218:33: EQ ! BOOLEAN + setState(281); + match(VAR_BOOL); + setState(282); + name(); + setState(285); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EQ) { { - EQ118 = (Token) match(input, EQ, FOLLOW_EQ_in_boolAttribute1330); - - BOOLEAN119 = (Token) match(input, BOOLEAN, FOLLOW_BOOLEAN_in_boolAttribute1333); - BOOLEAN119_tree = (Tree) adaptor.create(BOOLEAN119); - adaptor.addChild(root_0, BOOLEAN119_tree); - - } - break; - + setState(283); + match(EQ); + setState(284); + match(BOOLEAN); } - } - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); } - finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "boolAttribute" - - public static class unaryOp_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class UnaryOpContext extends ParserRuleContext { + public TerminalNode OP_NOT() { return getToken(VelvetParser.OP_NOT, 0); } + public UnaryOpContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_unaryOp; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterUnaryOp(this); } - }; - - // $ANTLR start "unaryOp" - // Velvet.g:220:1: unaryOp : OP_NOT ; - public final VelvetParser.unaryOp_return unaryOp() throws RecognitionException { - final VelvetParser.unaryOp_return retval = new VelvetParser.unaryOp_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token OP_NOT120 = null; - - Tree OP_NOT120_tree = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitUnaryOp(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitUnaryOp(this); + else return visitor.visitChildren(this); + } + } + public final UnaryOpContext unaryOp() throws RecognitionException { + UnaryOpContext _localctx = new UnaryOpContext(_ctx, getState()); + enterRule(_localctx, 56, RULE_unaryOp); try { - // Velvet.g:221:2: ( OP_NOT ) - // Velvet.g:221:4: OP_NOT + enterOuterAlt(_localctx, 1); { - root_0 = (Tree) adaptor.nil(); - - OP_NOT120 = (Token) match(input, OP_NOT, FOLLOW_OP_NOT_in_unaryOp1345); - OP_NOT120_tree = (Tree) adaptor.create(OP_NOT120); - adaptor.addChild(root_0, OP_NOT120_tree); - + setState(287); + match(OP_NOT); } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "unaryOp" - - public static class binaryOp_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class BinaryOpContext extends ParserRuleContext { + public TerminalNode OP_AND() { return getToken(VelvetParser.OP_AND, 0); } + public TerminalNode OP_OR() { return getToken(VelvetParser.OP_OR, 0); } + public TerminalNode OP_XOR() { return getToken(VelvetParser.OP_XOR, 0); } + public TerminalNode OP_IMPLIES() { return getToken(VelvetParser.OP_IMPLIES, 0); } + public TerminalNode OP_EQUIVALENT() { return getToken(VelvetParser.OP_EQUIVALENT, 0); } + public BinaryOpContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_binaryOp; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterBinaryOp(this); } - }; - - // $ANTLR start "binaryOp" - // Velvet.g:224:1: binaryOp : ( OP_AND | OP_OR | OP_XOR | OP_IMPLIES | OP_EQUIVALENT ); - public final VelvetParser.binaryOp_return binaryOp() throws RecognitionException { - final VelvetParser.binaryOp_return retval = new VelvetParser.binaryOp_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token set121 = null; - - final Tree set121_tree = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitBinaryOp(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitBinaryOp(this); + else return visitor.visitChildren(this); + } + } + public final BinaryOpContext binaryOp() throws RecognitionException { + BinaryOpContext _localctx = new BinaryOpContext(_ctx, getState()); + enterRule(_localctx, 58, RULE_binaryOp); + int _la; try { - // Velvet.g:225:2: ( OP_AND | OP_OR | OP_XOR | OP_IMPLIES | OP_EQUIVALENT ) - // Velvet.g: + enterOuterAlt(_localctx, 1); { - root_0 = (Tree) adaptor.nil(); - - set121 = input.LT(1); - - if (((input.LA(1) >= OP_AND) && (input.LA(1) <= OP_IMPLIES)) || ((input.LA(1) >= OP_OR) && (input.LA(1) <= OP_XOR))) { - input.consume(); - adaptor.addChild(root_0, adaptor.create(set121)); - state.errorRecovery = false; - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - throw mse; - } - + setState(289); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 16642998272L) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "binaryOp" - - public static class attribRelation_return extends ParserRuleReturnScope { - - Tree tree; + @SuppressWarnings("CheckReturnValue") + public static class AttribRelationContext extends ParserRuleContext { + public TerminalNode ATTR_OP_EQUALS() { return getToken(VelvetParser.ATTR_OP_EQUALS, 0); } + public TerminalNode ATTR_OP_GREATER_EQ() { return getToken(VelvetParser.ATTR_OP_GREATER_EQ, 0); } + public TerminalNode ATTR_OP_LESS_EQ() { return getToken(VelvetParser.ATTR_OP_LESS_EQ, 0); } + public AttribRelationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_attribRelation; } @Override - public Object getTree() { - return tree; + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).enterAttribRelation(this); } - }; - - // $ANTLR start "attribRelation" - // Velvet.g:232:1: attribRelation : ( ATTR_OP_EQUALS | ATTR_OP_GREATER_EQ | ATTR_OP_LESS_EQ ); - public final VelvetParser.attribRelation_return attribRelation() throws RecognitionException { - final VelvetParser.attribRelation_return retval = new VelvetParser.attribRelation_return(); - retval.start = input.LT(1); - - Tree root_0 = null; - - Token set122 = null; - - final Tree set122_tree = null; + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof VelvetListener ) ((VelvetListener)listener).exitAttribRelation(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof VelvetVisitor ) return ((VelvetVisitor)visitor).visitAttribRelation(this); + else return visitor.visitChildren(this); + } + } + public final AttribRelationContext attribRelation() throws RecognitionException { + AttribRelationContext _localctx = new AttribRelationContext(_ctx, getState()); + enterRule(_localctx, 60, RULE_attribRelation); + int _la; try { - // Velvet.g:233:2: ( ATTR_OP_EQUALS | ATTR_OP_GREATER_EQ | ATTR_OP_LESS_EQ ) - // Velvet.g: + enterOuterAlt(_localctx, 1); { - root_0 = (Tree) adaptor.nil(); - - set122 = input.LT(1); - - if ((input.LA(1) == ATTR_OP_EQUALS) || (input.LA(1) == ATTR_OP_GREATER_EQ) || (input.LA(1) == ATTR_OP_LESS_EQ)) { - input.consume(); - adaptor.addChild(root_0, adaptor.create(set122)); - state.errorRecovery = false; - } else { - final MismatchedSetException mse = new MismatchedSetException(null, input); - throw mse; - } - + setState(291); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 841813590016L) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } } - - retval.stop = input.LT(-1); - - retval.tree = (Tree) adaptor.rulePostProcessing(root_0); - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); - - } catch (final RecognitionException re) { - reportError(re); - recover(input, re); - retval.tree = (Tree) adaptor.errorNode(input, retval.start, input.LT(-1), re); - } - + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } finally { - // do for sure before leaving + exitRule(); } - return retval; + return _localctx; } - // $ANTLR end "attribRelation" - - // Delegated rules - - protected DFA5 dfa5 = new DFA5(this); - static final String DFA5_eotS = "\22\uffff"; - static final String DFA5_eofS = "\1\3\5\uffff\1\12\1\15\10\uffff\1\12\1\15"; - static final String DFA5_minS = "\1\44\2\41\1\uffff\2\41\2\21\1\41\2\uffff\1\41\2\uffff\2\41\2\21"; - static final String DFA5_maxS = "\1\67\2\41\1\uffff\2\42\2\67\1\41\2\uffff\1\41\2\uffff\2\42\2\67"; - static final String DFA5_acceptS = "\3\uffff\1\5\5\uffff\1\1\1\4\1\uffff\1\2\1\3\4\uffff"; - static final String DFA5_specialS = "\22\uffff}>"; - static final String[] DFA5_transitionS = - { "\1\1\1\2\21\uffff\1\3", "\1\4", "\1\5", "", "\2\6", "\2\7", "\1\10\23\uffff\1\11\21\uffff\1\12", "\1\13\22\uffff\1\14\22\uffff\1\15", "\1\16", "", - "", "\1\17", "", "", "\2\20", "\2\21", "\1\10\23\uffff\1\11\21\uffff\1\12", "\1\13\22\uffff\1\14\22\uffff\1\15" }; - - static final short[] DFA5_eot = DFA.unpackEncodedString(DFA5_eotS); - static final short[] DFA5_eof = DFA.unpackEncodedString(DFA5_eofS); - static final char[] DFA5_min = DFA.unpackEncodedStringToUnsignedChars(DFA5_minS); - static final char[] DFA5_max = DFA.unpackEncodedStringToUnsignedChars(DFA5_maxS); - static final short[] DFA5_accept = DFA.unpackEncodedString(DFA5_acceptS); - static final short[] DFA5_special = DFA.unpackEncodedString(DFA5_specialS); - static final short[][] DFA5_transition; + public static final String _serializedATN = + "\u0004\u00019\u0126\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+ + "\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004\u0007\u0004\u0002"+ + "\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007\u0007\u0007\u0002"+ + "\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b\u0007\u000b\u0002"+ + "\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002\u000f\u0007\u000f"+ + "\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002\u0012\u0007\u0012"+ + "\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002\u0015\u0007\u0015"+ + "\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002\u0018\u0007\u0018"+ + "\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0002\u001b\u0007\u001b"+ + "\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d\u0002\u001e\u0007\u001e"+ + "\u0001\u0000\u0003\u0000@\b\u0000\u0001\u0000\u0001\u0000\u0003\u0000"+ + "D\b\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0001\u0001\u0001"+ + "\u0001\u0001\u0004\u0001L\b\u0001\u000b\u0001\f\u0001M\u0001\u0002\u0001"+ + "\u0002\u0001\u0002\u0001\u0002\u0003\u0002T\b\u0002\u0001\u0002\u0001"+ + "\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001"+ + "\u0002\u0003\u0002^\b\u0002\u0001\u0002\u0003\u0002a\b\u0002\u0001\u0003"+ + "\u0001\u0003\u0001\u0003\u0001\u0003\u0003\u0003g\b\u0003\u0001\u0003"+ + "\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0005\u0004n\b\u0004"+ + "\n\u0004\f\u0004q\t\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005"+ + "\u0001\u0005\u0001\u0005\u0005\u0005y\b\u0005\n\u0005\f\u0005|\t\u0005"+ + "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+ + "\u0005\u0006\u0084\b\u0006\n\u0006\f\u0006\u0087\t\u0006\u0001\u0007\u0001"+ + "\u0007\u0001\b\u0001\b\u0001\b\u0001\b\u0001\t\u0005\t\u0090\b\t\n\t\f"+ + "\t\u0093\t\t\u0001\t\u0001\t\u0005\t\u0097\b\t\n\t\f\t\u009a\t\t\u0001"+ + "\t\u0001\t\u0001\t\u0005\t\u009f\b\t\n\t\f\t\u00a2\t\t\u0003\t\u00a4\b"+ + "\t\u0001\n\u0001\n\u0001\n\u0001\n\u0003\n\u00aa\b\n\u0001\u000b\u0001"+ + "\u000b\u0001\u000b\u0001\u000b\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f"+ + "\u0001\f\u0003\f\u00b6\b\f\u0001\f\u0001\f\u0001\f\u0001\f\u0003\f\u00bc"+ + "\b\f\u0001\r\u0001\r\u0001\r\u0004\r\u00c1\b\r\u000b\r\f\r\u00c2\u0001"+ + "\r\u0001\r\u0001\u000e\u0001\u000e\u0001\u000f\u0001\u000f\u0001\u000f"+ + "\u0001\u000f\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010"+ + "\u0001\u0010\u0003\u0010\u00d3\b\u0010\u0001\u0010\u0001\u0010\u0001\u0011"+ + "\u0001\u0011\u0001\u0011\u0001\u0011\u0005\u0011\u00db\b\u0011\n\u0011"+ + "\f\u0011\u00de\t\u0011\u0001\u0012\u0005\u0012\u00e1\b\u0012\n\u0012\f"+ + "\u0012\u00e4\t\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001"+ + "\u0012\u0003\u0012\u00eb\b\u0012\u0001\u0013\u0001\u0013\u0001\u0013\u0001"+ + "\u0013\u0003\u0013\u00f1\b\u0013\u0001\u0013\u0001\u0013\u0001\u0014\u0001"+ + "\u0014\u0001\u0014\u0001\u0014\u0001\u0015\u0001\u0015\u0001\u0015\u0001"+ + "\u0015\u0005\u0015\u00fd\b\u0015\n\u0015\f\u0015\u0100\t\u0015\u0001\u0016"+ + "\u0001\u0016\u0001\u0017\u0001\u0017\u0003\u0017\u0106\b\u0017\u0001\u0018"+ + "\u0001\u0018\u0001\u0018\u0001\u0018\u0003\u0018\u010c\b\u0018\u0001\u0019"+ + "\u0001\u0019\u0001\u0019\u0001\u0019\u0003\u0019\u0112\b\u0019\u0001\u001a"+ + "\u0001\u001a\u0001\u001a\u0001\u001a\u0003\u001a\u0118\b\u001a\u0001\u001b"+ + "\u0001\u001b\u0001\u001b\u0001\u001b\u0003\u001b\u011e\b\u001b\u0001\u001c"+ + "\u0001\u001c\u0001\u001d\u0001\u001d\u0001\u001e\u0001\u001e\u0001\u001e"+ + "\u0000\u0000\u001f\u0000\u0002\u0004\u0006\b\n\f\u000e\u0010\u0012\u0014"+ + "\u0016\u0018\u001a\u001c\u001e \"$&(*,.02468:<\u0000\u0005\u0001\u0000"+ + "23\u0001\u0000\u0004\u0005\u0001\u0000\u001a\u001b\u0001\u0000\u001d!"+ + "\u0002\u0000\"\"&\'\u012f\u0000?\u0001\u0000\u0000\u0000\u0002K\u0001"+ + "\u0000\u0000\u0000\u0004O\u0001\u0000\u0000\u0000\u0006b\u0001\u0000\u0000"+ + "\u0000\bj\u0001\u0000\u0000\u0000\nr\u0001\u0000\u0000\u0000\f}\u0001"+ + "\u0000\u0000\u0000\u000e\u0088\u0001\u0000\u0000\u0000\u0010\u008a\u0001"+ + "\u0000\u0000\u0000\u0012\u0091\u0001\u0000\u0000\u0000\u0014\u00a9\u0001"+ + "\u0000\u0000\u0000\u0016\u00ab\u0001\u0000\u0000\u0000\u0018\u00b5\u0001"+ + "\u0000\u0000\u0000\u001a\u00bd\u0001\u0000\u0000\u0000\u001c\u00c6\u0001"+ + "\u0000\u0000\u0000\u001e\u00c8\u0001\u0000\u0000\u0000 \u00cc\u0001\u0000"+ + "\u0000\u0000\"\u00d6\u0001\u0000\u0000\u0000$\u00e2\u0001\u0000\u0000"+ + "\u0000&\u00f0\u0001\u0000\u0000\u0000(\u00f4\u0001\u0000\u0000\u0000*"+ + "\u00f8\u0001\u0000\u0000\u0000,\u0101\u0001\u0000\u0000\u0000.\u0105\u0001"+ + "\u0000\u0000\u00000\u0107\u0001\u0000\u0000\u00002\u010d\u0001\u0000\u0000"+ + "\u00004\u0113\u0001\u0000\u0000\u00006\u0119\u0001\u0000\u0000\u00008"+ + "\u011f\u0001\u0000\u0000\u0000:\u0121\u0001\u0000\u0000\u0000<\u0123\u0001"+ + "\u0000\u0000\u0000>@\u0003\u0002\u0001\u0000?>\u0001\u0000\u0000\u0000"+ + "?@\u0001\u0000\u0000\u0000@C\u0001\u0000\u0000\u0000AD\u0003\u0004\u0002"+ + "\u0000BD\u0003\u0006\u0003\u0000CA\u0001\u0000\u0000\u0000CB\u0001\u0000"+ + "\u0000\u0000DE\u0001\u0000\u0000\u0000EF\u0005\u0000\u0000\u0001F\u0001"+ + "\u0001\u0000\u0000\u0000GH\u0005\u0001\u0000\u0000HI\u0003\u000e\u0007"+ + "\u0000IJ\u0005\u0012\u0000\u0000JL\u0001\u0000\u0000\u0000KG\u0001\u0000"+ + "\u0000\u0000LM\u0001\u0000\u0000\u0000MK\u0001\u0000\u0000\u0000MN\u0001"+ + "\u0000\u0000\u0000N\u0003\u0001\u0000\u0000\u0000OP\u0005\u0006\u0000"+ + "\u0000PS\u00052\u0000\u0000QR\u0005\u0019\u0000\u0000RT\u0003\b\u0004"+ + "\u0000SQ\u0001\u0000\u0000\u0000ST\u0001\u0000\u0000\u0000T]\u0001\u0000"+ + "\u0000\u0000UV\u0003\n\u0005\u0000VW\u0003\f\u0006\u0000W^\u0001\u0000"+ + "\u0000\u0000XY\u0003\f\u0006\u0000YZ\u0003\n\u0005\u0000Z^\u0001\u0000"+ + "\u0000\u0000[^\u0003\f\u0006\u0000\\^\u0003\n\u0005\u0000]U\u0001\u0000"+ + "\u0000\u0000]X\u0001\u0000\u0000\u0000][\u0001\u0000\u0000\u0000]\\\u0001"+ + "\u0000\u0000\u0000]^\u0001\u0000\u0000\u0000^`\u0001\u0000\u0000\u0000"+ + "_a\u0003\u0010\b\u0000`_\u0001\u0000\u0000\u0000`a\u0001\u0000\u0000\u0000"+ + "a\u0005\u0001\u0000\u0000\u0000bc\u0005\u0007\u0000\u0000cf\u00052\u0000"+ + "\u0000de\u0005\u0019\u0000\u0000eg\u0003\b\u0004\u0000fd\u0001\u0000\u0000"+ + "\u0000fg\u0001\u0000\u0000\u0000gh\u0001\u0000\u0000\u0000hi\u0003\u0010"+ + "\b\u0000i\u0007\u0001\u0000\u0000\u0000jo\u00052\u0000\u0000kl\u0005\u0018"+ + "\u0000\u0000ln\u00052\u0000\u0000mk\u0001\u0000\u0000\u0000nq\u0001\u0000"+ + "\u0000\u0000om\u0001\u0000\u0000\u0000op\u0001\u0000\u0000\u0000p\t\u0001"+ + "\u0000\u0000\u0000qo\u0001\u0000\u0000\u0000rs\u0005\u000b\u0000\u0000"+ + "st\u00052\u0000\u0000tz\u0003\u000e\u0007\u0000uv\u0005\u0018\u0000\u0000"+ + "vw\u00052\u0000\u0000wy\u0003\u000e\u0007\u0000xu\u0001\u0000\u0000\u0000"+ + "y|\u0001\u0000\u0000\u0000zx\u0001\u0000\u0000\u0000z{\u0001\u0000\u0000"+ + "\u0000{\u000b\u0001\u0000\u0000\u0000|z\u0001\u0000\u0000\u0000}~\u0005"+ + "\f\u0000\u0000~\u007f\u00052\u0000\u0000\u007f\u0085\u0003\u000e\u0007"+ + "\u0000\u0080\u0081\u0005\u0018\u0000\u0000\u0081\u0082\u00052\u0000\u0000"+ + "\u0082\u0084\u0003\u000e\u0007\u0000\u0083\u0080\u0001\u0000\u0000\u0000"+ + "\u0084\u0087\u0001\u0000\u0000\u0000\u0085\u0083\u0001\u0000\u0000\u0000"+ + "\u0085\u0086\u0001\u0000\u0000\u0000\u0086\r\u0001\u0000\u0000\u0000\u0087"+ + "\u0085\u0001\u0000\u0000\u0000\u0088\u0089\u0007\u0000\u0000\u0000\u0089"+ + "\u000f\u0001\u0000\u0000\u0000\u008a\u008b\u0005\u0013\u0000\u0000\u008b"+ + "\u008c\u0003\u0012\t\u0000\u008c\u008d\u0005\u0014\u0000\u0000\u008d\u0011"+ + "\u0001\u0000\u0000\u0000\u008e\u0090\u0003\u0014\n\u0000\u008f\u008e\u0001"+ + "\u0000\u0000\u0000\u0090\u0093\u0001\u0000\u0000\u0000\u0091\u008f\u0001"+ + "\u0000\u0000\u0000\u0091\u0092\u0001\u0000\u0000\u0000\u0092\u00a3\u0001"+ + "\u0000\u0000\u0000\u0093\u0091\u0001\u0000\u0000\u0000\u0094\u0098\u0003"+ + "\u001a\r\u0000\u0095\u0097\u0003\u0014\n\u0000\u0096\u0095\u0001\u0000"+ + "\u0000\u0000\u0097\u009a\u0001\u0000\u0000\u0000\u0098\u0096\u0001\u0000"+ + "\u0000\u0000\u0098\u0099\u0001\u0000\u0000\u0000\u0099\u00a4\u0001\u0000"+ + "\u0000\u0000\u009a\u0098\u0001\u0000\u0000\u0000\u009b\u00a0\u0003\u0018"+ + "\f\u0000\u009c\u009f\u0003\u0018\f\u0000\u009d\u009f\u0003\u0014\n\u0000"+ + "\u009e\u009c\u0001\u0000\u0000\u0000\u009e\u009d\u0001\u0000\u0000\u0000"+ + "\u009f\u00a2\u0001\u0000\u0000\u0000\u00a0\u009e\u0001\u0000\u0000\u0000"+ + "\u00a0\u00a1\u0001\u0000\u0000\u0000\u00a1\u00a4\u0001\u0000\u0000\u0000"+ + "\u00a2\u00a0\u0001\u0000\u0000\u0000\u00a3\u0094\u0001\u0000\u0000\u0000"+ + "\u00a3\u009b\u0001\u0000\u0000\u0000\u00a3\u00a4\u0001\u0000\u0000\u0000"+ + "\u00a4\u0013\u0001\u0000\u0000\u0000\u00a5\u00aa\u0003 \u0010\u0000\u00a6"+ + "\u00aa\u0003\u0016\u000b\u0000\u00a7\u00aa\u0003&\u0013\u0000\u00a8\u00aa"+ + "\u0003\u001e\u000f\u0000\u00a9\u00a5\u0001\u0000\u0000\u0000\u00a9\u00a6"+ + "\u0001\u0000\u0000\u0000\u00a9\u00a7\u0001\u0000\u0000\u0000\u00a9\u00a8"+ + "\u0001\u0000\u0000\u0000\u00aa\u0015\u0001\u0000\u0000\u0000\u00ab\u00ac"+ + "\u0005\n\u0000\u0000\u00ac\u00ad\u0003\u000e\u0007\u0000\u00ad\u00ae\u0005"+ + "\u0012\u0000\u0000\u00ae\u0017\u0001\u0000\u0000\u0000\u00af\u00b0\u0005"+ + "\u0002\u0000\u0000\u00b0\u00b6\u0005\u0003\u0000\u0000\u00b1\u00b2\u0005"+ + "\u0003\u0000\u0000\u00b2\u00b6\u0005\u0002\u0000\u0000\u00b3\u00b6\u0005"+ + "\u0002\u0000\u0000\u00b4\u00b6\u0005\u0003\u0000\u0000\u00b5\u00af\u0001"+ + "\u0000\u0000\u0000\u00b5\u00b1\u0001\u0000\u0000\u0000\u00b5\u00b3\u0001"+ + "\u0000\u0000\u0000\u00b5\u00b4\u0001\u0000\u0000\u0000\u00b5\u00b6\u0001"+ + "\u0000\u0000\u0000\u00b6\u00b7\u0001\u0000\u0000\u0000\u00b7\u00b8\u0005"+ + "\t\u0000\u0000\u00b8\u00bb\u0003\u000e\u0007\u0000\u00b9\u00bc\u0003\u0010"+ + "\b\u0000\u00ba\u00bc\u0005\u0012\u0000\u0000\u00bb\u00b9\u0001\u0000\u0000"+ + "\u0000\u00bb\u00ba\u0001\u0000\u0000\u0000\u00bc\u0019\u0001\u0000\u0000"+ + "\u0000\u00bd\u00be\u0003\u001c\u000e\u0000\u00be\u00c0\u0005\u0013\u0000"+ + "\u0000\u00bf\u00c1\u0003\u0018\f\u0000\u00c0\u00bf\u0001\u0000\u0000\u0000"+ + "\u00c1\u00c2\u0001\u0000\u0000\u0000\u00c2\u00c0\u0001\u0000\u0000\u0000"+ + "\u00c2\u00c3\u0001\u0000\u0000\u0000\u00c3\u00c4\u0001\u0000\u0000\u0000"+ + "\u00c4\u00c5\u0005\u0014\u0000\u0000\u00c5\u001b\u0001\u0000\u0000\u0000"+ + "\u00c6\u00c7\u0007\u0001\u0000\u0000\u00c7\u001d\u0001\u0000\u0000\u0000"+ + "\u00c8\u00c9\u0005\r\u0000\u0000\u00c9\u00ca\u00056\u0000\u0000\u00ca"+ + "\u00cb\u0005\u0012\u0000\u0000\u00cb\u001f\u0001\u0000\u0000\u0000\u00cc"+ + "\u00cd\u0005\b\u0000\u0000\u00cd\u00ce\u00052\u0000\u0000\u00ce\u00cf"+ + "\u0005\u0017\u0000\u0000\u00cf\u00d2\u0001\u0000\u0000\u0000\u00d0\u00d3"+ + "\u0003\"\u0011\u0000\u00d1\u00d3\u0003(\u0014\u0000\u00d2\u00d0\u0001"+ + "\u0000\u0000\u0000\u00d2\u00d1\u0001\u0000\u0000\u0000\u00d3\u00d4\u0001"+ + "\u0000\u0000\u0000\u00d4\u00d5\u0005\u0012\u0000\u0000\u00d5!\u0001\u0000"+ + "\u0000\u0000\u00d6\u00dc\u0003$\u0012\u0000\u00d7\u00d8\u0003:\u001d\u0000"+ + "\u00d8\u00d9\u0003$\u0012\u0000\u00d9\u00db\u0001\u0000\u0000\u0000\u00da"+ + "\u00d7\u0001\u0000\u0000\u0000\u00db\u00de\u0001\u0000\u0000\u0000\u00dc"+ + "\u00da\u0001\u0000\u0000\u0000\u00dc\u00dd\u0001\u0000\u0000\u0000\u00dd"+ + "#\u0001\u0000\u0000\u0000\u00de\u00dc\u0001\u0000\u0000\u0000\u00df\u00e1"+ + "\u00038\u001c\u0000\u00e0\u00df\u0001\u0000\u0000\u0000\u00e1\u00e4\u0001"+ + "\u0000\u0000\u0000\u00e2\u00e0\u0001\u0000\u0000\u0000\u00e2\u00e3\u0001"+ + "\u0000\u0000\u0000\u00e3\u00ea\u0001\u0000\u0000\u0000\u00e4\u00e2\u0001"+ + "\u0000\u0000\u0000\u00e5\u00e6\u0005\u0015\u0000\u0000\u00e6\u00e7\u0003"+ + "\"\u0011\u0000\u00e7\u00e8\u0005\u0016\u0000\u0000\u00e8\u00eb\u0001\u0000"+ + "\u0000\u0000\u00e9\u00eb\u0003\u000e\u0007\u0000\u00ea\u00e5\u0001\u0000"+ + "\u0000\u0000\u00ea\u00e9\u0001\u0000\u0000\u0000\u00eb%\u0001\u0000\u0000"+ + "\u0000\u00ec\u00f1\u00030\u0018\u0000\u00ed\u00f1\u00032\u0019\u0000\u00ee"+ + "\u00f1\u00034\u001a\u0000\u00ef\u00f1\u00036\u001b\u0000\u00f0\u00ec\u0001"+ + "\u0000\u0000\u0000\u00f0\u00ed\u0001\u0000\u0000\u0000\u00f0\u00ee\u0001"+ + "\u0000\u0000\u0000\u00f0\u00ef\u0001\u0000\u0000\u0000\u00f1\u00f2\u0001"+ + "\u0000\u0000\u0000\u00f2\u00f3\u0005\u0012\u0000\u0000\u00f3\'\u0001\u0000"+ + "\u0000\u0000\u00f4\u00f5\u0003*\u0015\u0000\u00f5\u00f6\u0003<\u001e\u0000"+ + "\u00f6\u00f7\u0003*\u0015\u0000\u00f7)\u0001\u0000\u0000\u0000\u00f8\u00fe"+ + "\u0003.\u0017\u0000\u00f9\u00fa\u0003,\u0016\u0000\u00fa\u00fb\u0003."+ + "\u0017\u0000\u00fb\u00fd\u0001\u0000\u0000\u0000\u00fc\u00f9\u0001\u0000"+ + "\u0000\u0000\u00fd\u0100\u0001\u0000\u0000\u0000\u00fe\u00fc\u0001\u0000"+ + "\u0000\u0000\u00fe\u00ff\u0001\u0000\u0000\u0000\u00ff+\u0001\u0000\u0000"+ + "\u0000\u0100\u00fe\u0001\u0000\u0000\u0000\u0101\u0102\u0007\u0002\u0000"+ + "\u0000\u0102-\u0001\u0000\u0000\u0000\u0103\u0106\u00054\u0000\u0000\u0104"+ + "\u0106\u0003\u000e\u0007\u0000\u0105\u0103\u0001\u0000\u0000\u0000\u0105"+ + "\u0104\u0001\u0000\u0000\u0000\u0106/\u0001\u0000\u0000\u0000\u0107\u0108"+ + "\u0005\u000e\u0000\u0000\u0108\u010b\u0003\u000e\u0007\u0000\u0109\u010a"+ + "\u0005\u0017\u0000\u0000\u010a\u010c\u00054\u0000\u0000\u010b\u0109\u0001"+ + "\u0000\u0000\u0000\u010b\u010c\u0001\u0000\u0000\u0000\u010c1\u0001\u0000"+ + "\u0000\u0000\u010d\u010e\u0005\u000f\u0000\u0000\u010e\u0111\u0003\u000e"+ + "\u0007\u0000\u010f\u0110\u0005\u0017\u0000\u0000\u0110\u0112\u00055\u0000"+ + "\u0000\u0111\u010f\u0001\u0000\u0000\u0000\u0111\u0112\u0001\u0000\u0000"+ + "\u0000\u01123\u0001\u0000\u0000\u0000\u0113\u0114\u0005\u0010\u0000\u0000"+ + "\u0114\u0117\u0003\u000e\u0007\u0000\u0115\u0116\u0005\u0017\u0000\u0000"+ + "\u0116\u0118\u00056\u0000\u0000\u0117\u0115\u0001\u0000\u0000\u0000\u0117"+ + "\u0118\u0001\u0000\u0000\u0000\u01185\u0001\u0000\u0000\u0000\u0119\u011a"+ + "\u0005\u0011\u0000\u0000\u011a\u011d\u0003\u000e\u0007\u0000\u011b\u011c"+ + "\u0005\u0017\u0000\u0000\u011c\u011e\u00051\u0000\u0000\u011d\u011b\u0001"+ + "\u0000\u0000\u0000\u011d\u011e\u0001\u0000\u0000\u0000\u011e7\u0001\u0000"+ + "\u0000\u0000\u011f\u0120\u0005\u001c\u0000\u0000\u01209\u0001\u0000\u0000"+ + "\u0000\u0121\u0122\u0007\u0003\u0000\u0000\u0122;\u0001\u0000\u0000\u0000"+ + "\u0123\u0124\u0007\u0004\u0000\u0000\u0124=\u0001\u0000\u0000\u0000\u001e"+ + "?CMS]`foz\u0085\u0091\u0098\u009e\u00a0\u00a3\u00a9\u00b5\u00bb\u00c2"+ + "\u00d2\u00dc\u00e2\u00ea\u00f0\u00fe\u0105\u010b\u0111\u0117\u011d"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { - final int numStates = DFA5_transitionS.length; - DFA5_transition = new short[numStates][]; - for (int i = 0; i < numStates; i++) { - DFA5_transition[i] = DFA.unpackEncodedString(DFA5_transitionS[i]); - } - } - - class DFA5 extends DFA { - - public DFA5(BaseRecognizer recognizer) { - this.recognizer = recognizer; - decisionNumber = 5; - eot = DFA5_eot; - eof = DFA5_eof; - min = DFA5_min; - max = DFA5_max; - accept = DFA5_accept; - special = DFA5_special; - transition = DFA5_transition; - } - - @Override - public String getDescription() { - return "104:27: ( instanceImports interfaceImports | interfaceImports instanceImports | interfaceImports | instanceImports )?"; - } - } - - public static final BitSet FOLLOW_imp_in_velvetModel472 = new BitSet(new long[] { 0x0000000000048000L }); - public static final BitSet FOLLOW_concept_in_velvetModel476 = new BitSet(new long[] { 0x0000000000000000L }); - public static final BitSet FOLLOW_cinterface_in_velvetModel478 = new BitSet(new long[] { 0x0000000000000000L }); - public static final BitSet FOLLOW_EOF_in_velvetModel481 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_IMPORT_in_imp493 = new BitSet(new long[] { 0x0000000600000000L }); - public static final BitSet FOLLOW_name_in_imp495 = new BitSet(new long[] { 0x0010000000000000L }); - public static final BitSet FOLLOW_SEMI_in_imp497 = new BitSet(new long[] { 0x0000000800000002L }); - public static final BitSet FOLLOW_CONCEPT_in_concept521 = new BitSet(new long[] { 0x0000000200000000L }); - public static final BitSet FOLLOW_ID_in_concept523 = new BitSet(new long[] { 0x0080003000010002L }); - public static final BitSet FOLLOW_COLON_in_concept530 = new BitSet(new long[] { 0x0000000200000000L }); - public static final BitSet FOLLOW_conceptBaseExt_in_concept532 = new BitSet(new long[] { 0x0080003000000002L }); - public static final BitSet FOLLOW_instanceImports_in_concept537 = new BitSet(new long[] { 0x0000002000000000L }); - public static final BitSet FOLLOW_interfaceImports_in_concept539 = new BitSet(new long[] { 0x0080000000000002L }); - public static final BitSet FOLLOW_interfaceImports_in_concept543 = new BitSet(new long[] { 0x0000001000000000L }); - public static final BitSet FOLLOW_instanceImports_in_concept545 = new BitSet(new long[] { 0x0080000000000002L }); - public static final BitSet FOLLOW_interfaceImports_in_concept549 = new BitSet(new long[] { 0x0080000000000002L }); - public static final BitSet FOLLOW_instanceImports_in_concept553 = new BitSet(new long[] { 0x0080000000000002L }); - public static final BitSet FOLLOW_definitions_in_concept560 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_CINTERFACE_in_cinterface593 = new BitSet(new long[] { 0x0000000200000000L }); - public static final BitSet FOLLOW_ID_in_cinterface595 = new BitSet(new long[] { 0x0080000000010000L }); - public static final BitSet FOLLOW_COLON_in_cinterface599 = new BitSet(new long[] { 0x0000000200000000L }); - public static final BitSet FOLLOW_conceptBaseExt_in_cinterface601 = new BitSet(new long[] { 0x0080000000000000L }); - public static final BitSet FOLLOW_definitions_in_cinterface605 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_ID_in_conceptBaseExt632 = new BitSet(new long[] { 0x0000000000020002L }); - public static final BitSet FOLLOW_COMMA_in_conceptBaseExt635 = new BitSet(new long[] { 0x0000000200000000L }); - public static final BitSet FOLLOW_ID_in_conceptBaseExt637 = new BitSet(new long[] { 0x0000000000020002L }); - public static final BitSet FOLLOW_IMPORTINSTANCE_in_instanceImports662 = new BitSet(new long[] { 0x0000000200000000L }); - public static final BitSet FOLLOW_ID_in_instanceImports664 = new BitSet(new long[] { 0x0000000600000000L }); - public static final BitSet FOLLOW_name_in_instanceImports666 = new BitSet(new long[] { 0x0000000000020002L }); - public static final BitSet FOLLOW_COMMA_in_instanceImports669 = new BitSet(new long[] { 0x0000000200000000L }); - public static final BitSet FOLLOW_ID_in_instanceImports671 = new BitSet(new long[] { 0x0000000600000000L }); - public static final BitSet FOLLOW_name_in_instanceImports673 = new BitSet(new long[] { 0x0000000000020002L }); - public static final BitSet FOLLOW_IMPORTINTERFACE_in_interfaceImports702 = new BitSet(new long[] { 0x0000000200000000L }); - public static final BitSet FOLLOW_ID_in_interfaceImports704 = new BitSet(new long[] { 0x0000000600000000L }); - public static final BitSet FOLLOW_name_in_interfaceImports706 = new BitSet(new long[] { 0x0000000000020002L }); - public static final BitSet FOLLOW_COMMA_in_interfaceImports709 = new BitSet(new long[] { 0x0000000200000000L }); - public static final BitSet FOLLOW_ID_in_interfaceImports711 = new BitSet(new long[] { 0x0000000600000000L }); - public static final BitSet FOLLOW_name_in_interfaceImports713 = new BitSet(new long[] { 0x0000000000020002L }); - public static final BitSet FOLLOW_START_C_in_definitions757 = new BitSet(new long[] { 0xF040088021500010L, 0x0000000000000001L }); - public static final BitSet FOLLOW_definition_in_definitions759 = new BitSet(new long[] { 0x0000000001000000L }); - public static final BitSet FOLLOW_END_C_in_definitions761 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_nonFeatureDefinition_in_definition785 = new BitSet(new long[] { 0xF040088020500012L, 0x0000000000000001L }); - public static final BitSet FOLLOW_featureGroup_in_definition793 = new BitSet(new long[] { 0xF000000000500002L, 0x0000000000000001L }); - public static final BitSet FOLLOW_nonFeatureDefinition_in_definition795 = new BitSet(new long[] { 0xF000000000500002L, 0x0000000000000001L }); - public static final BitSet FOLLOW_feature_in_definition802 = new BitSet(new long[] { 0xF000008020500012L, 0x0000000000000001L }); - public static final BitSet FOLLOW_feature_in_definition805 = new BitSet(new long[] { 0xF000008020500012L, 0x0000000000000001L }); - public static final BitSet FOLLOW_nonFeatureDefinition_in_definition809 = new BitSet(new long[] { 0xF000008020500012L, 0x0000000000000001L }); - public static final BitSet FOLLOW_constraint_in_nonFeatureDefinition831 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_use_in_nonFeatureDefinition836 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_attribute_in_nonFeatureDefinition841 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_description_in_nonFeatureDefinition847 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_USE_in_use858 = new BitSet(new long[] { 0x0000000600000000L }); - public static final BitSet FOLLOW_name_in_use860 = new BitSet(new long[] { 0x0010000000000000L }); - public static final BitSet FOLLOW_SEMI_in_use862 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_MANDATORY_in_feature883 = new BitSet(new long[] { 0x0000000000000010L }); - public static final BitSet FOLLOW_ABSTRACT_in_feature885 = new BitSet(new long[] { 0x0000000020000000L }); - public static final BitSet FOLLOW_ABSTRACT_in_feature889 = new BitSet(new long[] { 0x0000008000000000L }); - public static final BitSet FOLLOW_MANDATORY_in_feature891 = new BitSet(new long[] { 0x0000000020000000L }); - public static final BitSet FOLLOW_MANDATORY_in_feature895 = new BitSet(new long[] { 0x0000000020000000L }); - public static final BitSet FOLLOW_ABSTRACT_in_feature899 = new BitSet(new long[] { 0x0000000020000000L }); - public static final BitSet FOLLOW_FEATURE_in_feature906 = new BitSet(new long[] { 0x0000000600000000L }); - public static final BitSet FOLLOW_name_in_feature908 = new BitSet(new long[] { 0x0090000000000000L }); - public static final BitSet FOLLOW_definitions_in_feature911 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_SEMI_in_feature915 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_groupType_in_featureGroup946 = new BitSet(new long[] { 0x0080000000000000L }); - public static final BitSet FOLLOW_START_C_in_featureGroup948 = new BitSet(new long[] { 0x0000008020000010L }); - public static final BitSet FOLLOW_feature_in_featureGroup950 = new BitSet(new long[] { 0x0000008021000010L }); - public static final BitSet FOLLOW_END_C_in_featureGroup953 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_DESCRIPTION_in_description995 = new BitSet(new long[] { 0x0200000000000000L }); - public static final BitSet FOLLOW_STRING_in_description997 = new BitSet(new long[] { 0x0010000000000000L }); - public static final BitSet FOLLOW_SEMI_in_description999 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_CONSTRAINT_in_constraint1020 = new BitSet(new long[] { 0x0101004600000000L }); - public static final BitSet FOLLOW_ID_in_constraint1024 = new BitSet(new long[] { 0x0000000004000000L }); - public static final BitSet FOLLOW_EQ_in_constraint1026 = new BitSet(new long[] { 0x0101004600000000L }); - public static final BitSet FOLLOW_constraintDefinition_in_constraint1032 = new BitSet(new long[] { 0x0010000000000000L }); - public static final BitSet FOLLOW_attributeConstraint_in_constraint1036 = new BitSet(new long[] { 0x0010000000000000L }); - public static final BitSet FOLLOW_SEMI_in_constraint1039 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_constraintOperand_in_constraintDefinition1052 = new BitSet(new long[] { 0x0006E00000000002L }); - public static final BitSet FOLLOW_binaryOp_in_constraintDefinition1055 = new BitSet(new long[] { 0x0101000600000000L }); - public static final BitSet FOLLOW_constraintOperand_in_constraintDefinition1057 = new BitSet(new long[] { 0x0006E00000000002L }); - public static final BitSet FOLLOW_unaryOp_in_constraintOperand1084 = new BitSet(new long[] { 0x0101000600000000L }); - public static final BitSet FOLLOW_START_R_in_constraintOperand1088 = new BitSet(new long[] { 0x0101000600000000L }); - public static final BitSet FOLLOW_constraintDefinition_in_constraintOperand1090 = new BitSet(new long[] { 0x0000000002000000L }); - public static final BitSet FOLLOW_END_R_in_constraintOperand1092 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_name_in_constraintOperand1096 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_intAttribute_in_attribute1132 = new BitSet(new long[] { 0x0010000000000000L }); - public static final BitSet FOLLOW_floatAttribute_in_attribute1136 = new BitSet(new long[] { 0x0010000000000000L }); - public static final BitSet FOLLOW_stringAttribute_in_attribute1140 = new BitSet(new long[] { 0x0010000000000000L }); - public static final BitSet FOLLOW_boolAttribute_in_attribute1144 = new BitSet(new long[] { 0x0010000000000000L }); - public static final BitSet FOLLOW_SEMI_in_attribute1147 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_attribConstraint_in_attributeConstraint1178 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_attribNumInstance_in_attribConstraint1198 = new BitSet(new long[] { 0x0008010000000A80L }); - public static final BitSet FOLLOW_attribOperator_in_attribConstraint1201 = new BitSet(new long[] { 0x0000004600000000L }); - public static final BitSet FOLLOW_attribNumInstance_in_attribConstraint1203 = new BitSet(new long[] { 0x0008010000000A80L }); - public static final BitSet FOLLOW_attribRelation_in_attribConstraint1211 = new BitSet(new long[] { 0x0000004600000000L }); - public static final BitSet FOLLOW_attribNumInstance_in_attribConstraint1217 = new BitSet(new long[] { 0x0008010000000002L }); - public static final BitSet FOLLOW_attribOperator_in_attribConstraint1220 = new BitSet(new long[] { 0x0000004600000000L }); - public static final BitSet FOLLOW_attribNumInstance_in_attribConstraint1222 = new BitSet(new long[] { 0x0008010000000002L }); - public static final BitSet FOLLOW_INT_in_attribNumInstance1254 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_name_in_attribNumInstance1261 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_VAR_INT_in_intAttribute1271 = new BitSet(new long[] { 0x0000000600000000L }); - public static final BitSet FOLLOW_name_in_intAttribute1274 = new BitSet(new long[] { 0x0000000004000002L }); - public static final BitSet FOLLOW_EQ_in_intAttribute1277 = new BitSet(new long[] { 0x0000004000000000L }); - public static final BitSet FOLLOW_INT_in_intAttribute1280 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_VAR_FLOAT_in_floatAttribute1289 = new BitSet(new long[] { 0x0000000600000000L }); - public static final BitSet FOLLOW_name_in_floatAttribute1292 = new BitSet(new long[] { 0x0000000004000002L }); - public static final BitSet FOLLOW_EQ_in_floatAttribute1295 = new BitSet(new long[] { 0x0000000040000000L }); - public static final BitSet FOLLOW_FLOAT_in_floatAttribute1298 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_VAR_STRING_in_stringAttribute1306 = new BitSet(new long[] { 0x0000000600000000L }); - public static final BitSet FOLLOW_name_in_stringAttribute1309 = new BitSet(new long[] { 0x0000000004000002L }); - public static final BitSet FOLLOW_EQ_in_stringAttribute1312 = new BitSet(new long[] { 0x0200000000000000L }); - public static final BitSet FOLLOW_STRING_in_stringAttribute1315 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_VAR_BOOL_in_boolAttribute1324 = new BitSet(new long[] { 0x0000000600000000L }); - public static final BitSet FOLLOW_name_in_boolAttribute1327 = new BitSet(new long[] { 0x0000000004000002L }); - public static final BitSet FOLLOW_EQ_in_boolAttribute1330 = new BitSet(new long[] { 0x0000000000004000L }); - public static final BitSet FOLLOW_BOOLEAN_in_boolAttribute1333 = new BitSet(new long[] { 0x0000000000000002L }); - public static final BitSet FOLLOW_OP_NOT_in_unaryOp1345 = new BitSet(new long[] { 0x0000000000000002L }); - -} + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetVisitor.java b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetVisitor.java new file mode 100644 index 0000000000..1b53004923 --- /dev/null +++ b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetVisitor.java @@ -0,0 +1,202 @@ +// Generated from Velvet.g4 by ANTLR 4.13.2 + +package de.ovgu.featureide.fm.core.io.velvet; + +import de.ovgu.featureide.fm.core.FMCorePlugin; +import org.antlr.v4.runtime.tree.ParseTreeVisitor; + +/** + * This interface defines a complete generic visitor for a parse tree produced + * by {@link VelvetParser}. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +public interface VelvetVisitor extends ParseTreeVisitor { + /** + * Visit a parse tree produced by {@link VelvetParser#velvetModel}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitVelvetModel(VelvetParser.VelvetModelContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#imp}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitImp(VelvetParser.ImpContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#concept}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitConcept(VelvetParser.ConceptContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#cinterface}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitCinterface(VelvetParser.CinterfaceContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#conceptBaseExt}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitConceptBaseExt(VelvetParser.ConceptBaseExtContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#instanceImports}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitInstanceImports(VelvetParser.InstanceImportsContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#interfaceImports}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitInterfaceImports(VelvetParser.InterfaceImportsContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#name}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitName(VelvetParser.NameContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#definitions}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitDefinitions(VelvetParser.DefinitionsContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#definition}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitDefinition(VelvetParser.DefinitionContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#nonFeatureDefinition}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitNonFeatureDefinition(VelvetParser.NonFeatureDefinitionContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#use}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitUse(VelvetParser.UseContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#feature}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFeature(VelvetParser.FeatureContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#featureGroup}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFeatureGroup(VelvetParser.FeatureGroupContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#groupType}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitGroupType(VelvetParser.GroupTypeContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#description}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitDescription(VelvetParser.DescriptionContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#constraint}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitConstraint(VelvetParser.ConstraintContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#constraintDefinition}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitConstraintDefinition(VelvetParser.ConstraintDefinitionContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#constraintOperand}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitConstraintOperand(VelvetParser.ConstraintOperandContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#attribute}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAttribute(VelvetParser.AttributeContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#attributeConstraint}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAttributeConstraint(VelvetParser.AttributeConstraintContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#attribNumExpr}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAttribNumExpr(VelvetParser.AttribNumExprContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#attribOperator}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAttribOperator(VelvetParser.AttribOperatorContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#attribNumInstance}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAttribNumInstance(VelvetParser.AttribNumInstanceContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#intAttribute}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitIntAttribute(VelvetParser.IntAttributeContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#floatAttribute}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFloatAttribute(VelvetParser.FloatAttributeContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#stringAttribute}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitStringAttribute(VelvetParser.StringAttributeContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#boolAttribute}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitBoolAttribute(VelvetParser.BoolAttributeContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#unaryOp}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitUnaryOp(VelvetParser.UnaryOpContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#binaryOp}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitBinaryOp(VelvetParser.BinaryOpContext ctx); + /** + * Visit a parse tree produced by {@link VelvetParser#attribRelation}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAttribRelation(VelvetParser.AttribRelationContext ctx); +} \ No newline at end of file diff --git a/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetVisitorImpl.java b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetVisitorImpl.java new file mode 100644 index 0000000000..4a0b1cdc74 --- /dev/null +++ b/plugins/de.ovgu.featureide.fm.core/src/de/ovgu/featureide/fm/core/io/velvet/VelvetVisitorImpl.java @@ -0,0 +1,917 @@ +/* FeatureIDE - A Framework for Feature-Oriented Software Development + * Copyright (C) 2005-2020 FeatureIDE team, University of Magdeburg, Germany + * + * This file is part of FeatureIDE. + * + * FeatureIDE is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FeatureIDE is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FeatureIDE. If not, see . + * + * See http://featureide.cs.ovgu.de/ for further information. + */ +package de.ovgu.featureide.fm.core.io.velvet; + +import java.io.File; +import java.io.FilenameFilter; +import java.util.Collection; +import java.util.LinkedList; +import java.util.Map.Entry; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.RecognitionException; +import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.runtime.tree.TerminalNode; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.ResourcesPlugin; +import org.prop4j.And; +import org.prop4j.Choose; +import org.prop4j.Equals; +import org.prop4j.Implies; +import org.prop4j.Literal; +import org.prop4j.Node; +import org.prop4j.Not; +import org.prop4j.Or; + +import de.ovgu.featureide.fm.core.Logger; +import de.ovgu.featureide.fm.core.base.IConstraint; +import de.ovgu.featureide.fm.core.base.IFeature; +import de.ovgu.featureide.fm.core.base.IFeatureModel; +import de.ovgu.featureide.fm.core.base.IFeatureModelFactory; +import de.ovgu.featureide.fm.core.base.IFeatureStructure; +import de.ovgu.featureide.fm.core.base.impl.DefaultFeatureModelFactory; +import de.ovgu.featureide.fm.core.base.impl.FMFormatManager; +import de.ovgu.featureide.fm.core.base.impl.MultiConstraint; +import de.ovgu.featureide.fm.core.base.impl.MultiFeature; +import de.ovgu.featureide.fm.core.base.impl.MultiFeatureModel; +import de.ovgu.featureide.fm.core.base.impl.MultiFeatureModel.UsedModel; +import de.ovgu.featureide.fm.core.base.impl.MultiFeatureModelFactory; +import de.ovgu.featureide.fm.core.constraint.Equation; +import de.ovgu.featureide.fm.core.constraint.FeatureAttribute; +import de.ovgu.featureide.fm.core.constraint.Reference; +import de.ovgu.featureide.fm.core.constraint.ReferenceType; +import de.ovgu.featureide.fm.core.constraint.RelationOperator; +import de.ovgu.featureide.fm.core.constraint.WeightedTerm; +import de.ovgu.featureide.fm.core.io.manager.FeatureModelManager; +import de.ovgu.featureide.fm.core.io.manager.SimpleFileHandler; +import de.ovgu.featureide.fm.core.io.velvet.VelvetParser.AttribNumExprContext; +import de.ovgu.featureide.fm.core.io.velvet.VelvetParser.FeatureContext; +import de.ovgu.featureide.fm.core.io.velvet.VelvetParser.NonFeatureDefinitionContext; + +//import de.ovgu.featureide.fm.core.io.velvet.VelvetParser.ConceptContext; + +/** + * TODO description + * + * @author mgrave + * @author Oleksandr Kudriavchenko + */ +public class VelvetVisitorImpl extends VelvetBaseVisitor { + + private final IVelvetFeatureModelFormat data; + // private final SimpleVelvetFeatureModelFormat data; + private final MultiFeatureModelFactory factory; + private Node RHS; + private Node LHS; + private RelationOperator relationOperator = null; + private IFeature currentParentFeature = null; + private LinkedList weightedTerms; + int degree = 0; + private String equationID = null; + private boolean useLongNames; + + /** + * @param velvetFeatureModelFormat + */ + public VelvetVisitorImpl(IVelvetFeatureModelFormat data) { + + factory = MultiFeatureModelFactory.getInstance(); + useLongNames = false; + if (data instanceof VelvetFeatureModelFormat) { + this.data = (VelvetFeatureModelFormat) data; + } else if (data instanceof SimpleVelvetFeatureModelFormat) { + this.data = (SimpleVelvetFeatureModelFormat) data; + } else { + this.data = null; + return; + } + + } + + @Override + public Void visitVelvetModel(VelvetParser.VelvetModelContext ctx) { + + if (ctx.imp() != null) { + useLongNames = true; + visitImp(ctx.imp()); + } + if (ctx.concept() != null) { + visitConcept(ctx.concept()); + + } else if (ctx.cinterface() != null) { + data.getExtFeatureModel().setInterface(true); + visitCinterface(ctx.cinterface()); + } + if (!data.getIsUsedAsAPI()) { + final IFeatureModelFactory mappingModelFactory = DefaultFeatureModelFactory.getInstance(); + final IFeatureModel mappingModel = mappingModelFactory.create(); + final IFeatureStructure rootFeature = mappingModelFactory.createFeature(mappingModel, "MPL").getStructure(); + rootFeature.setAnd(); + rootFeature.setAbstract(true); + rootFeature.setMandatory(true); + + final LinkedList possibleProjects = new LinkedList<>(); + final IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects(); + for (int i = 0; i < projects.length; i++) { + final IProject project = projects[i]; + if (project.isAccessible()) { + possibleProjects.add(project.getName()); + } + } + + for (final Entry parameter : data.getExtFeatureModel().getExternalModels().entrySet()) { + if (parameter.getValue().getType() == MultiFeature.TYPE_INTERFACE) { + final IFeatureStructure parameterFeature = mappingModelFactory.createFeature(mappingModel, parameter.getKey()).getStructure(); + parameterFeature.setOr(); + parameterFeature.setAbstract(true); + parameterFeature.setMandatory(true); + rootFeature.addChild(parameterFeature); + + for (final String projectName : possibleProjects) { + final IFeatureStructure projectFeature = + mappingModelFactory.createFeature(mappingModel, parameterFeature.getFeature().getName() + "." + projectName).getStructure(); + projectFeature.setAbstract(false); + projectFeature.setMandatory(false); + parameterFeature.addChild(projectFeature); + } + } + } + mappingModel.getStructure().setRoot(rootFeature); + data.getExtFeatureModel().setMappingModel(mappingModel); + } + return null; + } + + @Override + public Void visitConcept(VelvetParser.ConceptContext ctx) { + + if (ctx.ID() != null) { + data.setExtFeatureModelName(ctx.ID().getText()); + final MultiFeature rootFeature = (MultiFeature) factory.createFeature(data.getExtFeatureModel(), data.getExtFeatureModelName()); + rootFeature.getStructure().setAbstract(true); + rootFeature.getStructure().setMandatory(true); + data.getExtFeatureModel().addFeature(rootFeature); + data.getExtFeatureModel().getStructure().setRoot(rootFeature.getStructure()); + currentParentFeature = rootFeature; + } + + if (ctx.conceptBaseExt() != null) { + useLongNames = true; + visitConceptBaseExt(ctx.conceptBaseExt()); + + } + if (ctx.interfaceImports() != null) { + useLongNames = true; + visitInterfaceImports(ctx.interfaceImports()); + } + if (ctx.instanceImports() != null) { + useLongNames = true; + visitInstanceImports(ctx.instanceImports()); + } + if (ctx.definitions() != null) { + visitDefinitions(ctx.definitions()); + } + return null; + } + + @Override + public Void visitImp(VelvetParser.ImpContext ctx) { + for (final ParseTree imp : ctx.name()) { + data.getExtFeatureModel().addImport(imp.getText()); + } + return null; + } + + @Override + public Void visitCinterface(VelvetParser.CinterfaceContext ctx) { + if (ctx.ID() != null) { + data.setExtFeatureModelName(ctx.ID().getText()); + final MultiFeature rootFeature = (MultiFeature) factory.createFeature(data.getExtFeatureModel(), data.getExtFeatureModelName()); + rootFeature.getStructure().setAbstract(true); + rootFeature.getStructure().setMandatory(true); + data.getExtFeatureModel().addFeature(rootFeature); + data.getExtFeatureModel().getStructure().setRoot(rootFeature.getStructure()); + currentParentFeature = rootFeature; + } + if (ctx.conceptBaseExt() != null) { + visitConceptBaseExt(ctx.conceptBaseExt()); + } + if (ctx.definitions() != null) { + visitDefinitions(ctx.definitions()); + } + return null; + } + + @Override + public Void visitConceptBaseExt(VelvetParser.ConceptBaseExtContext ctx) { + for (final TerminalNode id : ctx.ID()) { + final String parentModelName = id.getText(); + final IFeatureModel fm = getExternalFeatureModel(parentModelName); + if (fm == null) { + return null; + } + if (!data.getExtFeatureModel().addInheritance(parentModelName, parentModelName, null)) { + reportWarning("THE_PARENT_MODEL" + parentModelName + "IS_ALREADY_USED_"); + return null; + } + addExternalFeatures(fm, parentModelName, data.getExtFeatureModel().getStructure().getRoot(), MultiFeature.TYPE_INHERITED); + } + return null; + } + + @Override + public Void visitInstanceImports(VelvetParser.InstanceImportsContext ctx) { + int i = 0; + for (final TerminalNode id : ctx.ID()) { + final String interfaceName = id.getText(); + final String varName = ctx.name(i).getText(); + i++; + if (checkExternalModelFile(interfaceName)) { + if (!data.getExtFeatureModel().addInstance(interfaceName, varName, null)) { + reportWarning("THE_VARIABLE_NAME " + varName + " IS_ALREADY_IN_USE_"); + } + } + } + return null; + } + + @Override + public Void visitInterfaceImports(VelvetParser.InterfaceImportsContext ctx) { + int i = 0; + for (final TerminalNode id : ctx.ID()) { + final String interfaceName = id.getText(); + final String varName = ctx.name(i).getText(); + i++; + if (checkExternalModelFile(interfaceName)) { + if (!data.getExtFeatureModel().addInterface(interfaceName, varName, null)) { + reportWarning("THE_VARIABLE_NAME " + varName + " IS_ALREADY_IN_USE_"); + } + } + } + return null; + } + + private boolean checkExternalModelFile(String curNode) { + if (data.getLocalSearch()) { + if (localSearch(curNode) == null) { + reportWarning(String.format("No model for %s could be found.", curNode)); + return false; + } + return true; + } + if (getExternalModelFile(curNode) == null) { + reportWarning(String.format("No model for %s could be found.", curNode)); + return false; + } + return true; + } + + @Override + public Void visitDefinitions(VelvetParser.DefinitionsContext ctx) { + if (ctx.definition() != null) { + visitDefinition(ctx.definition()); + } + return null; + } + + @Override + public Void visitDefinition(VelvetParser.DefinitionContext ctx) { + + final IFeature parent = currentParentFeature; + for (final FeatureContext feature : ctx.feature()) { + currentParentFeature = parent; + visitFeature(feature); + } + + if (ctx.featureGroup() != null) { + currentParentFeature = parent; + visitFeatureGroup(ctx.featureGroup()); + } + + for (final NonFeatureDefinitionContext nonFeatureDef : ctx.nonFeatureDefinition()) { + currentParentFeature = parent; + visitNonFeatureDefinition(nonFeatureDef); + } + + currentParentFeature = parent; + + return null; + } + + @Override + public Void visitNonFeatureDefinition(VelvetParser.NonFeatureDefinitionContext ctx) { + + if (ctx.constraint() != null) { + visitConstraint(ctx.constraint()); + } else if (ctx.attribute() != null) { + visitAttribute(ctx.attribute()); + } else if (ctx.description() != null) { + visitDescription(ctx.description()); + } else if (ctx.use() != null) { + visitUse(ctx.use()); + } + + return null; + } + + private IFeatureModel getInterfaceFeatureModel(String curNode) { + final File modelFile = getInterfaceModelFile(curNode); + if (modelFile == null) { + return null; + } + return readModel(modelFile, curNode); + } + + private IFeatureModel getExternalFeatureModel(String curNode) { + final File modelFile = getExternalModelFile(curNode); + if (modelFile == null) { + reportWarning(String.format("No model for %s could be found.", curNode)); + return null; + } + return readModel(modelFile, curNode); + } + + private IFeatureModel readModel(File modelFile, String curNode) { + IFeatureModel fm = null; + if (data.getIsUsedAsAPI()) { + fm = readExternalModelFileAPI(modelFile); + } else { + fm = readExternalModelFile(modelFile); + } + if (fm == null) { + reportWarning(String.format("External model for %s could not be read.", curNode)); + return null; + } + return fm; + } + + private IFeatureModel readExternalModelFile(File file) { + return FeatureModelManager.load(file.toPath()); + } + + private IFeatureModel readExternalModelFileAPI(File file) { + final IFeatureModel fm = new MultiFeatureModelFactory().create(); + fm.setSourceFile(file.toPath()); + SimpleFileHandler.load(file.toPath(), fm, FMFormatManager.getInstance()); + return fm; + } + + private File getExternalModelFile(String name) { + if (!data.getExtFeatureModel().getImports().isEmpty() && !data.getIsUsedAsAPI()) { + for (final String path : data.getExtFeatureModel().getImports()) { + final IProject project = data.getProject(); + if (!path.endsWith(name)) { + continue; + } + if (project != null) { + IResource res = project.getFile(path + ".xml"); + if ((res != null) && res.exists()) { + return res.getLocation().toFile(); + } + res = project.getFile(path + ".velvet"); + if ((res != null) && res.exists()) { + return res.getLocation().toFile(); + } + } + } + } + + if (data.getLocalSearch() || data.getIsUsedAsAPI()) { + return localSearch(name); + } + File returnFile = null; + + // local search + IProject project = data.getProject(); + if (project != null) { + for (int i = 0; i < data.getPaths().length; i++) { + final IResource res = project.findMember(String.format(data.getPaths()[i], name)); + if (res != null) { + returnFile = res.getLocation().toFile(); + if (returnFile.equals(data.getFeatureModelFile())) { + returnFile = null; + } else { + break; + } + } + } + } + + // external search + if (returnFile == null) { + // if could not get current project or could not find file in current + // project assume the name is the project name + project = ResourcesPlugin.getWorkspace().getRoot().getProject(name); + if (project.isAccessible()) { + returnFile = project.getFile("model.xml").getLocation().toFile(); + if (returnFile.equals(data.getFeatureModelFile())) { + return null; + } + } else { + Logger.logWarning(String.format("Project %s is not accessible.", name)); + } + } + if ((returnFile == null) || !returnFile.exists() || !returnFile.canRead()) { + return null; + } + return returnFile; + } + + private File getInterfaceModelFile(String name) { + if (data.getLocalSearch()) { + return localSearch(name); + } + File returnFile = null; + final IProject project = data.getProject(); + if (project != null) { + final IResource res = project.findMember(String.format("Interfaces/%s.velvet", name)); + if (res != null) { + returnFile = res.getLocation().toFile(); + } + } + return returnFile; + } + + private File localSearch(final String name) { + if (data.getFeatureModelFile() != null) { + final File searchDir = new File(data.getFeatureModelFile().getParentFile(), "MPL"); + if (searchDir != null) { + final File[] files = searchDir.listFiles(new FilenameFilter() { + + @Override + public boolean accept(File dir, String fileName) { + final int index = fileName.lastIndexOf('.'); + return (index > 0) && fileName.substring(0, index).equals(name) && fileName.substring(index + 1).matches("xml|velvet"); + } + }); + if ((files != null) && (files.length > 0)) { + return files[0]; + } + } + } + return null; + } + + @Override + public Void visitUse(VelvetParser.UseContext ctx) { + + final String varName = ctx.name().getText(); + final IFeature parent = currentParentFeature; + final UsedModel usedModel = data.getExtFeatureModel().getExternalModel(varName); + if (usedModel == null) { + reportWarning(String.format("No variable with the name %s found.", varName)); + return null; + } + switch (usedModel.getType()) { + case MultiFeature.TYPE_INTERFACE: + final IFeatureModel interfaceModel = getInterfaceFeatureModel(usedModel.getModelName()); + if (interfaceModel == null) { + return null; + } + addExternalFeatures(interfaceModel, varName, parent.getStructure(), MultiFeature.TYPE_INTERFACE); + break; + case MultiFeature.TYPE_INSTANCE: + final IFeatureModel instanceModel = getExternalFeatureModel(usedModel.getModelName()); + if (instanceModel == null) { + return null; + } + addExternalFeatures(instanceModel, varName, parent.getStructure(), MultiFeature.TYPE_INSTANCE); + break; + default: // + reportWarning(String.format("The variable with the name %s is no interface or instance.", varName)); + } + + return null; + } + + private void addExternalFeatures(IFeatureModel sourceModel, String sourceModelName, IFeatureStructure targetParentFeature, int type) { + if (sourceModel instanceof MultiFeatureModel) { + for (final UsedModel usedModel : ((MultiFeatureModel) sourceModel).getExternalModels().values()) { + data.getExtFeatureModel().addExternalModel(new UsedModel(usedModel, sourceModelName)); + } + } + final UsedModel usedModel = data.getExtFeatureModel().getExternalModel(sourceModelName); + if (usedModel != null) { + usedModel.setPrefix(targetParentFeature.getFeature().getName() + "." + sourceModelName); + } + final IFeatureStructure instanceRoot = sourceModel.getStructure().getRoot(); + String connectorName = ""; + if (type == MultiFeature.TYPE_INHERITED) { + connectorName = targetParentFeature.getFeature().getName(); + } else { + connectorName = (targetParentFeature.isRoot() && targetParentFeature.getFeature().getName().equals(sourceModelName)) + ? targetParentFeature.getFeature().getName() : targetParentFeature.getFeature().getName() + "." + sourceModelName; + } + final MultiFeature connector = addFeature(targetParentFeature.getFeature(), connectorName, true, true, instanceRoot.isHidden()); + connector.setType(type); + connector.setExternalModelName(sourceModelName); + if (instanceRoot.isAlternative()) { + connector.getStructure().setAlternative(); + } else if (instanceRoot.isOr()) { + connector.getStructure().setOr(); + } + + copyChildnodes(data.getExtFeatureModel(), connector.getStructure(), instanceRoot, sourceModelName, connectorName, type); + + for (final IConstraint constraint : sourceModel.getConstraints()) { + final Node constraintParent_ID_Value = constraint.getNode(); + + final int IDValue_Index = constraintParent_ID_Value.getChildren().length - 1; + final Node constraintID_Value = constraintParent_ID_Value.getChildren()[IDValue_Index]; + final int Value_Index = constraintID_Value.getChildren().length - 1; + final Node constraintValue = constraintID_Value.getChildren()[Value_Index]; + + // Update parent's name + updateConstraintNode(constraintParent_ID_Value.getChildren()[0], connectorName, instanceRoot.getFeature().getName(), data.getExtFeatureModel()); + // Update constraint's Value (node itself) + updateConstraintNode(constraintValue, connectorName, instanceRoot.getFeature().getName(), data.getExtFeatureModel()); + + final MultiConstraint newConstraint = (MultiConstraint) factory.createConstraint(data.getExtFeatureModel(), constraintParent_ID_Value); + newConstraint.setType(type); + data.getExtFeatureModel().addConstraint(newConstraint); + } + } + + private static void updateConstraintNode(Node curNode, String parentModelname, String rootName, IFeatureModel targetModel) { + if (curNode instanceof Literal) { + final Literal literal = (Literal) curNode; + if (literal.var.equals(rootName)) { + literal.var = parentModelname; + } else { + // if fully qualified name + IFeature feature = targetModel.getFeature(literal.var.toString().replace(rootName, parentModelname)); + if (feature == null) { + // else + feature = targetModel.getFeature(parentModelname + "." + literal.var.toString()); + } + literal.var = feature.getName(); + } + } else { + for (final Node child : curNode.getChildren()) { + updateConstraintNode(child, parentModelname, rootName, targetModel); + } + } + } + + private void copyChildnodes(final MultiFeatureModel targetModel, final IFeatureStructure targetParentNode, final IFeatureStructure sourceParentNode, + final String parentModelName, final String targetParentName, final int type) { + for (final IFeatureStructure sourceChildStructure : sourceParentNode.getChildren()) { + final MultiFeature feature; + if (data.isVelvetImport()) { + feature = (MultiFeature) factory.createFeature(targetModel, sourceChildStructure.getFeature().getName()); + } else { + final String shortName = sourceChildStructure.getFeature().getName().replace(sourceParentNode.getFeature().getName() + ".", ""); + feature = (MultiFeature) factory.createFeature(targetModel, targetParentName + "." + shortName); + } + final IFeatureStructure targetChildStructure = feature.getStructure(); + targetChildStructure.setMandatory(sourceChildStructure.isMandatory()); + targetChildStructure.setAbstract(sourceChildStructure.isAbstract()); + targetChildStructure.setHidden(sourceChildStructure.isHidden()); + feature.setExternalModelName(parentModelName); + targetChildStructure.setAND(sourceChildStructure.isAnd()); + targetChildStructure.setMultiple(sourceChildStructure.isMultiple()); + if (sourceChildStructure.isOr()) { + targetChildStructure.setOr(); + } + + targetModel.addFeature(feature); + targetParentNode.addChild(targetChildStructure); + feature.setType(type); + + if (sourceChildStructure.hasChildren()) { + copyChildnodes(targetModel, targetChildStructure, sourceChildStructure, parentModelName, feature.getName(), type); + } + } + } + + /** + * @param string + */ + private void reportWarning(String message) { + Logger.logWarning(message + ((data.getFeatureModelFile() != null) ? "IN_FILE" + data.getFeatureModelFile() : "")); + } + + @Override + public Void visitFeature(VelvetParser.FeatureContext ctx) { + String featureName = ctx.name().getText(); + final boolean isMandatory = ctx.MANDATORY() != null; + final boolean isAbstract = ctx.ABSTRACT() != null; + if (!data.getExtFeatureModel().isInterface()) { + + if (data.isVelvetImport() || currentParentFeature.getStructure().isRoot() + || (!useLongNames && featureName.startsWith(currentParentFeature.getName()))) { + featureName = ctx.name().getText(); + } else { + featureName = currentParentFeature.getName() + "." + featureName; + } + } + final MultiFeature newFeature = addFeature(currentParentFeature, featureName, isMandatory, isAbstract, false); + if (ctx.definitions() != null) { + currentParentFeature = newFeature; + visitDefinitions(ctx.definitions()); + } + return null; + } + + private MultiFeature addFeature(final IFeature parent, final String featureName, final boolean isMandatory, final boolean isAbstract, + final boolean isHidden) { + final MultiFeature newFeature = (MultiFeature) factory.createFeature(data.getExtFeatureModel(), featureName); + newFeature.getStructure().setMandatory(isMandatory); + newFeature.getStructure().setAbstract(isAbstract); + newFeature.getStructure().setHidden(isHidden); + final IFeature orgFeature = data.getExtFeatureModel().getFeature(featureName); + if ((orgFeature != null) && (orgFeature instanceof MultiFeature)) { + return (MultiFeature) orgFeature; + } else { + data.getExtFeatureModel().addFeature(newFeature); + parent.getStructure().addChild(newFeature.getStructure()); + newFeature.setNewDefined(true); + return newFeature; + } + } + + @Override + public Void visitFeatureGroup(VelvetParser.FeatureGroupContext ctx) { + if (ctx.groupType() != null) { + visitGroupType(ctx.groupType()); + } + for (final FeatureContext feature : ctx.feature()) { + visitFeature(feature); + } + return null; + } + + @Override + public Void visitGroupType(VelvetParser.GroupTypeContext ctx) { + if (ctx.SOMEOF() != null) { + currentParentFeature.getStructure().setOr(); + } else if (ctx.ONEOF() != null) { + currentParentFeature.getStructure().setAlternative(); + } else { + currentParentFeature.getStructure().setAnd(); + } + return null; + } + + @Override + public Void visitConstraint(VelvetParser.ConstraintContext ctx) { + if (ctx.constraintDefinition() != null) { + visitConstraintDefinition(ctx.constraintDefinition()); + if (ctx.ID() != null) { + RHS = new Equals(new Literal(ctx.ID().getText()), RHS); + } + RHS = new Implies(new Literal(currentParentFeature.getName()), RHS); + data.getExtFeatureModel().addConstraint(factory.createConstraint(data.getExtFeatureModel(), RHS)); + RHS = null; + } else if (ctx.attributeConstraint() != null) { + equationID = null; + if (ctx.ID() != null) { + equationID = ctx.ID().getText(); + } + visitAttributeConstraint(ctx.attributeConstraint()); + } + return null; + } + + private static WeightedTerm createTerm(final int weight, final boolean rightSide, final boolean minus, final Reference reference) { + boolean positive = weight >= 0; + if (rightSide ^ minus) { + positive = !positive; + } + return new WeightedTerm(Math.abs(weight), positive, reference); + } + + @Override + public Void visitConstraintDefinition(VelvetParser.ConstraintDefinitionContext ctx) { + + // RHS = null; + int operator = 0; + for (int i = 0;; i++) { + if (ctx.constraintOperand(i) == null) { + break; + } + if (LHS == null) { + visitConstraintOperand(ctx.constraintOperand(i));// LHS = result + } + switch (operator) { + case VelvetParser.OP_AND: + LHS = new And(RHS, LHS); + break; + case VelvetParser.OP_OR: + LHS = new Or(RHS, LHS); + break; + case VelvetParser.OP_XOR: + LHS = new Choose(1, RHS, LHS); + break; + case VelvetParser.OP_IMPLIES: + LHS = new Implies(RHS, LHS); + break; + case VelvetParser.OP_EQUIVALENT: + LHS = new Equals(RHS, LHS); + break; + default: + break; + } + if (ctx.binaryOp(i) != null) { + operator = ctx.binaryOp(i).getStart().getType(); + } + RHS = LHS; + LHS = null; + } + return null; + + } + + @Override + public Void visitConstraintOperand(VelvetParser.ConstraintOperandContext ctx) { + // put result in lhs + final Node tempRHS = RHS; + if (ctx.constraintDefinition() != null) { + RHS = null;// clean RHS, so it doesnt mess with visitConstraintDefinition + visitConstraintDefinition(ctx.constraintDefinition()); + LHS = RHS; + RHS = tempRHS;// restoring previous RHS + } else if (ctx.name() != null) { + LHS = new Literal(ctx.name().getText()); + } + if (ctx.unaryOp(0) != null) {// only "not" is currently present in the grammar + LHS = new Not(LHS); + } + return null; + } + + @Override + public Void visitAttribute(VelvetParser.AttributeContext ctx) { + + String name; + if (ctx.floatAttribute() != null) { + // pass + } else if (ctx.intAttribute() != null) { + name = ctx.intAttribute().name().getText(); + data.getExtFeatureModel().addAttribute(currentParentFeature.getName(), name, Integer.parseInt(ctx.intAttribute().INT().getText())); + } else if (ctx.boolAttribute() != null) { + name = ctx.boolAttribute().name().getText(); + data.getExtFeatureModel().addAttribute(currentParentFeature.getName(), name, Boolean.parseBoolean(ctx.boolAttribute().BOOLEAN().getText())); + } else if (ctx.stringAttribute() != null) { + name = ctx.stringAttribute().name().getText(); + data.getExtFeatureModel().addAttribute(currentParentFeature.getName(), name, ctx.stringAttribute().STRING().getText()); + } else { + reportSyntaxError(ctx); + } + return null; + + } + + private void reportSyntaxError(ParserRuleContext context) throws RecognitionException { + // maybe it should be in SimpleVelvetModelFormat + final RecognitionException ex = new RecognitionException(null, null, context); + throw ex; + } + + @Override + public Void visitAttributeConstraint(VelvetParser.AttributeConstraintContext ctx) { + weightedTerms = new LinkedList<>(); + weightedTerms.clear(); + degree = 0; + relationOperator = null; + if (!ctx.attribNumExpr().isEmpty()) { + final AttribNumExprContext one = ctx.attribNumExpr().getFirst(); + final AttribNumExprContext two = ctx.attribNumExpr().getLast(); + visitAttribNumExpr(one); + if (ctx.attribRelation() != null) { + visitAttribRelation(ctx.attribRelation()); + } + visitAttribNumExpr(two); + + } + final Equation equation = new Equation(weightedTerms, relationOperator, degree); + data.getExtFeatureModel().addAttributeConstraint(equation); + return null; + } + + @Override + public Void visitAttribNumExpr(VelvetParser.AttribNumExprContext ctx) { + boolean minus = false; + int i = 0; + do { + if ((ctx.attribOperator(i - 1) != null) && (i > 0)) { + if (ctx.attribOperator(i - 1).PLUS() != null) { + minus = false; + } else if (ctx.attribOperator(i - 1).MINUS() != null) { + minus = true; + } + } + if (ctx.attribNumInstance(i).INT() != null) { + final int value = Integer.parseInt(ctx.attribNumInstance(i).INT().getText()); + if ((relationOperator == null) ^ minus) { + degree -= value; + } else { + degree += value; + } + weightedTerms.add(createTerm(value, relationOperator != null, minus, + new Reference(currentParentFeature.getName(), ReferenceType.FEATURE, "attributeName"))); + } else if (ctx.attribNumInstance(i).name() != null) { + final String attributeName = ctx.attribNumInstance(i).name().getText(); + final Collection> attributes = data.getExtFeatureModel().getIntegerAttributes().getAttributes(attributeName); + + if (attributes == null) { + // throw new UnsupportedModelException(ctx.getStart().getLine() + ":" + "NO_SUCH_ATTRIBUTE_DEFINED", ctx.getStart().getLine()); + return null; + } + for (final FeatureAttribute attr : attributes) { + weightedTerms.add(createTerm(attr.getValue(), relationOperator != null, minus, + new Reference(attr.getFeatureName(), ReferenceType.FEATURE, attributeName))); + } + } + i++; + } while (i <= ctx.attribOperator().size()); + + return null; + } + + @Override + public Void visitDescription(VelvetParser.DescriptionContext ctx) { + return null; + } + + @Override + public Void visitAttribOperator(VelvetParser.AttribOperatorContext ctx) { + return null; + } + + @Override + public Void visitAttribNumInstance(VelvetParser.AttribNumInstanceContext ctx) { + return null; + } + + @Override + public Void visitName(VelvetParser.NameContext ctx) { + return null; + } + + @Override + public Void visitIntAttribute(VelvetParser.IntAttributeContext ctx) { + return null; + } + + @Override + public Void visitFloatAttribute(VelvetParser.FloatAttributeContext ctx) { + return null; + } + + @Override + public Void visitStringAttribute(VelvetParser.StringAttributeContext ctx) { + return null; + } + + @Override + public Void visitBoolAttribute(VelvetParser.BoolAttributeContext ctx) { + return null; + } + + @Override + public Void visitUnaryOp(VelvetParser.UnaryOpContext ctx) { + return null; + } + + @Override + public Void visitBinaryOp(VelvetParser.BinaryOpContext ctx) { + + return null; + } + + @Override + public Void visitAttribRelation(VelvetParser.AttribRelationContext ctx) { + if (ctx.ATTR_OP_EQUALS() != null) { + relationOperator = RelationOperator.EQUAL; + + } else if (ctx.ATTR_OP_GREATER_EQ() != null) { + relationOperator = RelationOperator.GREATER_EQUAL; + + } else if (ctx.ATTR_OP_LESS_EQ() != null) { + relationOperator = RelationOperator.LESS_EQUAL; + + } + return null; + } + +} diff --git a/plugins/de.ovgu.featureide.fm.ui/.classpath b/plugins/de.ovgu.featureide.fm.ui/.classpath index c22620bde4..b3086bd822 100644 --- a/plugins/de.ovgu.featureide.fm.ui/.classpath +++ b/plugins/de.ovgu.featureide.fm.ui/.classpath @@ -1,8 +1,8 @@ - + - + - + diff --git a/plugins/de.ovgu.featureide.fm.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.fm.ui/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.fm.ui/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.fm.ui/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.fm.ui/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.fm.ui/META-INF/MANIFEST.MF index 5b9dca0883..4eae658102 100644 --- a/plugins/de.ovgu.featureide.fm.ui/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.fm.ui/META-INF/MANIFEST.MF @@ -16,9 +16,10 @@ Require-Bundle: org.eclipse.gef, org.eclipse.core.expressions, org.eclipse.core.resources, - de.ovgu.featureide.fm.core + de.ovgu.featureide.fm.core, + org.eclipse.draw2d Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Vendor: University of Magdeburg Export-Package: de.ovgu.featureide.fm.ui, de.ovgu.featureide.fm.ui.editors; diff --git a/plugins/de.ovgu.featureide.fm.ui/src/de/ovgu/featureide/fm/ui/editors/FeatureUIHelper.java b/plugins/de.ovgu.featureide.fm.ui/src/de/ovgu/featureide/fm/ui/editors/FeatureUIHelper.java index 9666fc46c8..84bbc58f25 100644 --- a/plugins/de.ovgu.featureide.fm.ui/src/de/ovgu/featureide/fm/ui/editors/FeatureUIHelper.java +++ b/plugins/de.ovgu.featureide.fm.ui/src/de/ovgu/featureide/fm/ui/editors/FeatureUIHelper.java @@ -29,8 +29,8 @@ import org.eclipse.draw2d.geometry.Point; import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.gef.EditPartViewer; import org.eclipse.draw2d.zoom.ZoomListener; +import org.eclipse.gef.EditPartViewer; import org.eclipse.gef.editparts.ZoomManager; import de.ovgu.featureide.fm.core.base.FeatureUtils; @@ -48,7 +48,7 @@ * @author Christian Kaestner * @author Martha Nyerembe * @author Lukas Vogt - * @author Malte Grave + * @author Malte Grave VaSiCS LIT CPS */ public class FeatureUIHelper { @@ -184,8 +184,9 @@ public static void setZoomManager(ZoomManager zoomManager) { zoomManager.addZoomListener(new ZoomListener() { @Override - public void zoomChanged(double newZoomFactor) { - FeatureUIHelper.zoomFactor = newZoomFactor; + public void zoomChanged(double newZoomLevel) { + FeatureUIHelper.zoomFactor = newZoomLevel; + } }); } diff --git a/plugins/de.ovgu.featureide.fm.ui/src/de/ovgu/featureide/fm/ui/editors/featuremodel/commands/renaming/FeatureLabelEditManager.java b/plugins/de.ovgu.featureide.fm.ui/src/de/ovgu/featureide/fm/ui/editors/featuremodel/commands/renaming/FeatureLabelEditManager.java index ef7fca7897..44be87df4f 100644 --- a/plugins/de.ovgu.featureide.fm.ui/src/de/ovgu/featureide/fm/ui/editors/featuremodel/commands/renaming/FeatureLabelEditManager.java +++ b/plugins/de.ovgu.featureide.fm.ui/src/de/ovgu/featureide/fm/ui/editors/featuremodel/commands/renaming/FeatureLabelEditManager.java @@ -55,7 +55,7 @@ * @author Florian Proksch * @author Stefan Krueger * @author Marcus Pinnecke - * @author Malte Grave + * @author Malte Grave VaSiCS LIT CPS */ public class FeatureLabelEditManager extends DirectEditManager implements GUIDefaults { diff --git a/plugins/de.ovgu.featureide.migration/.classpath b/plugins/de.ovgu.featureide.migration/.classpath index eca7bdba8f..375961e4d6 100644 --- a/plugins/de.ovgu.featureide.migration/.classpath +++ b/plugins/de.ovgu.featureide.migration/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.migration/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.migration/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.migration/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.migration/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.migration/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.migration/META-INF/MANIFEST.MF index bfcc26a33b..6144c5dd16 100644 --- a/plugins/de.ovgu.featureide.migration/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.migration/META-INF/MANIFEST.MF @@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.ui, de.ovgu.featureide.core, de.ovgu.featureide.ui Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: de.ovgu.featureide.migration.impl, de.ovgu.featureide.ui.migration.plugin, de.ovgu.featureide.ui.migration.wizard diff --git a/plugins/de.ovgu.featureide.ui.android/.classpath b/plugins/de.ovgu.featureide.ui.android/.classpath index eca7bdba8f..375961e4d6 100644 --- a/plugins/de.ovgu.featureide.ui.android/.classpath +++ b/plugins/de.ovgu.featureide.ui.android/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.ui.android/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.ui.android/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.ui.android/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.ui.android/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.ui.android/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.ui.android/META-INF/MANIFEST.MF index 1d2327fdc9..22fb5f3543 100644 --- a/plugins/de.ovgu.featureide.ui.android/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.ui.android/META-INF/MANIFEST.MF @@ -14,7 +14,7 @@ Require-Bundle: org.eclipse.ui, de.ovgu.featureide.core.munge.android, org.eclipse.ui.ide Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: de.ovgu.featureide.ui.android, de.ovgu.featureide.ui.android.handlers, de.ovgu.featureide.ui.android.wizards diff --git a/plugins/de.ovgu.featureide.ui.mpl/.classpath b/plugins/de.ovgu.featureide.ui.mpl/.classpath index eca7bdba8f..375961e4d6 100644 --- a/plugins/de.ovgu.featureide.ui.mpl/.classpath +++ b/plugins/de.ovgu.featureide.ui.mpl/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.ui.mpl/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.ui.mpl/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.ui.mpl/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.ui.mpl/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.ui.mpl/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.ui.mpl/META-INF/MANIFEST.MF index 92155197c1..aef5f5f082 100644 --- a/plugins/de.ovgu.featureide.ui.mpl/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.ui.mpl/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: FeatureIDE UI Plug-In for Multi Product Lines Bundle-SymbolicName: de.ovgu.featureide.ui.mpl;singleton:=true Bundle-Version: 3.11.1.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: de.ovgu.featureide.core, de.ovgu.featureide.core.mpl, de.ovgu.featureide.fm.core, diff --git a/plugins/de.ovgu.featureide.ui/.classpath b/plugins/de.ovgu.featureide.ui/.classpath index f6fd6cbfee..48871556a2 100644 --- a/plugins/de.ovgu.featureide.ui/.classpath +++ b/plugins/de.ovgu.featureide.ui/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.ui/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/plugins/de.ovgu.featureide.ui/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.ui/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/plugins/de.ovgu.featureide.ui/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.ui/META-INF/MANIFEST.MF index d044315742..60f3dc03dd 100644 --- a/plugins/de.ovgu.featureide.ui/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.ui/META-INF/MANIFEST.MF @@ -22,7 +22,7 @@ Require-Bundle: org.eclipse.core.expressions, Bundle-ActivationPolicy: lazy Bundle-ClassPath: lib/FeatureIDEAnnotations.jar, . -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Vendor: University of Magdeburg Export-Package: de.ovgu.featureide, diff --git a/plugins/de.ovgu.featureide.visualisation/.classpath b/plugins/de.ovgu.featureide.visualisation/.classpath index eca7bdba8f..375961e4d6 100644 --- a/plugins/de.ovgu.featureide.visualisation/.classpath +++ b/plugins/de.ovgu.featureide.visualisation/.classpath @@ -1,6 +1,6 @@ - + diff --git a/plugins/de.ovgu.featureide.visualisation/.settings/org.eclipse.jdt.core.prefs b/plugins/de.ovgu.featureide.visualisation/.settings/org.eclipse.jdt.core.prefs index c5a0ba0b79..659aa34ca4 100644 --- a/plugins/de.ovgu.featureide.visualisation/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/de.ovgu.featureide.visualisation/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,13 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false diff --git a/plugins/de.ovgu.featureide.visualisation/META-INF/MANIFEST.MF b/plugins/de.ovgu.featureide.visualisation/META-INF/MANIFEST.MF index d533ae9cee..eeae167634 100644 --- a/plugins/de.ovgu.featureide.visualisation/META-INF/MANIFEST.MF +++ b/plugins/de.ovgu.featureide.visualisation/META-INF/MANIFEST.MF @@ -9,7 +9,7 @@ Require-Bundle: org.eclipse.ui, org.eclipse.core.resources, de.ovgu.featureide.core, de.ovgu.featureide.fm.core -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy Automatic-Module-Name: de.ovgu.featureide.visualisation Export-Package: de.ovgu.featureide.visualisation, diff --git a/pom.xml b/pom.xml index 83e45d1b12..d871078a4c 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,5 @@ - 4.0.0 de.ovgu.featureide @@ -7,11 +8,11 @@ pom - 4.0.10 - 4.0.10 + 4.0.13 + 4.0.13 UTF-8 - 1.8 - 1.8 + 21 + 21 @@ -33,13 +34,10 @@ plugins/de.ovgu.featureide.core.images plugins/de.ovgu.featureide.core.mpl plugins/de.ovgu.featureide.core.munge - plugins/de.ovgu.featureide.core.munge.android plugins/de.ovgu.featureide.core.runtime - plugins/de.ovgu.featureide.examples plugins/de.ovgu.featureide.migration - plugins/de.ovgu.featureide.ui.android plugins/de.ovgu.featureide.ui.mpl - + tests/de.ovgu.featureide.fm.core-test tests/de.ovgu.featureide.fm.ui-test @@ -52,47 +50,56 @@ tests/de.ovgu.featureide.fm.attributes-test - - nu - - false - - - deploy - - - - gui - - false - - - gui-tests/de.ovgu.featureide.fm.gui-test - - - + nu + + false + + + deploy/br.ufal.ic.colligens.feature + deploy/de.ovgu.featureide.featurecpp + deploy/de.ovgu.featureide.featurehouse + deploy/de.ovgu.featureide + deploy/de.ovgu.featureide.ahead + deploy/de.ovgu.featureide.antenna + deploy/de.ovgu.featureide.aspectj + deploy/de.ovgu.featureide.featuremodeling + deploy/de.ovgu.featureide.munge + deploy/NightlyUpdate + + + + gui + + false + + + gui-tests/de.ovgu.featureide.fm.gui-test + + + + deprecated-build + + false + + + deploy + plugins/de.ovgu.featureide.examples + plugins/de.ovgu.featureide.ui.android + plugins/de.ovgu.featureide.core.munge.android + + + - - org.apache.maven.plugins - maven-javadoc-plugin - 3.1.1 - - ${project.basedir}/../Javadoc - ${project.name} - true - none - false - - - org.eclipse.tycho tycho-maven-plugin @@ -122,6 +129,11 @@ cocoa x86_64 + + macosx + cocoa + aarch64 + @@ -189,9 +201,7 @@ maven-resources-plugin - - [2.4.3,) - + [3.3.1,) resources testResources @@ -209,9 +219,7 @@ tycho-compiler-plugin - - [0.23.1,) - + [3.0.0,] compile @@ -228,9 +236,7 @@ tycho-packaging-plugin - - [0.23.1,) - + [3.0.0,] build-qualifier build-qualifier-aggregator @@ -253,6 +259,19 @@ + + org.apache.maven.plugins + maven-javadoc-plugin + 3.11.2 + + ${project.basedir}/../Javadoc + ${project.name} + true + none + false + + + org.jacoco jacoco-maven-plugin @@ -270,12 +289,9 @@ - 2024-12 - http://download.eclipse.org/releases/2024-12 + 2025-06 + http://download.eclipse.org/releases/2025-06 p2 - - - diff --git a/tests/de.ovgu.featureide.core.ahead-test/.classpath b/tests/de.ovgu.featureide.core.ahead-test/.classpath index eca7bdba8f..375961e4d6 100644 --- a/tests/de.ovgu.featureide.core.ahead-test/.classpath +++ b/tests/de.ovgu.featureide.core.ahead-test/.classpath @@ -1,6 +1,6 @@ - + diff --git a/tests/de.ovgu.featureide.core.ahead-test/.settings/org.eclipse.jdt.core.prefs b/tests/de.ovgu.featureide.core.ahead-test/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/tests/de.ovgu.featureide.core.ahead-test/.settings/org.eclipse.jdt.core.prefs +++ b/tests/de.ovgu.featureide.core.ahead-test/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/tests/de.ovgu.featureide.core.ahead-test/META-INF/MANIFEST.MF b/tests/de.ovgu.featureide.core.ahead-test/META-INF/MANIFEST.MF index 7f4de9a356..1090588f56 100644 --- a/tests/de.ovgu.featureide.core.ahead-test/META-INF/MANIFEST.MF +++ b/tests/de.ovgu.featureide.core.ahead-test/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-Name: AHEAD Test Fragment Bundle-SymbolicName: de.ovgu.featureide.core.ahead-test;singleton:=true Bundle-Version: 3.11.1.qualifier Fragment-Host: de.ovgu.featureide.core.conversion.ahead-featurehouse -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Vendor: University of Magdeburg Require-Bundle: org.junit Automatic-Module-Name: de.ovgu.featureide.core.ahead-test diff --git a/tests/de.ovgu.featureide.core.ahead-test/pom.xml b/tests/de.ovgu.featureide.core.ahead-test/pom.xml index 0a436df10f..aadd279f22 100644 --- a/tests/de.ovgu.featureide.core.ahead-test/pom.xml +++ b/tests/de.ovgu.featureide.core.ahead-test/pom.xml @@ -8,6 +8,5 @@ ../../pom.xml de.ovgu.featureide.core.ahead-test - 3.11.1-SNAPSHOT eclipse-test-plugin \ No newline at end of file diff --git a/tests/de.ovgu.featureide.core.antenna-test/.classpath b/tests/de.ovgu.featureide.core.antenna-test/.classpath index 4f83b2397e..108c08688d 100644 --- a/tests/de.ovgu.featureide.core.antenna-test/.classpath +++ b/tests/de.ovgu.featureide.core.antenna-test/.classpath @@ -2,6 +2,6 @@ - + diff --git a/tests/de.ovgu.featureide.core.antenna-test/.settings/org.eclipse.jdt.core.prefs b/tests/de.ovgu.featureide.core.antenna-test/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/tests/de.ovgu.featureide.core.antenna-test/.settings/org.eclipse.jdt.core.prefs +++ b/tests/de.ovgu.featureide.core.antenna-test/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/tests/de.ovgu.featureide.core.antenna-test/META-INF/MANIFEST.MF b/tests/de.ovgu.featureide.core.antenna-test/META-INF/MANIFEST.MF index 66b709827e..0f3550364c 100644 --- a/tests/de.ovgu.featureide.core.antenna-test/META-INF/MANIFEST.MF +++ b/tests/de.ovgu.featureide.core.antenna-test/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-Name: Antenna Test Fragment Bundle-SymbolicName: de.ovgu.featureide.core.antenna-test;singleton:=true Bundle-Version: 3.11.1.qualifier Fragment-Host: de.ovgu.featureide.core.antenna -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Vendor: University of Magdeburg Require-Bundle: org.junit Automatic-Module-Name: de.ovgu.featureide.core.antenna-test diff --git a/tests/de.ovgu.featureide.core.aspectj-test/.classpath b/tests/de.ovgu.featureide.core.aspectj-test/.classpath index eca7bdba8f..375961e4d6 100644 --- a/tests/de.ovgu.featureide.core.aspectj-test/.classpath +++ b/tests/de.ovgu.featureide.core.aspectj-test/.classpath @@ -1,6 +1,6 @@ - + diff --git a/tests/de.ovgu.featureide.core.aspectj-test/.settings/org.eclipse.jdt.core.prefs b/tests/de.ovgu.featureide.core.aspectj-test/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/tests/de.ovgu.featureide.core.aspectj-test/.settings/org.eclipse.jdt.core.prefs +++ b/tests/de.ovgu.featureide.core.aspectj-test/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/tests/de.ovgu.featureide.core.aspectj-test/META-INF/MANIFEST.MF b/tests/de.ovgu.featureide.core.aspectj-test/META-INF/MANIFEST.MF index 0d3d9b5363..38ae552fa5 100644 --- a/tests/de.ovgu.featureide.core.aspectj-test/META-INF/MANIFEST.MF +++ b/tests/de.ovgu.featureide.core.aspectj-test/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-Name: AspectJ Test Fragment Bundle-SymbolicName: de.ovgu.featureide.core.aspectj-test;singleton:=true Bundle-Version: 3.11.1.qualifier Fragment-Host: de.ovgu.featureide.core.aspectj -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Vendor: University of Magdeburg Require-Bundle: org.junit Automatic-Module-Name: de.ovgu.featureide.core.aspectj-test diff --git a/tests/de.ovgu.featureide.core.featurehouse-test/.classpath b/tests/de.ovgu.featureide.core.featurehouse-test/.classpath index 4f83b2397e..108c08688d 100644 --- a/tests/de.ovgu.featureide.core.featurehouse-test/.classpath +++ b/tests/de.ovgu.featureide.core.featurehouse-test/.classpath @@ -2,6 +2,6 @@ - + diff --git a/tests/de.ovgu.featureide.core.featurehouse-test/.settings/org.eclipse.jdt.core.prefs b/tests/de.ovgu.featureide.core.featurehouse-test/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/tests/de.ovgu.featureide.core.featurehouse-test/.settings/org.eclipse.jdt.core.prefs +++ b/tests/de.ovgu.featureide.core.featurehouse-test/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/tests/de.ovgu.featureide.core.featurehouse-test/META-INF/MANIFEST.MF b/tests/de.ovgu.featureide.core.featurehouse-test/META-INF/MANIFEST.MF index 34d8ed1e98..f370fe1531 100644 --- a/tests/de.ovgu.featureide.core.featurehouse-test/META-INF/MANIFEST.MF +++ b/tests/de.ovgu.featureide.core.featurehouse-test/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-Name: FeatureHouse Test Fragment Bundle-SymbolicName: de.ovgu.featureide.core.featurehouse-test;singleton:=true Bundle-Version: 3.11.1.qualifier Fragment-Host: de.ovgu.featureide.core.featurehouse -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Vendor: University of Magdeburg Require-Bundle: org.junit Import-Package: com.sun.tools.classfile diff --git a/tests/de.ovgu.featureide.core.munge-test/.classpath b/tests/de.ovgu.featureide.core.munge-test/.classpath index eca7bdba8f..375961e4d6 100644 --- a/tests/de.ovgu.featureide.core.munge-test/.classpath +++ b/tests/de.ovgu.featureide.core.munge-test/.classpath @@ -1,6 +1,6 @@ - + diff --git a/tests/de.ovgu.featureide.core.munge-test/.settings/org.eclipse.jdt.core.prefs b/tests/de.ovgu.featureide.core.munge-test/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/tests/de.ovgu.featureide.core.munge-test/.settings/org.eclipse.jdt.core.prefs +++ b/tests/de.ovgu.featureide.core.munge-test/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/tests/de.ovgu.featureide.core.munge-test/META-INF/MANIFEST.MF b/tests/de.ovgu.featureide.core.munge-test/META-INF/MANIFEST.MF index a27e818ebe..cf76753365 100644 --- a/tests/de.ovgu.featureide.core.munge-test/META-INF/MANIFEST.MF +++ b/tests/de.ovgu.featureide.core.munge-test/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-Name: Munge Test Fragment Bundle-SymbolicName: de.ovgu.featureide.core.munge-test;singleton:=true Bundle-Version: 3.11.1.qualifier Fragment-Host: de.ovgu.featureide.core.munge -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Vendor: University of Magdeburg Require-Bundle: org.junit Automatic-Module-Name: de.ovgu.featureide.core.munge-test diff --git a/tests/de.ovgu.featureide.fm.attributes-test/.classpath b/tests/de.ovgu.featureide.fm.attributes-test/.classpath index eca7bdba8f..375961e4d6 100644 --- a/tests/de.ovgu.featureide.fm.attributes-test/.classpath +++ b/tests/de.ovgu.featureide.fm.attributes-test/.classpath @@ -1,6 +1,6 @@ - + diff --git a/tests/de.ovgu.featureide.fm.attributes-test/.settings/org.eclipse.jdt.core.prefs b/tests/de.ovgu.featureide.fm.attributes-test/.settings/org.eclipse.jdt.core.prefs index c5a0ba0b79..659aa34ca4 100644 --- a/tests/de.ovgu.featureide.fm.attributes-test/.settings/org.eclipse.jdt.core.prefs +++ b/tests/de.ovgu.featureide.fm.attributes-test/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,13 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false diff --git a/tests/de.ovgu.featureide.fm.attributes-test/META-INF/MANIFEST.MF b/tests/de.ovgu.featureide.fm.attributes-test/META-INF/MANIFEST.MF index 202b89497d..128234f691 100644 --- a/tests/de.ovgu.featureide.fm.attributes-test/META-INF/MANIFEST.MF +++ b/tests/de.ovgu.featureide.fm.attributes-test/META-INF/MANIFEST.MF @@ -6,5 +6,5 @@ Bundle-Version: 3.11.1.qualifier Bundle-Vendor: University of Magdeburg Fragment-Host: de.ovgu.featureide.fm.attributes Automatic-Module-Name: de.ovgu.featureide.fm.attributes-test -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: org.junit diff --git a/tests/de.ovgu.featureide.fm.core-test/.classpath b/tests/de.ovgu.featureide.fm.core-test/.classpath index 53fc6a4885..51412e9925 100644 --- a/tests/de.ovgu.featureide.fm.core-test/.classpath +++ b/tests/de.ovgu.featureide.fm.core-test/.classpath @@ -1,6 +1,6 @@ - + diff --git a/tests/de.ovgu.featureide.fm.core-test/.settings/org.eclipse.jdt.core.prefs b/tests/de.ovgu.featureide.fm.core-test/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/tests/de.ovgu.featureide.fm.core-test/.settings/org.eclipse.jdt.core.prefs +++ b/tests/de.ovgu.featureide.fm.core-test/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/tests/de.ovgu.featureide.fm.core-test/META-INF/MANIFEST.MF b/tests/de.ovgu.featureide.fm.core-test/META-INF/MANIFEST.MF index dfc8465c2f..51343d958f 100644 --- a/tests/de.ovgu.featureide.fm.core-test/META-INF/MANIFEST.MF +++ b/tests/de.ovgu.featureide.fm.core-test/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-Name: Feature Model Core Test Fragment Bundle-SymbolicName: de.ovgu.featureide.fm.core-test;singleton:=true Bundle-Version: 3.11.1.qualifier Fragment-Host: de.ovgu.featureide.fm.core -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Vendor: University of Magdeburg Require-Bundle: org.junit Bundle-ClassPath: ., diff --git a/tests/de.ovgu.featureide.fm.ui-test/.classpath b/tests/de.ovgu.featureide.fm.ui-test/.classpath index eca7bdba8f..375961e4d6 100644 --- a/tests/de.ovgu.featureide.fm.ui-test/.classpath +++ b/tests/de.ovgu.featureide.fm.ui-test/.classpath @@ -1,6 +1,6 @@ - + diff --git a/tests/de.ovgu.featureide.fm.ui-test/.settings/org.eclipse.jdt.core.prefs b/tests/de.ovgu.featureide.fm.ui-test/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/tests/de.ovgu.featureide.fm.ui-test/.settings/org.eclipse.jdt.core.prefs +++ b/tests/de.ovgu.featureide.fm.ui-test/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/tests/de.ovgu.featureide.fm.ui-test/META-INF/MANIFEST.MF b/tests/de.ovgu.featureide.fm.ui-test/META-INF/MANIFEST.MF index cc540ffa3c..a58c200424 100644 --- a/tests/de.ovgu.featureide.fm.ui-test/META-INF/MANIFEST.MF +++ b/tests/de.ovgu.featureide.fm.ui-test/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-Name: Feature Model UI Test Fragment Bundle-SymbolicName: de.ovgu.featureide.fm.ui-test;singleton:=true Bundle-Version: 3.11.1.qualifier Fragment-Host: de.ovgu.featureide.fm.ui -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Vendor: University of Magdeburg Require-Bundle: org.junit Automatic-Module-Name: de.ovgu.featureide.fm.ui-test diff --git a/tests/de.ovgu.featureide.ui-test/.classpath b/tests/de.ovgu.featureide.ui-test/.classpath index fbf5ac5fe1..029d348948 100644 --- a/tests/de.ovgu.featureide.ui-test/.classpath +++ b/tests/de.ovgu.featureide.ui-test/.classpath @@ -1,6 +1,6 @@ - + diff --git a/tests/de.ovgu.featureide.ui-test/.settings/org.eclipse.jdt.core.prefs b/tests/de.ovgu.featureide.ui-test/.settings/org.eclipse.jdt.core.prefs index 45dc6d6ce5..aaa1bad0e2 100644 --- a/tests/de.ovgu.featureide.ui-test/.settings/org.eclipse.jdt.core.prefs +++ b/tests/de.ovgu.featureide.ui-test/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,18 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false @@ -23,7 +26,6 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=20 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 @@ -144,7 +146,6 @@ org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert @@ -215,7 +216,6 @@ org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert @@ -360,7 +360,6 @@ org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true diff --git a/tests/de.ovgu.featureide.ui-test/META-INF/MANIFEST.MF b/tests/de.ovgu.featureide.ui-test/META-INF/MANIFEST.MF index f66e708b92..3bfb3c0419 100644 --- a/tests/de.ovgu.featureide.ui-test/META-INF/MANIFEST.MF +++ b/tests/de.ovgu.featureide.ui-test/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-Name: FeatureIDE UI Test Fragment Bundle-SymbolicName: de.ovgu.featureide.ui-test;singleton:=true Bundle-Version: 3.11.1.qualifier Fragment-Host: de.ovgu.featureide.ui -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Vendor: University of Magdeburg Require-Bundle: org.junit Automatic-Module-Name: de.ovgu.featureide.ui-test