public virtual Parser build() { Parser parser = new Parser(); // decide what to show AAction.displaySemi = false; AAction.displayStack = false; // this is default so redundant // action used for namespaces, classes, and functions PushStack push = new PushStack(repo); // capture namespace info DetectNamespace detectNS = new DetectNamespace(); detectNS.add(push); parser.add(detectNS); // capture class info DetectClass detectCl = new DetectClass(); detectCl.add(push); parser.add(detectCl); // capture enum info DetectEnum detectEn = new DetectEnum(); detectEn.add(push); parser.add(detectEn); // capture Delegate info DetectDelegate detectDe = new DetectDelegate(); detectDe.add(push); parser.add(detectDe); // capture function info DetectFunction detectFN = new DetectFunction(); detectFN.add(push); parser.add(detectFN); //Detect Complexity DetectComplexity detectComp = new DetectComplexity(); detectComp.add(push); parser.add(detectComp); // handle entering anonymous scopes, e.g., if, while, etc. DetectAnonymousScope anon = new DetectAnonymousScope(); anon.add(push); parser.add(anon); // handle leaving scopes DetectLeavingScope leave = new DetectLeavingScope(); PopStack pop = new PopStack(repo); leave.add(pop); parser.add(leave); // parser configured return(parser); }
public virtual Parser build() { Parser parser = new Parser(); // decide what to show AAction.displaySemi = false; AAction.displayStack = false; // false is default // action used for namespaces, classes, and functions PushStack push = new PushStack(repo); writeTypeTable writetable = new writeTypeTable(repo); //add write TypeTable Action to the rules // capture namespace info DetectNamespace detectNS = new DetectNamespace(); detectNS.add(push); //detectNS.add(writetable); //add write TypeTable Action to the rules parser.add(detectNS); // capture class info DetectClass detectCl = new DetectClass(); detectCl.add(push); detectCl.add(writetable); parser.add(detectCl); // capture function info DetectFunction detectFN = new DetectFunction(); detectFN.add(push); detectFN.add(writetable); //add write TypeTable Action to the rules parser.add(detectFN); DetectDelegate detectD = new DetectDelegate(); //capture delegate info detectD.add(push); detectD.add(writetable); parser.add(detectD); DetectAlias detectAl = new DetectAlias(); //capture Alias info detectAl.add(push); detectD.add(writetable); parser.add(detectAl); DetectEnum detectEn = new DetectEnum(); //capture Enum info detectEn.add(push); detectEn.add(writetable); parser.add(detectEn); // handle entering anonymous scopes, e.g., if, while, etc. DetectAnonymousScope anon = new DetectAnonymousScope(); anon.add(push); parser.add(anon); // show public declarations DetectPublicDeclar pubDec = new DetectPublicDeclar(); SaveDeclar print = new SaveDeclar(repo); pubDec.add(print); parser.add(pubDec); // handle leaving scopes DetectLeavingScope leave = new DetectLeavingScope(); PopStack pop = new PopStack(repo); leave.add(pop); parser.add(leave); // parser configured return(parser); }
public virtual Parser build() { Parser parser = new Parser(); // decide what to show AAction.displaySemi = true; AAction.displayStack = false; // this is default so redundant // action used for namespaces, classes, and functions PushStack push = new PushStack(repo); // capture namespace info DetectNamespace detectNS = new DetectNamespace(); detectNS.add(push); parser.add(detectNS); // capture class info DetectClass detectCl = new DetectClass(); detectCl.add(push); parser.add(detectCl); // capture enum info DetectEnum detectEN = new DetectEnum(); detectEN.add(push); parser.add(detectEN); // capture function info DetectFunction detectFN = new DetectFunction(); detectFN.add(push); parser.add(detectFN); // handle entering anonymous scopes, e.g., if, while, etc. DetectAnonymousScope anon = new DetectAnonymousScope(); anon.add(push); parser.add(anon); // handle leaving scopes DetectLeavingScope leave = new DetectLeavingScope(); PopStack pop = new PopStack(repo); leave.add(pop); parser.add(leave); // parser configured return parser; }
public virtual Parser build() { Parser parser = new Parser(); AAction.displaySemi = false; AAction.displayStack = false; // this is default so redundant PushStack push = new PushStack(repo); // capture namespace info DetectNamespace detectNS = new DetectNamespace(); detectNS.add(push); parser.add(detectNS); // capture struct info DetectStruct detectSt = new DetectStruct(); detectSt.add(push); parser.add(detectSt); // capture enum info DetectEnum detectEn = new DetectEnum(); detectEn.add(push); parser.add(detectEn); // capture delegate info DetectDelegate detectDl = new DetectDelegate(); detectDl.add(push); parser.add(detectDl); // capture class info DetectClass detectCl = new DetectClass(); detectCl.add(push); parser.add(detectCl); // capture function info DetectFunction detectFN = new DetectFunction(); detectFN.add(push); parser.add(detectFN); // handle entering anonymous scopes, e.g., if, while, etc. DetectAnonymousScope anon = new DetectAnonymousScope(); anon.add(push); parser.add(anon); // capture array info DetectArray detectArr = new DetectArray(); detectArr.add(push); parser.add(detectArr); // handle leaving scopes DetectLeavingScope leave = new DetectLeavingScope(); PopStack pop = new PopStack(repo); leave.add(pop); parser.add(leave); // capture bracelessscope info DetectBraceLess detectBL = new DetectBraceLess(); detectBL.add(push); parser.add(detectBL); // parser configured return parser; }