@@ -0,0 +1,941 @@
+#!/usr/bin/env python%0A%22%22%22%0A:Author Patrik Valkovic%0A:Created 20.08.2017 16:07%0A:Licence GNUv3%0APart of grammpy-transforms%0A%0A%22%22%22%0A%0A%0Afrom unittest import TestCase, main%0Afrom grammpy import *%0Afrom grammpy_transforms import ContextFree%0A%0Aclass S(Nonterminal): pass%0Aclass A(Nonterminal): pass%0Aclass B(Nonterminal): pass%0Aclass C(Nonterminal): pass%0Aclass Rules(Rule):%0A    rules = %5B%0A        (%5BS%5D, %5B0, A%5D),%0A        (%5BS%5D, %5B1, C%5D),%0A        (%5BS%5D, %5BC, C%5D),%0A        (%5BA%5D, %5BB%5D),%0A        (%5BB%5D, %5BS%5D),%0A        (%5BB%5D, %5BEPS%5D),%0A        (%5BC%5D, %5BA%5D),%0A        (%5BC%5D, %5BS%5D)%5D%0A%0A%0Aclass SimpleChainingTest(TestCase):%0A    def test_simpleChainingTest(self):%0A        g = Grammar(terminals=%5B0, 1%5D,%0A                    nonterminals=%5BS, A, B, C%5D,%0A                    rules=%5BRules%5D)%0A        n = ContextFree.find_terminals_rewritable_to_epsilon(g)%0A        self.assertEqual(len(n), 4)%0A        for i in %5BS, A, B, C%5D:%0A            self.assertIn(i, n)%0A%0A%0A%0A%0Aif __name__ == '__main__':%0A    main()%0A

Add next text of chaining when looking for nonterminals rewritable to epsilon