Пример #1
0
		public AssertiveParser( AssertDelegate assertDelegate, Parser parser, string id, string message)
		{
			if (parser == null)
			{
				throw new ArgumentNullException("parser");
			}

			if (id == null)
			{
				throw new ArgumentNullException("id");
			}

			if (id == string.Empty)
			{
				throw new ArgumentException("id cannot be empty");
			}
			Parser = parser;
			Message = message;
			ID = id;
			Assert = assertDelegate;

		}
Пример #2
0
		/// <summary>
		/// constructor
		/// </summary>
		/// <param name="parser"></param>
		public UnaryTerminalParser(Parser parser)
		{
			Parser = parser;
		}
Пример #3
0
		public AssertiveParser(Parser parser, string id, string message):
			this(AssertMatchSuccess, parser, id, message)
		{
		}
Пример #4
0
		/// <summary>
		/// constructor
		/// </summary>
		/// <param name="first"></param>
		/// <param name="second"></param>
		public BinaryTerminalParser(Parser first, Parser second)
		{
			FirstParser = first;
			SecondParser = second;
		}