cleanup, add example output
[sv2nmigen.git] / parse_sv.py
index bd760f5e506ebaa059ad1d679ee147ba63906e2d..4973540dc4d55dc366c0d1034203623088f90462 100644 (file)
@@ -25,7 +25,7 @@ from lib2to3.pygram import python_symbols as syms
 
 yacc1_debug = 0
 yacc2_debug = 0
-parse_debug = 1
+parse_debug = 0
 
 from ply import yacc, lex
 
@@ -109,18 +109,6 @@ class DataType:
         self.typ = typ
         self.signed = signed
 
-def port_decl_do_not_use(comment, dt, name):
-    if dt is None or dt.dims is None:
-        width = '' # width: 1
-    else:
-        width = dt.dims
-        # XXX TODO, better checking, should be using data structure... *sigh*
-        width = width[1:-1] # strip brackets
-        width = width.split(':')
-        assert width[0] == '0'
-        width = width[1]
-    return 'self.%s = Signal(%s) # %s' % (name, width, comment)
-
 # -------------- RULES ----------------
 ()
 def p_source_text_1(p):