示例#1
0
 def test_parses_non_ll1(self):
     self.assertParse(
         combinators.not_followed_by(combinators.sequence(
             primitives.match(lambda c: c == "h"),
             primitives.match(lambda c: c == "e"))),
         None, "hllo", "hllo")
示例#2
0
 def test_fails_to_parse(self):
     e = self.assertSimpleParseFailure(
         combinators.not_followed_by(primitives.match(lambda c: c == "h")),
         "hello")
     self.assertEqual(set(), e.expected)
示例#3
0
 def test_parses(self):
     self.assertParse(
         combinators.not_followed_by(primitives.match(lambda c: c == "h")),
         None, "ello", "ello")