Ejemplo n.º 1
0
 public ScInterface_declaration(ASTNode node) {
   super(node);
   assert (node.getId() == ASTINTERFACE_DECLARATION);
   ASTNode c = (ASTNode) node.getChild(0);
   switch (c.getId()) {
     case ASTINTERFACE_CONSTANT_DECLARATION:
       item = new ScInterface_constant_declaration(c);
       break;
     case ASTINTERFACE_SIGNAL_DECLARATION:
       item = new ScInterface_signal_declaration(c);
       break;
     case ASTINTERFACE_VARIABLE_DECLARATION:
       item = new ScInterface_variable_declaration(c);
       break;
     case ASTINTERFACE_FILE_DECLARATION:
       item = new ScInterface_file_declaration(c);
       break;
     case ASTINTERFACE_TERMINAL_DECLARATION:
       item = new ScInterface_terminal_declaration(c);
       break;
     case ASTINTERFACE_QUANTITY_DECLARATION:
       item = new ScInterface_quantity_declaration(c);
       break;
     default:
       break;
   }
 }
Ejemplo n.º 2
0
 public ScPackage_body(ASTNode node) {
   super(node, true);
   assert (node.getId() == ASTPACKAGE_BODY);
   int i;
   for (i = 0; i < node.getChildrenNum(); i++) {
     ASTNode c = (ASTNode) node.getChild(i);
     int id = c.getId();
     ScVhdl tmp = null;
     switch (id) {
       case ASTIDENTIFIER:
         tmp = new ScIdentifier(c);
         identifier = tmp.scString();
         break;
       case ASTPACKAGE_BODY_DECLARATIVE_PART:
         declarative_part = new ScPackage_body_declarative_part(c);
         break;
       default:
         break;
     }
   }
   assert (identifier != null);
   for (i = 0; i < units.size(); i++) {
     ScCommonIdentifier ident = units.get(i);
     if (ident instanceof ScPackage_declaration && ident.identifier.equalsIgnoreCase(identifier)) {
       ((ScPackage_declaration) ident).setPackageBody(this);
       break;
     }
   }
   if (i == units.size()) {
     MyDebug.printFileLine("package boty no corresponding package");
   }
 }
Ejemplo n.º 3
0
 public ScType_mark(ASTNode node) {
   super(node);
   assert (node.getId() == ASTTYPE_MARK);
   for (int i = 0; i < node.getChildrenNum(); i++) {
     ASTNode c = (ASTNode) node.getChild(i);
     switch (c.getId()) {
       case ASTNAME:
         name = new ScName(c);
         break;
       default:
         break;
     }
   }
 }
Ejemplo n.º 4
0
 public ScProcess_declarative_part(ASTNode node) {
   super(node);
   assert (node.getId() == ASTPROCESS_DECLARATIVE_PART);
   for (int i = 0; i < node.getChildrenNum(); i++) {
     ASTNode c = (ASTNode) node.getChild(i);
     items.add(new ScProcess_declarative_item(c));
   }
 }
Ejemplo n.º 5
0
 public ScBreak_statement(ASTNode node) {
   super(node, true);
   assert (node.getId() == ASTBREAK_STATEMENT);
   for (int i = 0; i < node.getChildrenNum(); i++) {
     ASTNode c = (ASTNode) node.getChild(i);
     switch (c.getId()) {
       case ASTEXPRESSION:
         condition = new ScCondition(c);
         break;
       case ASTBREAK_LIST:
         break_list = new ScBreak_list(c);
         break;
       default:
         break;
     }
   }
 }
Ejemplo n.º 6
0
 public ScBlock_declarative_part(ASTNode node) {
   super(node);
   assert (node.getId() == ASTBLOCK_DECLARATIVE_PART);
   for (int i = 0; i < node.getChildrenNum(); i++) {
     ASTNode c = (ASTNode) node.getChild(i);
     ScVhdl item = new ScBlock_declarative_item(c);
     items.add(item);
   }
 }
