Exemplo n.º 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;
				}
				);
		}
Exemplo n.º 2
0
		public override void VisitEnter(ZeroOrMore expression)
		{
		}
Exemplo n.º 3
0
		public override void VisitExecute(ZeroOrMore expression)
		{
		}
Exemplo n.º 4
0
		public override void VisitLeave(ZeroOrMore expression)
		{
			terminal.Peek().Append(")*");
		}
Exemplo n.º 5
0
		public override void VisitEnter(ZeroOrMore expression)
		{
			terminal.Peek().Append("(");
		}
Exemplo n.º 6
0
 public abstract void VisitExecute(ZeroOrMore expression);
Exemplo n.º 7
0
 public abstract void VisitEnter(ZeroOrMore expression);
Exemplo n.º 8
0
 public abstract void VisitLeave(ZeroOrMore expression);