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

All Samples(6)  |  Call(5)  |  Derive(0)  |  Import(1)
Consumes one characters from a list of acceptable characters, OR, if
inverse=True, consumes one character as long as it is NOT an acceptable

src/p/l/plywood-1.6.3/plywood/run.py   plywood(Download)
import string
from chomsky import (
    Literal, Char, Chars, StringEnd, LineEnd, Whitespace,
    Optional, ZeroOrMore,
    MATCHERS = {
        'comment': Literal('#') + ZeroOrMore(Char('\r\n', inverse=True)) + LineEnd(),
        'number': PlywoodNumberGrammar,
        'string': PlywoodStringGrammar,
        'operator': PlywoodOperatorGrammar,
        ',': Char(','),
        ':': Char(':'),
        ',': Char(','),
        ':': Char(':'),
        '=': Char('='),
        'xml_open': Literal('<'),

src/p/l/plywood-1.6.3/plywood/grammar.py   plywood(Download)
class PlywoodVariableGrammar(chomsky.Variable):
    __metaclass__ = chomsky.VariableGrammarType
    starts_with = chomsky.Char(string.ascii_letters + '_')
    ends_with = chomsky.Chars(string.ascii_letters + '_:-' + string.digits, min=0) + chomsky.PrevIsNot(chomsky.L('-') | chomsky.L(':'))