Example #1
0
  @Override
  protected CBaseLanguageEntity DoCustomSemanticAnalysis(
      CBaseLanguageEntity parent, CBaseEntityFactory factory) {
    CEntityDataSection data = factory.NewEntityDataSection(getLine(), "DeclarationSection");

    for (CConstantTerminal c : m_arrParams) {
      // TODO do semantic analysis
    }
    for (CFPacInputFile f : m_arrInputFiles) {
      f.DoSemanticAnalysis(data, factory);
    }
    for (CFPacOutputFile f : m_arrOutputFiles) {
      f.DoSemanticAnalysis(data, factory);
    }
    for (CFPacUpdateFile f : m_arrUpdateFiles) {
      f.DoSemanticAnalysis(data, factory);
    }

    parent.AddChild(data);
    return data;
  }
Example #2
0
 @Override
 protected Element ExportCustom(Document root) {
   Element eAdd = root.createElement("Declarations");
   for (CConstantTerminal c : m_arrParams) {
     Element e = root.createElement("Param");
     c.ExportTo(e, root);
     eAdd.appendChild(e);
   }
   for (CFPacInputFile f : m_arrInputFiles) {
     Element e = f.Export(root);
     eAdd.appendChild(e);
   }
   for (CFPacOutputFile f : m_arrOutputFiles) {
     Element e = f.Export(root);
     eAdd.appendChild(e);
   }
   for (CFPacUpdateFile f : m_arrUpdateFiles) {
     Element e = f.Export(root);
     eAdd.appendChild(e);
   }
   return eAdd;
 }