Search in sources :

Example 1 with IEntityContext

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

the class MiscLanguageDeployer method deploy.

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

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new MiscGenericBuilderAdapter((IMiscBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(MiscLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new MiscSpecificBuilderAdapter(strategy, entityContext);
        }
    });
    platform.addOperationFactory(MiscLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {

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

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

        public IVisitor create(IOperation operation, int stage) {
            return new MiscOperationVisitor();
        }
    });
    platform.addOperationFactory(MiscLanguageKit.URI, ArtifactsGeneratorOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            return new MiscOperationVisitor();
        }
    });
    platform.addOperationFactory(MiscLanguageKit.URI, NormalizerOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            return new MiscOperationVisitor();
        }
    });
    platform.addOperationFactory(MiscLanguageKit.URI, DynamicCompilerOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            return new MiscDynamicCompilerVisitor();
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IOperation(org.whole.lang.operations.IOperation) MiscDynamicCompilerVisitor(org.whole.lang.misc.visitors.MiscDynamicCompilerVisitor) IVisitor(org.whole.lang.visitors.IVisitor) IEntityContext(org.whole.lang.contexts.IEntityContext) IMiscBuilder(org.whole.lang.misc.builders.IMiscBuilder) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory) MiscGenericBuilderAdapter(org.whole.lang.misc.builders.MiscGenericBuilderAdapter) MiscSpecificBuilderAdapter(org.whole.lang.misc.builders.MiscSpecificBuilderAdapter) MiscOperationVisitor(org.whole.lang.misc.visitors.MiscOperationVisitor)

Example 2 with IEntityContext

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

the class MathLanguageDeployer method deploy.

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

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new MathGenericBuilderAdapter((IMathBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(MathLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new MathSpecificBuilderAdapter(strategy, entityContext);
        }
    });
    platform.addOperationFactory(MathLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            if (stage == 0)
                return new MathInterpreterVisitor();
            else
                return null;
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IOperation(org.whole.lang.operations.IOperation) MathInterpreterVisitor(org.whole.lang.math.visitors.MathInterpreterVisitor) IMathBuilder(org.whole.lang.math.builders.IMathBuilder) IVisitor(org.whole.lang.visitors.IVisitor) IEntityContext(org.whole.lang.contexts.IEntityContext) MathGenericBuilderAdapter(org.whole.lang.math.builders.MathGenericBuilderAdapter) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory) MathSpecificBuilderAdapter(org.whole.lang.math.builders.MathSpecificBuilderAdapter)

Example 3 with IEntityContext

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

the class ChangesLanguageDeployer method deploy.

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

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new ChangesGenericBuilderAdapter((IChangesBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(ChangesLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new ChangesSpecificBuilderAdapter(strategy, entityContext);
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) ChangesSpecificBuilderAdapter(org.whole.lang.changes.builders.ChangesSpecificBuilderAdapter) IEntityContext(org.whole.lang.contexts.IEntityContext) ChangesGenericBuilderAdapter(org.whole.lang.changes.builders.ChangesGenericBuilderAdapter) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) IChangesBuilder(org.whole.lang.changes.builders.IChangesBuilder)

Example 4 with IEntityContext

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

the class EditorsLanguageDeployer method deploy.

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

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new EditorsGenericBuilderAdapter((IEditorsBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(EditorsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new EditorsSpecificBuilderAdapter(strategy, entityContext);
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) EditorsSpecificBuilderAdapter(org.whole.lang.editors.builders.EditorsSpecificBuilderAdapter) IEditorsBuilder(org.whole.lang.editors.builders.IEditorsBuilder) IEntityContext(org.whole.lang.contexts.IEntityContext) EditorsGenericBuilderAdapter(org.whole.lang.editors.builders.EditorsGenericBuilderAdapter) IBuilderFactory(org.whole.lang.builders.IBuilderFactory)

Example 5 with IEntityContext

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

the class ReusablesLanguageDeployer method deploy.

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

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new ReusablesGenericBuilderAdapter((IReusablesBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(ReusablesLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new ReusablesSpecificBuilderAdapter(strategy, entityContext);
        }
    });
    platform.addOperationFactory(ReusablesLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {

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

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

        public IVisitor create(IOperation operation, int stage) {
            return new ReusablesArtifactsGeneratorVisitor();
        }
    });
// platform.addReactionsHandler(ReusablesLanguageKit.URI, new ReusablesReactionsHandler());
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IOperation(org.whole.lang.operations.IOperation) ReusablesDynamicCompilerVisitor(org.whole.lang.reusables.visitors.ReusablesDynamicCompilerVisitor) IVisitor(org.whole.lang.visitors.IVisitor) IEntityContext(org.whole.lang.contexts.IEntityContext) ReusablesGenericBuilderAdapter(org.whole.lang.reusables.builders.ReusablesGenericBuilderAdapter) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) ReusablesSpecificBuilderAdapter(org.whole.lang.reusables.builders.ReusablesSpecificBuilderAdapter) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory) ReusablesArtifactsGeneratorVisitor(org.whole.lang.reusables.visitors.ReusablesArtifactsGeneratorVisitor) IReusablesBuilder(org.whole.lang.reusables.builders.IReusablesBuilder) ReusablesInterpreterVisitor(org.whole.lang.reusables.visitors.ReusablesInterpreterVisitor)

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