Class MCBasicsMill

java.lang.Object
de.monticore.mcbasics.MCBasicsMill
Direct Known Subclasses:
MCBasicsMillForAssignmentExpressions, MCBasicsMillForBasicSymbols, MCBasicsMillForBitExpressions, MCBasicsMillForCardinality, MCBasicsMillForCommonExpressions, MCBasicsMillForCompSymbols, MCBasicsMillForExpressionsBasis, MCBasicsMillForGrammar, MCBasicsMillForGrammar_WithConcepts, MCBasicsMillForJavaClassExpressions, MCBasicsMillForJavaLight, MCBasicsMillForLambdaExpressions, MCBasicsMillForMCArrayStatements, MCBasicsMillForMCArrayTypes, MCBasicsMillForMCAssertStatements, MCBasicsMillForMCBasicTypes, MCBasicsMillForMCCollectionTypes, MCBasicsMillForMCCommon, MCBasicsMillForMCCommonLiterals, MCBasicsMillForMCCommonStatements, MCBasicsMillForMCExceptionStatements, MCBasicsMillForMCFullGenericTypes, MCBasicsMillForMCFullJavaStatements, MCBasicsMillForMCFunctionTypes, MCBasicsMillForMCJavaLiterals, MCBasicsMillForMCLowLevelStatements, MCBasicsMillForMCReturnStatements, MCBasicsMillForMCSimpleGenericTypes, MCBasicsMillForMCStructuralTypes, MCBasicsMillForMCSynchronizedStatements, MCBasicsMillForMCVarDeclarationStatements, MCBasicsMillForOCLExpressions, MCBasicsMillForODRuleGeneration, MCBasicsMillForODRules, MCBasicsMillForOOSymbols, MCBasicsMillForOptionalOperators, MCBasicsMillForRegExType, MCBasicsMillForRegularExpressions, MCBasicsMillForSetExpressions, MCBasicsMillForSIUnitLiterals, MCBasicsMillForSIUnits, MCBasicsMillForSIUnitTypes4Computing, MCBasicsMillForSIUnitTypes4Math, MCBasicsMillForStreamExpressions, MCBasicsMillForTags, MCBasicsMillForTagSchema, MCBasicsMillForTFBasisExts, MCBasicsMillForTFCommons, MCBasicsMillForTupleExpressions, MCBasicsMillForTypeParameters, MCBasicsMillForUglyExpressions, MCBasicsMillForUMLModifier, MCBasicsMillForUMLStereotype

public class MCBasicsMill 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

    • MCBasicsMill

      protected MCBasicsMill()
  • Method Details

    • getMill

      public static MCBasicsMill 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.
    • 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 IMCBasicsTypeDispatcher typeDispatcher()
    • _typeDispatcher

      protected IMCBasicsTypeDispatcher _typeDispatcher()
    • traverser

      public static MCBasicsTraverser 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 MCBasicsTraverser _traverser()
    • inheritanceTraverser

      public static MCBasicsTraverser 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 MCBasicsTraverser _inheritanceTraverser()
    • globalScope

      public static IMCBasicsGlobalScope globalScope()
    • _globalScope

      protected IMCBasicsGlobalScope _globalScope()
    • artifactScope

      public static IMCBasicsArtifactScope artifactScope()
    • _artifactScope

      protected IMCBasicsArtifactScope _artifactScope()
    • scope

      public static IMCBasicsScope scope()
    • _scope

      protected IMCBasicsScope _scope()
    • initMe

      public static void initMe(MCBasicsMill a)
    • reset

      public static void reset()