예제 #1
0
        private static string GetUniqueString(HashCache cache)
        {
            TreeNodeType obj = cache as TreeNodeType;

            return(obj.Dump());
            //return string.Format("({0})[{1}][{2}]", obj.Type, obj.Content, obj.Nickname);
        }
예제 #2
0
        public override void Dump(System.IO.TextWriter stream)
        {
            this.Regulation.Left.Dump(stream);
            stream.Write(" ::= ");

            int count = this.Regulation.RightPart.Count();

            for (int i = 0; i < count; i++)
            {
                if (i == this.DotPosition)
                {
                    stream.Write('.'); stream.Write(' ');
                }

                TreeNodeType item = this.Regulation.RightNode(i);
                item.Dump(stream);

                stream.Write(' ');
            }

            if (this.DotPosition == count)
            {
                stream.Write('.'); stream.Write(' ');
            }

            stream.Write(';');
            stream.Write(", ");
            this.LookAheadNodeType.Dump(stream);
        }