Exemplo n.º 1
0
 def testCenterRecursion(self):
     from pydsl.Grammar.Parser.RecursiveDescent import RecursiveDescentParser
     descentparser = RecursiveDescentParser(self.productionsetcr)
     result = descentparser.check(self.dots)
     self.assertTrue(result)
Exemplo n.º 2
0
 def testRecursiveDescentParserStore(self):
     from pydsl.Grammar.Parser.RecursiveDescent import RecursiveDescentParser
     descentparser = RecursiveDescentParser(self.productionset1)
     result = descentparser.check(self.tokelist1)
     self.assertTrue(result)
Exemplo n.º 3
0
 def testRecursiveDescentParserNullBad(self):
     from pydsl.Grammar.Parser.RecursiveDescent import RecursiveDescentParser
     descentparser = RecursiveDescentParser(self.productionset2)
     result = descentparser.check(self.tokelist4)
     self.assertTrue(not result)