public override bool Match(IParserState p) { while (FirstChild.Match(p)) { } return(true); }
public override bool Match(IParserState p) { int store = p.GetPos(); if (!FirstChild.Match(p)) { throw new ParsingException(p.GetInput(), store, p.GetPos(), FirstChild, Msg); } return(true); }
public override bool Match(IParserState p) { if (p.AtEnd()) { return(false); } int pos = p.GetPos(); if (FirstChild.Match(p)) { p.SetPos(pos); return(true); } Debug.Assert(p.GetPos() == pos); return(false); }
public override bool Match(IParserState p) { p.CreateNode(sLabel); // Used just to make sure the position is restored int pos = p.GetPos(); bool result = FirstChild.Match(p); if (result) { p.CompleteNode(); } else { p.AbandonNode(); // As-sure that the position is restored Debug.Assert(p.GetPos() == pos); } return(result); }
public override bool Match(IParserState p) { FirstChild.Match(p); return(true); }