Esempio n. 1
0
 public override bool Match(IParserState p)
 {
     while (FirstChild.Match(p))
     {
     }
     return(true);
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
 public override bool Match(IParserState p)
 {
     FirstChild.Match(p);
     return(true);
 }