protected override void visitEntity(Entity entity)
 {
     writer.Append(KeywordEnum.ENTITY.ToString()).Append(' ');
     writer.AppendIdentifier(entity).Append(' ');
     writer.Append(KeywordEnum.IS.ToString()).NewLine();
     writer.Indent();
     if (entity.Generic.Count != 0)
     {
         output.getMiscellaneousElementOutput().generic(entity.Generic);
     }
     if (entity.Port.Count != 0)
     {
         output.getMiscellaneousElementOutput().port(entity.Port);
     }
     output.writeDeclarationMarkers(entity.Declarations);
     writer.Dedent();
     if (entity.Statements.Count != 0)
     {
         writer.Append(KeywordEnum.BEGIN.ToString()).NewLine().Indent();
         output.writeConcurrentStatements(entity.Statements);
         writer.Dedent();
     }
     writer.Append(KeywordEnum.END.ToString());
     if (writer.Format.RepeatLabels)
     {
         writer.Append(' ').Append(KeywordEnum.ENTITY.ToString());
         writer.Append(' ').AppendIdentifier(entity);
     }
     writer.Append(";").NewLine();
 }
Exemplo n.º 2
0
 protected override void visitProcedureCall(ProcedureCall statement)
 {
     appendLabel(statement);
     writer.Append(statement.Procedure.Identifier);
     if (statement.Parameters.Count != 0)
     {
         writer.Append('(');
         output.getMiscellaneousElementOutput().procedureCallParameters(statement.Parameters);
         writer.Append(')');
     }
     writer.Append(';').NewLine();
 }
        protected override void visitComponentConfiguration(ComponentConfiguration configuration)
        {
            writer.Append(KeywordEnum.FOR.ToString()).Append(' ');
            output.writeComponentSpecification(configuration.ComponentSpecification);
            writer.Indent();

            bool hasBindingIndication = false;

            if (configuration.EntityAspect != null)
            {
                hasBindingIndication = true;
                writer.NewLine().Append(KeywordEnum.USE.ToString()).Append(' ');
                writer.Append(configuration.EntityAspect.ToString());
            }

            if (configuration.GenericMap.Count != 0)
            {
                hasBindingIndication = true;
                writer.NewLine();
                writer.Append(KeywordEnum.GENERIC.ToString()).Append(KeywordEnum.MAP.ToString()).Append(" (").NewLine();
                writer.Indent().BeginAlign();
                output.getMiscellaneousElementOutput().genericMap(configuration.GenericMap);
                writer.EndAlign().Dedent();
                writer.Append(")");
            }

            if (configuration.PortMap.Count != 0)
            {
                hasBindingIndication = true;
                writer.NewLine();
                writer.Append(KeywordEnum.PORT.ToString()).Append(KeywordEnum.MAP.ToString()).Append(" (").NewLine();
                writer.Indent().BeginAlign();
                output.getMiscellaneousElementOutput().portMap(configuration.PortMap);
                writer.EndAlign().Dedent();
                writer.Append(")");
            }

            if (hasBindingIndication)
            {
                writer.Append(";");
            }

            writer.NewLine();

            if (configuration.BlockConfiguration != null)
            {
                visit(configuration.BlockConfiguration);
            }
            writer.Dedent().Append(KeywordEnum.END.ToString()).Append(KeywordEnum.FOR.ToString());
            writer.Append(';').NewLine();
        }
Exemplo n.º 4
0
 protected override void visitFunctionCall(FunctionCall expression)
 {
     writer.AppendIdentifier(expression.Function);
     if (expression.Parameters.Count != 0)
     {
         writer.Append('(');
         output.getMiscellaneousElementOutput().functionCallParameters(expression.Parameters);
         writer.Append(')');
     }
 }
Exemplo n.º 5
0
 protected override void visitAliasDeclaration(Alias declaration)
 {
     writer.Append(KeywordEnum.ALIAS.ToString()).Append(' ').Append(declaration.Designator);
     if (declaration.SubtypeIndication != null)
     {
         writer.Append(" : ");
         output.writeSubtypeIndication(declaration.SubtypeIndication);
     }
     writer.Append(' ').Append(KeywordEnum.IS.ToString()).Append(' ').Append(declaration.Aliased.ToString());
     if (declaration.Signature != null)
     {
         writer.Append(' ');
         output.getMiscellaneousElementOutput().signature(declaration.Signature);
     }
     writer.Append(';').NewLine();
 }
        private void appendComponentInstantiationMaps(AbstractComponentInstantiation instantiation)
        {
            if (instantiation.GenericMap.Count != 0)
            {
                writer.NewLine();
                writer.Append(KeywordEnum.GENERIC.ToString()).Append(KeywordEnum.MAP.ToString()).Append(" (").NewLine();
                writer.Indent().BeginAlign();
                output.getMiscellaneousElementOutput().genericMap(instantiation.GenericMap);
                writer.EndAlign().Dedent();
                writer.Append(")");
            }

            if (instantiation.PortMap.Count != 0)
            {
                writer.NewLine();
                writer.Append(KeywordEnum.PORT.ToString()).Append(KeywordEnum.MAP.ToString()).Append(" (").NewLine();
                writer.Indent().BeginAlign();
                output.getMiscellaneousElementOutput().portMap(instantiation.PortMap);
                writer.EndAlign().Dedent();
                writer.Append(")");
            }
        }