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")
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)
def test_parses(self): self.assertParse( combinators.not_followed_by(primitives.match(lambda c: c == "h")), None, "ello", "ello")