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