Beispiel #1
0
 public object Visit(ASTElement node, object data)
 {
     System.Console.Out.WriteLine(IndentString() + node + " " + node.Symbol);
     ++indent;
     data = node.ChildrenAccept(this, data);
     --indent;
     return(data);
 }
Beispiel #2
0
        public object Visit(ASTElement node, object data)
        {
            string     symbol = node.Symbol;
            SMARTSAtom atom;

            switch (symbol)
            {
            case "o":
            case "n":
            case "c":
            case "s":
            case "p":
            case "as":
            case "se":
                string atomSymbol = symbol.Substring(0, 1).ToUpperInvariant() + symbol.Substring(1);
                atom = new AromaticSymbolAtom(atomSymbol, builder);
                break;

            default:
                atom = new AliphaticSymbolAtom(symbol, builder);
                break;
            }
            return(atom);
        }
Beispiel #3
0
 public object Visit(ASTElement node, object data)
 {
     symbolIdentified = node.Symbol;
     return("");
 }