Interface IGrammarConstraintProvider

All Known Implementing Classes:

public interface IGrammarConstraintProvider

Based on an Xtext grammar, the IGrammarConstraintProvider provides constraints that the semantic model must comply with. The structure of the constraints is as follows:

 \- 0..n IConstraintContext (one for each ParserRule and AssignedAction) 
    \- 1..n IConstraint (one for each EClass) 
       \- tree IConstraintElement (one for each relevant Group, Alternative, RuleCall and assigned Keyword)

Moritz Eysholdt - Initial contribution and API

Nested Class Summary
static class IGrammarConstraintProvider.ConstraintElementType
          The ConstraintElementType distinguishes different kinds of IGrammarConstraintProvider.IConstraintElement
static interface IGrammarConstraintProvider.IConstraint
          One constraint defines all conditions one semantic object must comply with.
static interface IGrammarConstraintProvider.IConstraintContext
          A ConstraintContext is defined by a ParserRule or an AssignedAction.
static interface IGrammarConstraintProvider.IConstraintElement
          IConstraintElements form a tree that is in fact a view on the grammar's AbstractElements.
static interface IGrammarConstraintProvider.IFeatureInfo
static class IGrammarConstraintProvider.RelationalDependencyType
Field Summary
static int MAX
Method Summary
 java.util.List<IGrammarConstraintProvider.IConstraintContext> getConstraints(Grammar context)
          Returns all constraints form this grammar.

Field Detail


static final int MAX
See Also:
Constant Field Values
Method Detail


java.util.List<IGrammarConstraintProvider.IConstraintContext> getConstraints(Grammar context)
Returns all constraints form this grammar. If a constraint belongs to multiple ConstraintContexts, it is important to call this method to ensure there is inly one instance fo this constraint.