def p_bound_terminal(self, p):
        """bound_terminal : unbound_terminal"""
        if p[1][0].literal in ['*', '**']:
            p[0] = [_Segment(_BINDING, '$%d' % self.binding_var_count),
                    p[1][0],
                    _Segment(_END_BINDING, '')]
            self.binding_var_count += 1
        else:
            p[0] = p[1]
def p_bound_terminal ( self , p ) : if p [ 1 ] [ 0 ] . literal in [ '*' , '**' ] : p [ 0 ] = [ _Segment ( _BINDING , '$%d' % self . binding_var_count ) , p [ 1 ] [ 0 ] , _Segment ( _END_BINDING , '' ) ] self . binding_var_count += 1 else : p [ 0 ] = p [ 1 ]
bound_terminal : unbound_terminal