Ejemplo n.º 7
0
 public ScSubprogram_body(ASTNode node) {
   super(node, true);
   assert (node.getId() == ASTSUBPROGRAM_BODY);
   for (int i = 0; i < node.getChildrenNum(); i++) {
     ASTNode c = (ASTNode) node.getChild(i);
     switch (c.getId()) {
       case ASTSUBPROGRAM_SPECIFICATION:
         spec = new ScSubprogram_specification(c);
         break;
       case ASTSUBPROGRAM_DECLARATIVE_PART:
         declarative_part = new ScSubprogram_declarative_part(c);
         break;
       case ASTSUBPROGRAM_STATEMENT_PART:
         statement_part = new ScSubprogram_statement_part(c);
         break;
       default:
         break;
     }
   }
 }
Ejemplo n.º 8
0
 public ScWait_statement(ASTNode node) {
   super(node, true);
   assert (node.getId() == ASTWAIT_STATEMENT);
   for (int i = 0; i < node.getChildrenNum(); i++) {
     ASTNode c = (ASTNode) node.getChild(i);
     switch (c.getId()) {
       case ASTSENSITIVITY_CLAUSE:
         sensitivity = new ScSensitivity_clause(c);
         break;
       case ASTCONDITION_CLAUSE:
         condition = new ScCondition_clause(c);
         break;
       case ASTTIMEOUT_CLAUSE:
         timeout = new ScTimeout_clause(c);
         break;
       default:
         break;
     }
   }
 }
Ejemplo n.º 9
0
  public ScIf_statement(ASTNode node) {
    super(node, true);
    assert (node.getId() == ASTIF_STATEMENT);
    int i = 0;
    while (i < node.getChildrenNum()) {
      ASTNode c = (ASTNode) node.getChild(i);
      String image = "";
      switch (c.getId()) {
        case ASTVOID:
          image = c.firstTokenImage();
          c = (ASTNode) node.getChild(i + 1);
          if (image.equalsIgnoreCase(tokenImage[IF])) {
            if_pair.condition = new ScCondition(c);
            c = (ASTNode) node.getChild(i + 2);
            if_pair.seq_statements = new ScSequence_of_statements(c);
            i += 3;
          } else if (image.equalsIgnoreCase(tokenImage[ELSIF])) {
            ConPair pair = new ConPair();
            pair.condition = new ScCondition(c);
            c = (ASTNode) node.getChild(i + 2);
            pair.seq_statements = new ScSequence_of_statements(c);
            elsif_pair.add(pair);
            i += 3;
          } else if (image.equalsIgnoreCase(tokenImage[ELSE])) {
            else_pair = new ConPair();
            else_pair.seq_statements = new ScSequence_of_statements(c);
            i += 2;
          }
          break;

        default:
          i++;
          break;
      }
    }
  }
Ejemplo n.º 10
0
 public ScAcross_aspect(ASTNode node) {
   super(node);
   assert (node.getId() == ASTACROSS_ASPECT);
   int i;
   for (i = 0; i < node.getChildrenNum(); i++) {
     IASTNode c = node.getChild(i);
     int id = c.getId();
     switch (id) {
       case ASTIDENTIFIER_LIST:
         idlist = new ScIdentifier_list((ASTNode) c);
         break;
       case ASTTOLERANCE_ASPECT:
         tolerance_aspect = new ScTolerance_aspect((ASTNode) c);
         break;
       case ASTEXPRESSION:
         expression = new ScExpression((ASTNode) c);
         break;
       default:
         break;
     }
   }
 }
Ejemplo n.º 11
0
 public ScInterface_signal_declaration(ASTNode node) {
   super(node);
   assert (node.getId() == ASTINTERFACE_SIGNAL_DECLARATION);
 }
Ejemplo n.º 12
0
 public ScInterface_file_declaration(ASTNode node) {
   super(node, false);
   assert (node.getId() == ASTINTERFACE_FILE_DECLARATION);
 }
Ejemplo n.º 13
0
 public ScGuarded_signal_specification(ASTNode node) {
   super(node);
   assert (node.getId() == ASTGUARDED_SIGNAL_SPECIFICATION);
 }