public override bool Match(Parser p) { int pos = p.GetPos(); if (mRule.Match(p)) { p.SetPos(pos); return(false); } Trace.Assert(p.GetPos() == pos); return(true); }
public override bool Match(Parser p) { int pos = p.GetPos(); while (!mTerm.Match(p)) { if (!mElem.Match(p)) { p.SetPos(pos); return(false); } } return(true); }
public override bool Match(Parser p) { int iter = p.GetPos(); foreach (Rule r in mRules) { if (!r.Match(p)) { p.SetPos(iter); return(false); } } return(true); }
public override bool Match(Parser p) { if (p.AtEnd()) { return(false); } var m = re.Match(p.Input, p.GetPos()); if (m == null || m.Index != p.GetPos()) { return(false); } p.SetPos(p.GetPos() + m.Length); return(true); }
public override bool Match(Parser p) { if (p.AtEnd()) { return(false); } int pos = p.GetPos(); foreach (char c in mData) { if (p.GetChar() != c) { p.SetPos(pos); return(false); } p.GotoNext(); } return(true); }
public override bool Match(Parser p) { int pos = p.GetPos(); while (!mTerm.Match(p)) { if (!mElem.Match(p)) { p.SetPos(pos); return false; } } return true; }
public override bool Match(Parser p) { if (p.AtEnd()) return false; int pos = p.GetPos(); foreach (char c in mData) { if (p.GetChar() != c) { p.SetPos(pos); return false; } p.GotoNext(); } return true; }
public override bool Match(Parser p) { int pos = p.GetPos(); if (mRule.Match(p)) { p.SetPos(pos); return false; } Trace.Assert(p.GetPos() == pos); return true; }
public override bool Match(Parser p) { int iter = p.GetPos(); foreach (Rule r in mRules) { if (!r.Match(p)) { p.SetPos(iter); return false; } } return true; }