예제 #1
0
 private static void InternalRunParse(IParseRunner parseRunner)
 {
     while (!parseRunner.EndOfStream())
     {
         Assert.IsTrue(parseRunner.Read(), $"Parse Failed at Position {parseRunner.Position}");
     }
     Assert.IsTrue(parseRunner.ParseEngine.IsAccepted(), $"Parse was not accepted");
 }
예제 #2
0
 private static bool RunParse(IParseRunner lexer)
 {
     while (!lexer.EndOfStream())
     {
         if (!lexer.Read())
         {
             return(false);
         }
     }
     return(lexer.ParseEngine.IsAccepted());
 }
예제 #3
0
        private static void InternalRunParse(IParseRunner parseRunner)
        {
            while (!parseRunner.EndOfStream())
            {
                if (!parseRunner.Read())
                {
                    Assert.Fail($"Parse Failed at Position {parseRunner.Position}");
                }
            }

            if (!parseRunner.ParseEngine.IsAccepted())
            {
                Assert.Fail($"Parse was not accepted");
            }
        }