Skip to content

Conversation

SimonOsterheider
Copy link

@SimonOsterheider SimonOsterheider commented Feb 28, 2025

Description

Adapted the FeatureModelLexer to parse "xor", "or" and "?" tokens (The implementation is a bit clunky as we parsed the letters individually, as searching for the whole token did not work at first, but seems to work for other groups).
Modified FeatureModel.bnf to allow a ? token after every featurename and allow an or/xor to be used with at least to featurenames after it.
Modified FeatureModelHighlighter.flex to parse xor, or and ? tokens.
Added different colors in FeatureModelSyntaxHighlighter.java for the operator

Related Issue

#42

Motivation and Context

Extend the feature modelling language to allow a feature to be marked as optional and allow multiple features to be grouped by an or, or xor to follow Clafer definition.

How Has This Been Tested?

  • Tests are created and passing
  • Manual testing
    We tested it by adding multiple nested or and xor statements and optionality tokens in the snake project and see if any errors occured

Demo:

feature_modelling.mp4

Types of changes

  • Pipeline changes
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • I have updated the CONTRIBUTORS file.
  • I have updated the CHANGELOG.

@SimonOsterheider SimonOsterheider changed the title Feature modelling Feature modelling language add support for xor, or and ? Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant