Beispiel #1
0
		/// <remarks>
		/// The productions with a particular nonterminal D on their left sides
		/// are called the alternatives of D.
		/// </remarks>
		IEnumerable<Production> GetAlternatives(NonTerminal D)
		{
			var list = new SortedSet<Production> ();
			foreach (var p in this.Productions)
			{
				if (p.LeftPart == D) {
					list.Add (p);
				}
			}
			return list;
		}
		public Production (NonTerminal t, RewriteRule e)
		{
			this.LeftPart = t;
			this.RightPart = e;
		}