Class MCBasicTypesMill

    • Constructor Detail

      • MCBasicTypesMill

        protected MCBasicTypesMill()
    • Method Detail

      • 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 java.lang.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 java.lang.String _prettyPrint​(de.monticore.ast.ASTNode node,
                                                boolean printComments)
      • traverser

        public static MCBasicTypesTraverser 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
      • inheritanceTraverser

        public static MCBasicTypesTraverser 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
      • scopesGenitor

        public static MCBasicTypesScopesGenitor 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
      • scopesGenitorDelegator

        public static MCBasicTypesScopesGenitorDelegator 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
      • reset

        public static void reset()