def p_ranges(self, p):
        """ranges : ranges '|' range
                  | range"""
        n = len(p)
        if n == 4:
            p[0] = p[1] + [p[3]]
        elif n == 2:
            p[0] = [p[1]]
def p_ranges(self, p):
        
        n = len(p)
        if n == 4:
            p[0] = p[1] + [p[3]]
        elif n == 2:
            p[0] = [p[1]]
def p_ranges ( self , p ) : n = len ( p ) if n == 4 : p [ 0 ] = p [ 1 ] + [ p [ 3 ] ] elif n == 2 : p [ 0 ] = [ p [ 1 ] ]
ranges : ranges '|' range
                  | range
ranges : ranges | range | range