Пример #1
0
        public void Visit(string smarts)
        {
            var parser  = new SMARTSParser(new StringReader(smarts));
            var start   = parser.Start();
            var visitor = new SmartsQueryVisitor();

            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);
        }
 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
 }
Пример #4
0
        public object Visit(ASTRecursiveSmartsExpression node, object data)
        {
            SmartsQueryVisitor recursiveVisitor = new SmartsQueryVisitor(builder)
            {
                query     = new QueryAtomContainer(builder),
                ringAtoms = new RingIdentifierAtom[10]
            };

            return(new RecursiveSmartsAtom((IQueryAtomContainer)node.JjtGetChild(0).JjtAccept(recursiveVisitor, null)));
        }