def symbol(ident, bp=0):
    '''
    Gets (and create if not exists) as named symbol.

    Optionally, you can specify a binding power (bp) value, which will be used
    to control operator presedence; the higher the value, the tighter a token
    binds to the tokens that follow.
    '''
    try:
        s = SYMBOLS[ident]
    except __HOLE__:
        class s(SymbolBase):
            pass
        s.__name__ = 'symbol-%s' % (ident,)
        s.ident = ident
        s.lbp = bp
        SYMBOLS[ident] = s
    else:
        s.lbp = max(bp, s.lbp)
    return s

# Helper functions
dataset/ETHPy150Open tehmaze/nagios-cli/nagios_cli/filters/parser.py/symbol