示例#1
0
 def testCenterRecursion(self):
     from pydsl.Grammar.Parser.RecursiveDescent import RecursiveDescentParser
     descentparser = RecursiveDescentParser(self.productionsetcr)
     result = descentparser.check(self.dots)
     self.assertTrue(result)
示例#2
0
 def testRecursiveDescentParserStore(self):
     from pydsl.Grammar.Parser.RecursiveDescent import RecursiveDescentParser
     descentparser = RecursiveDescentParser(self.productionset1)
     result = descentparser.check(self.tokelist1)
     self.assertTrue(result)
示例#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)