def p_port_connection_dot(t): 'port_connection : DOT ID LPAREN primary RPAREN' if type(t[4]) is str and t[4].find(':') != -1: print "Warning: multibit wire as port connection", t[4] range_obj = classes.Range() x = t[4].split('[') range_obj.parse_string(x[-1]) wl = wire_enumeration(range_obj, x[0]) t[0] = [(t[2], wl)] else: t[0] = [(t[2], t[4])]
def p_range(p): """range : ID '=' INT ':' INT | ID '=' INT ':' ID | ID '=' ID ':' INT | ID '=' ID ':' ID""" p[0] = classes.Range(p[1], p[3], p[5])
def p_range_e(t): 'range :' t[0] = classes.Range()
def p_range_s(t): 'range : LSQUARE number RSQUARE' t[0] = classes.Range(t[2])
def p_range_r(t): 'range : LSQUARE number COLON number RSQUARE' t[0] = classes.Range(t[2], t[4])