Example #1
0
        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 inheritance, composition, aggregation, and using
            PushStackRelation push = new PushStackRelation(repo);

            //capture inheritance data
            DetectInheritance detectIN = new DetectInheritance();

            detectIN.add(push);
            parser.add(detectIN);

            DetectClass detectCl = new DetectClass();

            detectCl.add(push);
            parser.add(detectCl);

            //capture composition data
            DetectComposition detectComp = new DetectComposition();

            detectComp.add(push);
            parser.add(detectComp);

            //capture Aggregation data
            DetectAggregation detectagg = new DetectAggregation();

            detectagg.add(push);
            parser.add(detectagg);

            //capture Using data
            DetectUsing detectUS = new DetectUsing();

            detectUS.add(push);
            parser.add(detectUS);

            // parser configured
            return(parser);
        }
Example #2
0
        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, complexity
            PushStack push = new PushStack(repo);

            // capture namespace info
            DetectNamespace detectNS = new DetectNamespace();

            detectNS.add(push);
            parser.add(detectNS);

            // capture delegate
            DetectDelegate detectDG = new DetectDelegate();

            detectDG.add(push);
            parser.add(detectDG);

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

            // capture complexity info of function
            DetectComplexity com = new DetectComplexity();

            com.add(push);
            parser.add(com);

            // 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 inheritance, composition, aggregation, and using
            PushStackRelation push = new PushStackRelation(repo);

            //capture inheritance data
            DetectInheritance detectIN = new DetectInheritance();
            detectIN.add(push);
            parser.add(detectIN);

            DetectClass detectCl = new DetectClass();
            detectCl.add(push);
            parser.add(detectCl);

            //capture composition data
            DetectComposition detectComp = new DetectComposition();
            detectComp.add(push);
            parser.add(detectComp);

            //capture Aggregation data
            DetectAggregation detectagg = new DetectAggregation();
            detectagg.add(push);
            parser.add(detectagg);

            //capture Using data
            DetectUsing detectUS = new DetectUsing();
            detectUS.add(push);
            parser.add(detectUS);

            // 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, complexity
            PushStack push = new PushStack(repo);

            // capture namespace info
            DetectNamespace detectNS = new DetectNamespace();
            detectNS.add(push);
            parser.add(detectNS);

            // capture delegate
            DetectDelegate detectDG = new DetectDelegate();
            detectDG.add(push);
            parser.add(detectDG);

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

            // capture complexity info of function
            DetectComplexity com = new DetectComplexity();
            com.add(push);
            parser.add(com);

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