Exemple #1
0
        public override String ToString()
        {
            switch (expression_type)
            {
            case SymbolicStringType.Concat:
                return(String.Join(" ", sub_strings.Select(x => x.ToString())));

            case SymbolicStringType.Repeat:
                if (root.expression_type == SymbolicStringType.Symbol)
                {
                    return(root.ToString() + "^(" + repeat.ToString() + ")");
                }
                else
                {
                    return("(" + root.ToString() + ")^(" + repeat.ToString() + ")");
                }

            case SymbolicStringType.Symbol:
                return(atomic_symbol);

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Exemple #2
0
 public override string ToString()
 {
     return("(" + remaining1.ToString() + ", " + remaining2.ToString() + ") when " + constraint.ToString());
 }