FormeleMethode/RegExpression.cs
/// <summary>
/// Easier visualisation of the regexpression as string
/// </summary>
Easier visualisation of the regexpression as string
Easier visualisation of the regexpression as string
public override string ToString()
		{
			string regexString = "";
			if (terminals != "")
			{
				regexString = terminals;
			}
			else
			{
				if (right != null)
				{
					regexString += "(";
				}
				regexString += left.ToString();
				switch (o)
				{
					case Operator.PLUS:
						regexString += '+';
						break;
					case Operator.STAR:
						regexString += '*';
						break;
					case Operator.OR:
						regexString += '|';
						break;
				}
				if (right != null)
				{
					regexString += right.ToString();
					regexString += ')';
				}
			}
			return regexString;
		}
public override string ToString ( ) { string regexString = " " ; if ( terminals != " " ) { regexString = terminals ; } else { if ( right != null ) { regexString += " " ; } regexString += left . ToString ( ) ; switch ( o ) { case Operator . PLUS : regexString += ' ' ; break ; case Operator . STAR : regexString += ' ' ; break ; case Operator . OR : regexString += ' ' ; break ; } if ( right != null ) { regexString += right . ToString ( ) ; regexString += ' ' ; } } return regexString ; }
Easier visualisation of the regexpression as string
Easier visualisation of the regexpression as string