示例#1
0
        public void Dump(string smarts)
        {
            SMARTSParser      parser  = new SMARTSParser(new StringReader(smarts));
            ASTStart          start   = parser.Start();
            SmartsDumpVisitor visitor = new SmartsDumpVisitor();

            visitor.Visit(start, null);
        }
示例#2
0
        public void Visit(string smarts)
        {
            SMARTSParser       parser  = new SMARTSParser(new StringReader(smarts));
            ASTStart           start   = parser.Start();
            SmartsQueryVisitor visitor = new SmartsQueryVisitor(ChemObjectBuilder.Instance);

            visitor.Visit(start, null);
        }
示例#3
0
 public object Visit(ASTStart node, object data)
 {
     System.Console.Out.WriteLine(IndentString() + node);
     ++indent;
     data = node.ChildrenAccept(this, data);
     --indent;
     return(data);
 }
 static void Main()
 {
     #region 1
     SMARTSParser       parser  = new SMARTSParser(new StringReader("C*C"));
     ASTStart           ast     = parser.Start();
     SmartsQueryVisitor visitor = new SmartsQueryVisitor();
     QueryAtomContainer query   = (QueryAtomContainer)visitor.Visit(ast, null);
     #endregion
 }
示例#5
0
        void Main()
        {
            UniversalIsomorphismTester universalIsomorphismTester = null;

            #region 1
            SmilesParser       sp            = new SmilesParser();
            IAtomContainer     atomContainer = sp.ParseSmiles("CC(=O)OC(=O)C");
            QueryAtomContainer query         = SMARTSParser.Parse("C*C");
            bool queryMatch = universalIsomorphismTester.IsSubgraph(atomContainer, query);
            #endregion
            #region 2
            SMARTSParser parser = new SMARTSParser(new StringReader("C*C"));
            ASTStart     start  = parser.Start();
            #endregion
        }
示例#6
0
 public object Visit(ASTStart node, object data)
 {
     return(node.JjtGetChild(0).JjtAccept(this, data));
 }