コード例 #1
0
ファイル: Location.cs プロジェクト: cnduru/SW10
        private void parseInst(int count, string instLine){

            /*if(instLine.Contains("try"))
            {
                instLine = "exception catch";
            }*/

            inst = new Instruction(instLine);
            
            name = "pc" + instLine.Replace("(", "").Replace(")", "").Replace("<", "").Replace(">", "")
                .Replace(",", "").Replace(" ", "_").Replace(".", "_").Replace(":", "_")
                .Replace("__", "_").Replace("-","");
            Label = new Label{
                content = "t <= " + Constants.instTime, 
                kind = "invariant", 
                y = y,
                x = -70               
            };
        }
コード例 #2
0
ファイル: Location.cs プロジェクト: cnduru/SW10
 private void parseCall(string instLine)
 {
     inst = new Instruction();
     name = new Regex(" [a-zA-Z]+ \\(").Match(instLine)
         .ToString().Replace(" ","").Replace("(","");
     Label = new Label{
         content = "1", 
         kind = "exponentialrate", 
         y = y,
         x = -70               
     };
 }