def p_feature_simple(self, t):
        """feature_simple : VAR comparator NUMBER VAR
                          | VAR comparator NUMBER
                          | VAR comparator LBRACK string_list RBRACK
                          | VAR comparator STRING"""

        if len(t) == 6:
            t[0] = Feature(t[1], t[2], t[4], line=t.lineno(1))
        elif len(t) == 5:
            t[0] = Feature(t[1], t[2], t[3], unit=t[4], line=t.lineno(1))
        elif len(t) == 4:
            t[0] = Feature(t[1], t[2], t[3], line=t.lineno(1))
def p_feature_simple ( self , t ) : if len ( t ) == 6 : t [ 0 ] = Feature ( t [ 1 ] , t [ 2 ] , t [ 4 ] , line = t . lineno ( 1 ) ) elif len ( t ) == 5 : t [ 0 ] = Feature ( t [ 1 ] , t [ 2 ] , t [ 3 ] , unit = t [ 4 ] , line = t . lineno ( 1 ) ) elif len ( t ) == 4 : t [ 0 ] = Feature ( t [ 1 ] , t [ 2 ] , t [ 3 ] , line = t . lineno ( 1 ) )
feature_simple : VAR comparator NUMBER VAR
                          | VAR comparator NUMBER
                          | VAR comparator LBRACK string_list RBRACK
                          | VAR comparator STRING