Here are the examples of the python api pydsl.parser.parser.parse taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Example 1
Project: pydsl Source File: test_Parser.py
def testverb(self):
"""Tests the lr0 table generation"""
from pydsl.parser.parser import parse, parser_factory
tokelist = [x.content for x in DummyLexer()(p0good)]
self.assertTrue(parse(productionset0, tokelist , "default"))
self.assertTrue(parse(productionset0, tokelist , "lr0"))
self.assertTrue(parse(productionset0, tokelist , "ll1"))
tokelist = [x.content for x in DummyLexer()(p0bad)]
self.assertFalse(parse(productionset0, tokelist , "default"))
self.assertFalse(parse(productionset0, tokelist , "lr0"))
self.assertFalse(parse(productionset0, tokelist , "ll1"))