Ejemplo n.º 1
0
        //=====================================================================
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="tadsVer">the TADS3 version number</param>
        public HtmlGenerator(SymbolTable symTab, String introFile, String tadsVer, String outputDir)
        {
            this.SymbolTable = symTab;
            this.TadsVersion = tadsVer;
            this.OriginalIntroFileName = introFile;

            // standardize the format of the output directory path
            this.OutputDir = outputDir.Replace("\\", "/");
            if (! this.OutputDir.EndsWith("/"))
                this.OutputDir = this.OutputDir + "/";
        }
Ejemplo n.º 2
0
 //=====================================================================
 /// <summary>
 /// Constructor.
 /// </summary>
 public Parser(SymbolTable st)
 {
     this.SymbolTable = st;
 }
Ejemplo n.º 3
0
 //=====================================================================
 /// <summary>
 /// Populates the lists of global objects in this class's base classes.
 /// </summary>
 public void LinkBaseClasses(SymbolTable st)
 {
     for (int i = 0; i < this.BaseClasses.Count; i++)
     {
         String name = this.BaseClasses[i] as string;
         if (name == null)
             continue;
         ObjectOrClass oc = st.FindObjectOrClass(name);
         if (oc == null)
             continue;
         this.BaseClasses[i] = oc;
         if (oc is ClassDef)
         {
             ClassDef c = (ClassDef)oc;
             if (!c.GlobalObjects.Contains(this))
                 c.GlobalObjects.Add(this);
         }
     }
 }
Ejemplo n.º 4
0
        //=====================================================================
        /// <summary>
        /// Performs various operations that can't be done until all the data
        /// has been parsed from all the source files.
        /// </summary>
        public void PostProcess(SymbolTable st)
        {
            this.Classes.Sort();
            this.Macros.Sort();
            this.Templates.Sort();
            this.GlobalObjects.Sort();
            this.GlobalFunctions.Sort();

            foreach (EnumGroup g in this.EnumGroups)
            {
                g.Enums.Sort();
                foreach (EnumDef e in g.Enums)
                    this.Enums.Add(e);
            }

            this.EnumGroups.Sort();
            this.Enums.Sort();
        }