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; // 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; }