def symbol(self, 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 = self.symbols[ident]
        except KeyError:
            class s(SymbolBase):
                pass
            s.__name__ = 'symbol-%s' % (ident,)
            s.ident = ident
            s.lbp = bp
            self.symbols[ident] = s
        else:
            s.lbp = max(bp, s.lbp)
        return s