Search in sources :

Example 36 with IEntityContext

use of org.whole.lang.contexts.IEntityContext in project whole by wholeplatform.

the class CommonsLanguageDeployer method deploy.

public void deploy(ReflectionFactory platform) {
    platform.addLanguageKit(new CommonsLanguageKit());
    platform.addOperationFactory(CommonsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new CommonsGenericBuilderAdapter((ICommonsBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(CommonsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new CommonsSpecificBuilderAdapter(strategy, entityContext);
        }
    });
    platform.addOperationFactory(CommonsLanguageKit.URI, ContentAssistOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            return new CommonsContentAssistVisitor();
        }
    });
    platform.addOperationFactory(CommonsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            if (stage == 0)
                return new CommonsInterpreterVisitor();
            else
                return null;
        }
    });
    platform.addOperationFactory(CommonsLanguageKit.URI, DynamicCompilerOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            if (stage == 0)
                return new CommonsDynamicCompilerVisitor();
            else
                return null;
        }
    });
    platform.addOperationFactory(CommonsLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            return new CommonsPrettyPrinterVisitor((PrettyPrinterOperation) operation);
        }
    });
    platform.addOperationFactory(CommonsLanguageKit.URI, FindDeclarationOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            return null;
        }
    });
    platform.addOperationFactory(CommonsLanguageKit.URI, FindDeclarationsOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            return null;
        }
    });
    platform.addOperationFactory(CommonsLanguageKit.URI, IOperation.ANY_ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            if (stage == 0)
                return new CommonsInterpreterVisitor();
            else
                return null;
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IOperation(org.whole.lang.operations.IOperation) PrettyPrinterOperation(org.whole.lang.operations.PrettyPrinterOperation) CommonsContentAssistVisitor(org.whole.lang.commons.visitors.CommonsContentAssistVisitor) IVisitor(org.whole.lang.visitors.IVisitor) IEntityContext(org.whole.lang.contexts.IEntityContext) CommonsGenericBuilderAdapter(org.whole.lang.commons.builders.CommonsGenericBuilderAdapter) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory) ICommonsBuilder(org.whole.lang.commons.builders.ICommonsBuilder) CommonsPrettyPrinterVisitor(org.whole.lang.commons.visitors.CommonsPrettyPrinterVisitor) CommonsDynamicCompilerVisitor(org.whole.lang.commons.visitors.CommonsDynamicCompilerVisitor) CommonsInterpreterVisitor(org.whole.lang.commons.visitors.CommonsInterpreterVisitor) CommonsSpecificBuilderAdapter(org.whole.lang.commons.builders.CommonsSpecificBuilderAdapter)

Example 37 with IEntityContext

use of org.whole.lang.contexts.IEntityContext in project whole by wholeplatform.

the class UnifiedLambdaDeltaLanguageDeployer method deploy.

