Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major refactoring of metamodel #5

Merged
merged 15 commits into from
Jan 22, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Language levels for arithmetic constraints are now correctly tracked
  • Loading branch information
SundermannC committed Aug 5, 2024
commit faecbfa68a0463665e96273446ba16cbaab6b4d6
8 changes: 7 additions & 1 deletion src/main/java/de/vill/main/UVLListener.java
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@
import org.antlr.v4.runtime.Token;

public class UVLListener extends UVLJavaBaseListener {
FeatureModelBuilder fmBuilder = new FeatureModelBuilder();
public FeatureModelBuilder fmBuilder = new FeatureModelBuilder();
private Set<LanguageLevel> importedLanguageLevels = new HashSet<>(Arrays.asList(LanguageLevel.BOOLEAN_LEVEL));
private Stack<Feature> featureStack = new Stack<>();
private Stack<Group> groupStack = new Stack<>();
@@ -389,6 +389,7 @@ public void exitEqualEquation(UVLJavaParser.EqualEquationContext ctx) {
Token t = ctx.getStart();
int line = t.getLine();
constraint.setLineNumber(line);
fmBuilder.addLanguageLevel(LanguageLevel.ARITHMETIC_LEVEL);
}

@Override
@@ -400,6 +401,7 @@ public void exitLowerEquation(UVLJavaParser.LowerEquationContext ctx) {
Token t = ctx.getStart();
int line = t.getLine();
constraint.setLineNumber(line);
fmBuilder.addLanguageLevel(LanguageLevel.ARITHMETIC_LEVEL);
}

@Override
@@ -411,6 +413,7 @@ public void exitGreaterEquation(UVLJavaParser.GreaterEquationContext ctx) {
Token t = ctx.getStart();
int line = t.getLine();
constraint.setLineNumber(line);
fmBuilder.addLanguageLevel(LanguageLevel.ARITHMETIC_LEVEL);
}

@Override
@@ -422,6 +425,7 @@ public void exitLowerEqualsEquation(UVLJavaParser.LowerEqualsEquationContext ctx
Token t = ctx.getStart();
int line = t.getLine();
constraint.setLineNumber(line);
fmBuilder.addLanguageLevel(LanguageLevel.ARITHMETIC_LEVEL);
}

@Override
@@ -433,6 +437,7 @@ public void exitGreaterEqualsEquation(UVLJavaParser.GreaterEqualsEquationContext
Token t = ctx.getStart();
int line = t.getLine();
constraint.setLineNumber(line);
fmBuilder.addLanguageLevel(LanguageLevel.ARITHMETIC_LEVEL);
}

@Override
@@ -444,6 +449,7 @@ public void exitNotEqualsEquation(UVLJavaParser.NotEqualsEquationContext ctx) {
Token t = ctx.getStart();
int line = t.getLine();
constraint.setLineNumber(line);
fmBuilder.addLanguageLevel(LanguageLevel.ARITHMETIC_LEVEL);
}

@Override