Class BitExpressionsMill

java.lang.Object
de.monticore.expressions.bitexpressions.BitExpressionsMill
Direct Known Subclasses:
BitExpressionsMillForGrammar_WithConcepts

public class BitExpressionsMill extends Object
The mill is a factory for builders and other commonly used functions, such as parsers or visitors. The mill was introduced to ensure compositionality of languages, while retaining reusability of functions developed for sublanguages. Only one mill instance exists, even though in composed languages it is available under several static signatures.
  • Field Details

  • Constructor Details

    • BitExpressionsMill

      protected BitExpressionsMill()
  • Method Details

    • getMill

      public static BitExpressionsMill getMill()
    • init

      public static void init()
      Initializes a languages Mill. This will also initialize the Mills of all languages it depends on. This ensures that all objects of this mill, such as builders, traversers, scopes, ..., deliver the element of the correct language.
    • leftShiftExpressionBuilder

      public static ASTLeftShiftExpressionBuilder leftShiftExpressionBuilder()
    • _leftShiftExpressionBuilder

      protected ASTLeftShiftExpressionBuilder _leftShiftExpressionBuilder()
    • rightShiftExpressionBuilder

      public static ASTRightShiftExpressionBuilder rightShiftExpressionBuilder()
    • _rightShiftExpressionBuilder

      protected ASTRightShiftExpressionBuilder _rightShiftExpressionBuilder()
    • logicalRightShiftExpressionBuilder

      public static ASTLogicalRightShiftExpressionBuilder logicalRightShiftExpressionBuilder()
    • _logicalRightShiftExpressionBuilder

      protected ASTLogicalRightShiftExpressionBuilder _logicalRightShiftExpressionBuilder()
    • binaryAndExpressionBuilder

      public static ASTBinaryAndExpressionBuilder binaryAndExpressionBuilder()
    • _binaryAndExpressionBuilder

      protected ASTBinaryAndExpressionBuilder _binaryAndExpressionBuilder()
    • binaryXorExpressionBuilder

      public static ASTBinaryXorExpressionBuilder binaryXorExpressionBuilder()
    • _binaryXorExpressionBuilder

      protected ASTBinaryXorExpressionBuilder _binaryXorExpressionBuilder()
    • binaryOrOpExpressionBuilder

      public static ASTBinaryOrOpExpressionBuilder binaryOrOpExpressionBuilder()
    • _binaryOrOpExpressionBuilder

      protected ASTBinaryOrOpExpressionBuilder _binaryOrOpExpressionBuilder()
    • prettyPrint

      public static String prettyPrint(de.monticore.ast.ASTNode node, boolean printComments)
      Uses the composed pretty printer to print an ASTNode of this language
      Parameters:
      node - The ASTNode to be printed
      printComments - Whether comments should be printed
      Returns:
      The pretty printer output
    • _prettyPrint

      protected String _prettyPrint(de.monticore.ast.ASTNode node, boolean printComments)
    • typeDispatcher

      public static IBitExpressionsTypeDispatcher typeDispatcher()
    • _typeDispatcher

      protected IBitExpressionsTypeDispatcher _typeDispatcher()
    • traverser

      public static BitExpressionsTraverser traverser()
      A traverser is the conceptual entry point for every action within the visitor infrastructure. Visitors may be added, which contain the implementations for the visit and endVisit methods. Handlers may be added to modify the default traversal strategy. Each traverser retains their traversed elements to avoid duplicate traversal, possibly requiring ITraverser.clearTraversedElements() to be called in case of re-use inheritanceTraverser() should be preferred over normal traverser, as they further enable language composition.
      Returns:
      a new instance of this language's traverser
    • _traverser

      protected BitExpressionsTraverser _traverser()
    • inheritanceTraverser

      public static BitExpressionsTraverser inheritanceTraverser()
      A traverser is the conceptual entry point for every action within the visitor infrastructure. Visitors may be added, which contain the implementations for the visit and endVisit methods. Handlers may be added to modify the default traversal strategy. Each traverser retains their traversed elements to avoid duplicate traversal, possibly requiring ITraverser.clearTraversedElements() to be called in case of re-use Inheritance Traverser should be preferred over default ones, as they further enable language composition.
      Returns:
      a new instance of this language's inheritance traverser
    • _inheritanceTraverser

      protected BitExpressionsTraverser _inheritanceTraverser()
    • globalScope

      public static IBitExpressionsGlobalScope globalScope()
    • _globalScope

      protected IBitExpressionsGlobalScope _globalScope()
    • artifactScope

      public static IBitExpressionsArtifactScope artifactScope()
    • _artifactScope

      protected IBitExpressionsArtifactScope _artifactScope()
    • scope

      public static IBitExpressionsScope scope()
    • _scope

      protected IBitExpressionsScope _scope()
    • scopesGenitor

      public static BitExpressionsScopesGenitor scopesGenitor()
      Returns a new ScopeGenitor. ScopeGenitors are responsible for creating the scope structure of artifacts of only this language and linking it with the AST nodes. Note: ScopeGenitors do NOT delegate to elements of composed languages which is why you are most likely looking for scopesGenitorDelegator().
      Returns:
      a new instance of this language's scope genitor
    • _scopesGenitor

      protected BitExpressionsScopesGenitor _scopesGenitor()
    • scopesGenitorDelegator

      public static BitExpressionsScopesGenitorDelegator scopesGenitorDelegator()
      Returns a new ScopeGenitorDelegator. Delegates to the ScopeGenitors of composed languages, used for instantiating symbol tables in the context of language composition See the delegators #createFromAST method.
      Returns:
      a new instance of this language's scope genitor delegator
    • _scopesGenitorDelegator

      protected BitExpressionsScopesGenitorDelegator _scopesGenitorDelegator()
    • nameExpressionBuilder

      public static ASTNameExpressionBuilder nameExpressionBuilder()
    • literalExpressionBuilder

      public static ASTLiteralExpressionBuilder literalExpressionBuilder()
    • argumentsBuilder

      public static ASTArgumentsBuilder argumentsBuilder()
    • initMe

      public static void initMe(BitExpressionsMill a)
    • reset

      public static void reset()