def symbol(ident, bp=0):
    try:
        s = SYMBOLS[ident]
    except KeyError:
        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
Gets (and create if not exists) as named symbol.
dataset/ETHPy150Open tehmaze/nagios-cli/nagios_cli/filters/parser.py/symbol