Esempio n. 1
0
 public override bool Match(IParserState p)
 {
     if (p.AtEnd())
     {
         return(false);
     }
     if (p.GetChar() >= mFirst && p.GetChar() <= mLast)
     {
         p.GotoNext();
         return(true);
     }
     return(false);
 }
Esempio n. 2
0
 public override bool Match(IParserState p)
 {
     if (p.AtEnd())
     {
         return(false);
     }
     if (p.GetChar() == mData)
     {
         p.GotoNext();
         return(true);
     }
     return(false);
 }
Esempio n. 3
0
 public override bool Match(IParserState p)
 {
     if (p.AtEnd())
     {
         return(false);
     }
     foreach (char c in mData)
     {
         if (c == p.GetChar())
         {
             p.GotoNext();
             return(true);
         }
     }
     return(false);
 }
Esempio n. 4
0
        public override bool Match(IParserState p)
        {
            int pos = p.GetPos();

            foreach (char c in mData)
            {
                if (p.AtEnd())
                {
                    p.SetPos(pos);
                    return(false);
                }

                if (p.GetChar() != c)
                {
                    p.SetPos(pos);
                    return(false);
                }
                p.GotoNext();
            }
            return(true);
        }
Esempio n. 5
0
 public override bool Match(IParserState p)
 {
     if (p.AtEnd()) return false;
     if (p.GetChar() >= mFirst && p.GetChar() <= mLast)
     {
         p.GotoNext();
         return true;
     }
     return false;
 }
Esempio n. 6
0
 public override bool Match(IParserState p)
 {
     if (p.AtEnd())
         return false;
     foreach (char c in mData)
     {
         if (c == p.GetChar())
         {
             p.GotoNext();
             return true;
         }
     }
     return false;
 }
Esempio n. 7
0
        public override bool Match(IParserState p)
        {
            int pos = p.GetPos();
            foreach (char c in mData)
            {
                if (p.AtEnd())
                {
                    p.SetPos(pos);
                    return false;
                }

                if (p.GetChar() != c)
                {
                    p.SetPos(pos);
                    return false;
                }
                p.GotoNext();
            }
            return true;
        }
Esempio n. 8
0
 public override bool Match(IParserState p)
 {
     if (p.AtEnd())
         return false;
     if (p.GetChar() == mData)
     {
         p.GotoNext();
         return true;
     }
     return false;
 }