//----< make a copy of semiEpression >-------------------------------

            public SemiExpression clone()
            {
                SemiExpression copy = new SemiExpression();

                for (int i = 0; i < count; ++i)
                {
                    copy.Add(this[i]);
                }
                return(copy);
            }
            public void trim()
            {
                SemiExpression temp = new SemiExpression();

                foreach (string tok in semiExp)
                {
                    if (isWhiteSpace(tok))
                    {
                        continue;
                    }
                    temp.Add(tok);
                }
                semiExp = temp.semiExp;
            }
            //----< test for equality >------------------------------------------

            override public bool Equals(Object semi)
            {
                SemiExpression temp = (SemiExpression)semi;

                if (temp.count != this.count)
                {
                    return(false);
                }
                for (int i = 0; i < temp.count && i < this.count; ++i)
                {
                    if (this[i] != temp[i])
                    {
                        return(false);
                    }
                }
                return(true);
            }
            static bool testfile(string path)
            {
                SemiExpression test = new SemiExpression();

                if (!test.open(path))
                {
                    Console.Write("\n  Can't open file {0}", path);
                    return(false);
                }
                int setcount = 0;

                while (test.getSemi())
                {
                    setcount++;
                    Console.Write("\n**Set {0}", setcount);
                    test.display();
                }
                test.close();
                return(true);
            }