Beispiel #1
0
 public Config()
 {
     procMap     = new ProcedureMap("procedure");
     functionMap = new ProcedureMap("function");
     globalMap   = new ParamMap();
     typeMap     = new ParamMap();
     constMap    = new ParamMap();
 }
Beispiel #2
0
 public FunctionRenamer(ProcedureMap funMap, List <Function> funs)
 {
     subs        = null;
     this.funMap = funMap;
     decls       = new Dictionary <string, Function>();
     foreach (var fun in funs)
     {
         decls.Add(fun.Name, fun);
     }
 }
Beispiel #3
0
        private bool ParseIntoProcedureMap(string l, ProcedureMap map)
        {
            //(n,n)/(n',n');...
            l = l.Replace("(", "").Replace(")", "").Replace(" ", "");
            string[] fs = l.Split('/');

            if (fs == null)
            {
                return(false);
            }
            string[] ps;
            if (fs.Length == 1)
            {
                ps = new string[0];
            }
            else
            {
                ps = fs[1].Split(';');
            }

            return(map.AddFromArray(fs[0].Split(','), ps));
        }