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

All Samples(8)  |  Call(5)  |  Derive(0)  |  Import(3)

src/a/e/aenea-HEAD/grammars_available/multiedit.py   aenea(Download)
  pass
 
from dragonfly import (
    Alternative,
    AppContext,
                        for (key, value) in raul.ALPHANUMERIC.iteritems())
 
alphabet_rule = Sequence([Literal("letters"), Repetition(RuleRef(name="x", rule=MappingRule(name="t", mapping=alphabet_mapping)), min=1, max=20)])
numbers_rule = Sequence([Literal("digits"), Repetition(RuleRef(name="y", rule=MappingRule(name="u", mapping=numbers_mapping)), min=1, max=20)])
alphanumeric_rule = Sequence([Literal("alphanumeric"), Repetition(RuleRef(name="z", rule=MappingRule(name="v", mapping=alphanumeric_mapping)), min=1, max=20)])
    sequence, # Sequence of actions defined above.
    IntegerRef("n", 1, 100), # Times to repeat the sequence.
    Alternative([Literal("hi")], name="finish"),
]
 

src/a/e/aenea-HEAD/grammars_available/shell.py   aenea(Download)
from dragonfly import (
    Alternative,
    Choice,
    CompoundRule,
    Grammar,

src/a/e/aenea-HEAD/util/raul.py   aenea(Download)
from dragonfly import (Grammar, AppContext, CompoundRule, Choice, Dictation, List, Optional, Literal)
import natlink, os
 
def SelfChoice(name, ch):
  return Choice(name, dict(zip(ch, ch)))