Example #1
0
		static void Main(string[] args)
		{
			PureFactory factory = new PureFactory();
			ATerm t = factory.parse("f(g(1,h(2,3)),i(4,5),j(6,k(7,[8,9])))");
            ATermLeavesCounter v = new ATermLeavesCounter();
			TopDown td = new TopDown(v);
			td.visit(t);
			Console.Out.WriteLine(v.Count);
		}
Example #2
0
        static void Main(string[] args)
        {
            PureFactory        factory = new PureFactory();
            ATerm              t       = factory.parse("f(g(1,h(2,3)),i(4,5),j(6,k(7,[8,9])))");
            ATermLeavesCounter v       = new ATermLeavesCounter();
            TopDown            td      = new TopDown(v);

            td.visit(t);
            Console.Out.WriteLine(v.Count);
        }