Class SubrulesUseInterfaceNTs

java.lang.Object
de.monticore.grammar.cocos.SubrulesUseInterfaceNTs
All Implemented Interfaces:
GrammarASTMCGrammarCoCo, GrammarVisitor2, de.monticore.visitor.IVisitor

public class SubrulesUseInterfaceNTs extends Object implements GrammarASTMCGrammarCoCo
Checks that the productions, which implement an interface, use the non-terminals of that interface.
  • Field Details

  • Constructor Details

    • SubrulesUseInterfaceNTs

      public SubrulesUseInterfaceNTs()
  • Method Details

    • check

      public void check(ASTMCGrammar a)
      Specified by:
      check in interface GrammarASTMCGrammarCoCo
    • compareWithSuperProd

      protected void compareWithSuperProd(MCGrammarSymbol grammarSymbol, ProdSymbol prodSymbol, ProdSymbol interfaceSymbol)
      used when the Prod which implements the interface is overwriting a prod from a super grammar only when the overwriting prod is not specifying a right side (no RuleComponents) e.g. grammar A { B = Name;} grammar C { interface I = Name; B implements I;}
    • compareComponents

      protected void compareComponents(ProdSymbol prodSymbol, ProdSymbol interfaceSymbol)
    • logError

      protected void logError(ProdSymbol prodSymbol, ProdSymbol interfaceSymbol, RuleComponentSymbol interfaceComponent)