Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(41)  |  Call(40)  |  Derive(0)  |  Import(1)

src/m/i/MiniParse-0.2.0/MiniParse/Meta/Drawable/tests.py   MiniParse(Download)
from MiniParse.Meta.Drawable.Rule import Rule
from MiniParse.Meta.Drawable.Sequence import Sequence
from MiniParse.Meta.Drawable.Repetition import Repetition
from MiniParse.Meta.Drawable.Alternative import Alternative
from MiniParse.Meta.Drawable.Restriction import Restriction
    def testRepetitionWithLongForwardBranch(self):
        self.rules = [
            Rule("repetition", Repetition(
                NonTerminal("forward branch is longer"),
                NonTerminal("backward")
    def testRepetitionWithLongBackwardBranch(self):
        self.rules = [
            Rule("repetition", Repetition(
                Terminal("forward"),
                Terminal("backward branch is longer")
    def testImbricatedRepetitions(self):
        self.rules = [
            Rule("repetition", Repetition(
                Repetition(NonTerminal("forward 1"), NonTerminal("backward 1")),
                Repetition(NonTerminal("forward 2"), NonTerminal("backward 2"))