コード例 #1
0
ファイル: test_Parser.py プロジェクト: momirza/pydsl
 def testCenterRecursion(self):
     from pydsl.Grammar.Parser.RecursiveDescent import RecursiveDescentParser
     descentparser = RecursiveDescentParser(self.productionsetcr)
     result = descentparser.check(self.dots)
     self.assertTrue(result)
コード例 #2
0
ファイル: test_Parser.py プロジェクト: momirza/pydsl
 def testRecursiveDescentParserStore(self):
     from pydsl.Grammar.Parser.RecursiveDescent import RecursiveDescentParser
     descentparser = RecursiveDescentParser(self.productionset1)
     result = descentparser.check(self.tokelist1)
     self.assertTrue(result)
コード例 #3
0
ファイル: test_Parser.py プロジェクト: momirza/pydsl
 def testRecursiveDescentParserNullBad(self):
     from pydsl.Grammar.Parser.RecursiveDescent import RecursiveDescentParser
     descentparser = RecursiveDescentParser(self.productionset2)
     result = descentparser.check(self.tokelist4)
     self.assertTrue(not result)