public void deploy(ReflectionFactory platform) {
    platform.addLanguageKit(new UnifiedLambdaDeltaLanguageKit());
    platform.addOperationFactory(UnifiedLambdaDeltaLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new UnifiedLambdaDeltaGenericBuilderAdapter((IUnifiedLambdaDeltaBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(UnifiedLambdaDeltaLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new UnifiedLambdaDeltaSpecificBuilderAdapter(strategy, entityContext);
        }
    });
    platform.addEditorKit(UnifiedLambdaDeltaTextualEditorKit.ID);
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IUnifiedLambdaDeltaBuilder(org.whole.lang.unifiedlambdadelta.builders.IUnifiedLambdaDeltaBuilder) IEntityContext(org.whole.lang.contexts.IEntityContext) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) UnifiedLambdaDeltaGenericBuilderAdapter(org.whole.lang.unifiedlambdadelta.builders.UnifiedLambdaDeltaGenericBuilderAdapter) UnifiedLambdaDeltaSpecificBuilderAdapter(org.whole.lang.unifiedlambdadelta.builders.UnifiedLambdaDeltaSpecificBuilderAdapter)

Example 38 with IEntityContext

use of org.whole.lang.contexts.IEntityContext in project whole by wholeplatform.

the class RedBlackTreeLanguageDeployer method deploy.

public void deploy(ReflectionFactory platform) {
    platform.addLanguageKit(new RedBlackTreeLanguageKit());
    platform.addOperationFactory(RedBlackTreeLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new RedBlackTreeGenericBuilderAdapter((IRedBlackTreeBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(RedBlackTreeLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new RedBlackTreeSpecificBuilderAdapter(strategy, entityContext);
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) RedBlackTreeGenericBuilderAdapter(org.whole.examples.datatypes.redblacktree.builders.RedBlackTreeGenericBuilderAdapter) IRedBlackTreeBuilder(org.whole.examples.datatypes.redblacktree.builders.IRedBlackTreeBuilder) RedBlackTreeSpecificBuilderAdapter(org.whole.examples.datatypes.redblacktree.builders.RedBlackTreeSpecificBuilderAdapter) IEntityContext(org.whole.lang.contexts.IEntityContext) IBuilderFactory(org.whole.lang.builders.IBuilderFactory)

Example 39 with IEntityContext

use of org.whole.lang.contexts.IEntityContext in project whole by wholeplatform.

the class GrammarsLanguageDeployer method deploy.

public void deploy(ReflectionFactory platform) {
    platform.addLanguageKit(new GrammarsLanguageKit());
    platform.addOperationFactory(GrammarsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new GrammarsGenericBuilderAdapter((IGrammarsBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(GrammarsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new GrammarsSpecificBuilderAdapter(strategy, entityContext);
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) GrammarsGenericBuilderAdapter(org.whole.lang.grammars.builders.GrammarsGenericBuilderAdapter) IEntityContext(org.whole.lang.contexts.IEntityContext) IGrammarsBuilder(org.whole.lang.grammars.builders.IGrammarsBuilder) GrammarsSpecificBuilderAdapter(org.whole.lang.grammars.builders.GrammarsSpecificBuilderAdapter) IBuilderFactory(org.whole.lang.builders.IBuilderFactory)

Example 40 with IEntityContext

use of org.whole.lang.contexts.IEntityContext in project whole by wholeplatform.

the class FramesLanguageDeployer method deploy.

public void deploy(ReflectionFactory platform) {
    platform.addLanguageKit(new FramesLanguageKit());
    platform.addOperationFactory(FramesLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new FramesGenericBuilderAdapter((IFramesBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(FramesLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new FramesSpecificBuilderAdapter(strategy, entityContext);
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IFramesBuilder(org.whole.lang.frames.builders.IFramesBuilder) FramesSpecificBuilderAdapter(org.whole.lang.frames.builders.FramesSpecificBuilderAdapter) IEntityContext(org.whole.lang.contexts.IEntityContext) FramesGenericBuilderAdapter(org.whole.lang.frames.builders.FramesGenericBuilderAdapter) IBuilderFactory(org.whole.lang.builders.IBuilderFactory)

Aggregations

IBuilder (org.whole.lang.builders.IBuilder)42 IBuilderFactory (org.whole.lang.builders.IBuilderFactory)42 IEntityContext (org.whole.lang.contexts.IEntityContext)42 IOperation (org.whole.lang.operations.IOperation)20 IVisitor (org.whole.lang.visitors.IVisitor)20 IVisitorFactory (org.whole.lang.visitors.IVisitorFactory)20 PrettyPrinterOperation (org.whole.lang.operations.PrettyPrinterOperation)11 IRedBlackTreeBuilder (org.whole.examples.datatypes.redblacktree.builders.IRedBlackTreeBuilder)1 RedBlackTreeGenericBuilderAdapter (org.whole.examples.datatypes.redblacktree.builders.RedBlackTreeGenericBuilderAdapter)1 RedBlackTreeSpecificBuilderAdapter (org.whole.examples.datatypes.redblacktree.builders.RedBlackTreeSpecificBuilderAdapter)1 IImpBuilder (org.whole.examples.lang.imp.builders.IImpBuilder)1 ImpGenericBuilderAdapter (org.whole.examples.lang.imp.builders.ImpGenericBuilderAdapter)1 ImpSpecificBuilderAdapter (org.whole.examples.lang.imp.builders.ImpSpecificBuilderAdapter)1 BytecodeGeneratorOperation (org.whole.examples.lang.imp.visitors.BytecodeGeneratorOperation)1 ImpBytecodeGeneratorVisitor (org.whole.examples.lang.imp.visitors.ImpBytecodeGeneratorVisitor)1 ImpDefUseValidatorVisitor (org.whole.examples.lang.imp.visitors.ImpDefUseValidatorVisitor)1 ImpInterpreterVisitor (org.whole.examples.lang.imp.visitors.ImpInterpreterVisitor)1 ImpPrettyPrinterVisitor (org.whole.examples.lang.imp.visitors.ImpPrettyPrinterVisitor)1 ImpResolverValidatorVisitor (org.whole.examples.lang.imp.visitors.ImpResolverValidatorVisitor)1 ActionsGenericBuilderAdapter (org.whole.lang.actions.builders.ActionsGenericBuilderAdapter)1