Пример #1
0
		public override void VisitLeave(ZeroOrMore expression)
		{
			IsMatchPredicate local = _matchStack.Pop();
			_matchStack.Push(
				delegate(IInputIterator iterator)
				{
					Int32 savePosition = iterator.Index;
					while (local(iterator))
					{
						if (savePosition == iterator.Index)
						{
							//Exception ex = new InfiniteLoopDetectedException();
							//ex.Data.Add("Iterator.Index", iterator.Index);
							//var rulewriter = new WriteRuleVisitor();
							//expression.Accept(rulewriter);
							//ex.Data.Add("Expression", rulewriter.GrammarOutput);
							//throw ex;
							break;
						}
						savePosition = iterator.Index;
					}

					iterator.Index = savePosition;

					return true;
				}
				);
		}
Пример #2
0
		public override void VisitEnter(ZeroOrMore expression)
		{
		}
Пример #3
0
		public override void VisitExecute(ZeroOrMore expression)
		{
		}
Пример #4
0
		public override void VisitLeave(ZeroOrMore expression)
		{
			terminal.Peek().Append(")*");
		}
Пример #5
0
		public override void VisitEnter(ZeroOrMore expression)
		{
			terminal.Peek().Append("(");
		}
Пример #6
0
 public abstract void VisitExecute(ZeroOrMore expression);
Пример #7
0
 public abstract void VisitEnter(ZeroOrMore expression);
Пример #8
0
 public abstract void VisitLeave(ZeroOrMore expression);