Did I find the right examples for you? yes no

All Samples(223)  |  Call(217)  |  Derive(0)  |  Import(6)
Str(s) is an RE which matches the literal string |s|.
Str(s1, s2, s3, ...) is an RE which matches any of |s1| or |s2| or |s3|...

        def Str(*strs):
    """
    Str(s) is an RE which matches the literal string |s|.
    Str(s1, s2, s3, ...) is an RE which matches any of |s1| or |s2| or |s3|...
    """
    if len(strs) == 1:
        return Str1(strs[0])
    else:
        result = Alt(*tuple(map(Str1, strs)))
        result.str = "Str(%s)" % ','.join(map(repr, strs))
        return result
        


src/e/s/essig-HEAD/vm/cython/Cython/Compiler/Lexicon.py   essig(Download)
def make_lexicon():
    from Cython.Plex import \
        Str, Any, AnyBut, AnyChar, Rep, Rep1, Opt, Bol, Eol, Eof, \
        TEXT, IGNORE, State, Lexicon
    from Scanning import Method
 
    decimal = Rep1(digit)
    dot = Str(".")
    exponent = Any("Ee") + Opt(Any("+-")) + decimal
    decimal_fract = (decimal + dot + Opt(decimal)) | (dot + decimal)
 
    name = letter + Rep(letter | digit)
    intconst = decimal | (Str("0") + ((Any("Xx") + Rep1(hexdigit)) |
 
    sq_string = (
        Str("'") + 
        Rep(AnyBut("\\\n'") | (Str("\\") + AnyChar)) + 
        Str("'")

src/c/y/CythonCTypesBackend-HEAD/Cython/Compiler/Lexicon.py   CythonCTypesBackend(Download)
def make_lexicon():
    from Cython.Plex import \
        Str, Any, AnyBut, AnyChar, Rep, Rep1, Opt, Bol, Eol, Eof, \
        TEXT, IGNORE, State, Lexicon
    from Scanning import Method
 
    decimal = Rep1(digit)
    dot = Str(".")
    exponent = Any("Ee") + Opt(Any("+-")) + decimal
    decimal_fract = (decimal + dot + Opt(decimal)) | (dot + decimal)
 
    name = letter + Rep(letter | digit)
    intconst = decimal | (Str("0") + ((Any("Xx") + Rep1(hexdigit)) |
 
    sq_string = (
        Str("'") +
        Rep(AnyBut("\\\n'") | (Str("\\") + AnyChar)) +
        Str("'")

src/p/l/plexnet-HEAD/third_party/python/Cython/Compiler/Lexicon.py   plexnet(Download)
def make_lexicon():
    from Cython.Plex import \
        Str, Any, AnyBut, AnyChar, Rep, Rep1, Opt, Bol, Eol, Eof, \
        TEXT, IGNORE, State, Lexicon
    from Scanning import Method
 
    decimal = Rep1(digit)
    dot = Str(".")
    exponent = Any("Ee") + Opt(Any("+-")) + decimal
    decimal_fract = (decimal + dot + Opt(decimal)) | (dot + decimal)
 
    name = letter + Rep(letter | digit)
    intconst = decimal | (Str("0x") + Rep1(hexdigit))
 
    sq_string = (
        Str("'") + 
        Rep(AnyBut("\\\n'") | (Str("\\") + AnyChar)) + 
        Str("'")

src/c/y/cython-HEAD/Cython/Compiler/Lexicon.py   cython(Download)
def make_lexicon():
    from Cython.Plex import \
        Str, Any, AnyBut, AnyChar, Rep, Rep1, Opt, Bol, Eol, Eof, \
        TEXT, IGNORE, State, Lexicon
    from Scanning import Method
 
    decimal = Rep1(digit)
    dot = Str(".")
    exponent = Any("Ee") + Opt(Any("+-")) + decimal
    decimal_fract = (decimal + dot + Opt(decimal)) | (dot + decimal)
 
    name = letter + Rep(letter | digit)
    intconst = decimal | (Str("0") + ((Any("Xx") + Rep1(hexdigit)) |
                      Any(raw_prefixes) + Opt(Any(bytes_prefixes)) |
                      Any(char_prefixes)
                      ) + (Str("'") | Str('"') | Str("'''") | Str('"""'))
    two_oct = octdigit + octdigit
    three_oct = octdigit + octdigit + octdigit

src/c/y/Cython-0.20.1/Cython/Compiler/Lexicon.py   Cython(Download)
def make_lexicon():
    from Cython.Plex import \
        Str, Any, AnyBut, AnyChar, Rep, Rep1, Opt, Bol, Eol, Eof, \
        TEXT, IGNORE, State, Lexicon
    from Scanning import Method
 
    decimal = Rep1(digit)
    dot = Str(".")
    exponent = Any("Ee") + Opt(Any("+-")) + decimal
    decimal_fract = (decimal + dot + Opt(decimal)) | (dot + decimal)
 
    name = letter + Rep(letter | digit)
    intconst = decimal | (Str("0") + ((Any("Xx") + Rep1(hexdigit)) |
                      Any(raw_prefixes) + Opt(Any(bytes_prefixes)) |
                      Any(char_prefixes)
                      ) + (Str("'") | Str('"') | Str("'''") | Str('"""'))
    two_oct = octdigit + octdigit
    three_oct = octdigit + octdigit + octdigit

src/p/y/pylibs-HEAD/Cython/Compiler/Lexicon.py   pylibs(Download)
def make_lexicon():
    from Cython.Plex import \
        Str, Any, AnyBut, AnyChar, Rep, Rep1, Opt, Bol, Eol, Eof, \
        TEXT, IGNORE, State, Lexicon
    from Scanning import Method
 
    decimal = Rep1(digit)
    dot = Str(".")
    exponent = Any("Ee") + Opt(Any("+-")) + decimal
    decimal_fract = (decimal + dot + Opt(decimal)) | (dot + decimal)
 
    name = letter + Rep(letter | digit)
    intconst = decimal | (Str("0x") + Rep1(hexdigit))
 
    sq_string = (
        Str("'") + 
        Rep(AnyBut("\\\n'") | (Str("\\") + AnyChar)) + 
        Str("'")