return Leaf(token.DEDENT, '')
def nl(self):
return Leaf(token.NEWLINE, '\n')
+
+ def port_decl(self,comment, dt, name):
+ return None # TODO
def initPorts(self,params,ports):
pass_stmt = Node(syms.pass_stmt ,[Leaf(token.NAME, "def __init__(self):#FIXME")])
stmts.children.append(self.indent(2))
stmts.children.append(Leaf(token.STRING,"m = Module()"))
stmts.children.append(self.nl())
- ##
+ ##
+ for a in self.assign:
+ stmts.children.append(self.indent(2))
+ stmts.children.append(Leaf(token.STRING,"#FIXME_ASSIGN"+str(list(a[8]))))
+ stmts.children.append(self.nl())
+
stmts.children.append(self.indent(2))
stmts.children.append(Leaf(token.STRING,"return m"))
stmts.children.append(self.nl())
# combinatorical assign
def cont_assign_1(self,p):
- self.printpy("#ASSIGN"+str(list(p)))
+ #self.printpy("#ASSIGN"+str(list(p)))
self.assign += [p]
self.typ = typ
self.signed = signed
-def port_decl(comment, dt, name):
+def port_decl_do_not_use(comment, dt, name):
if dt is None or dt.dims is None:
width = '' # width: 1
else:
def p_port_declaration_1(p):
'''port_declaration : attribute_list_opt K_input net_type_opt data_type_or_implicit IDENTIFIER dimensions_opt '''
if(parse_debug): print('port_declaration_1 FIXME', list(p))
- # XXX TODO: python AST
comment, dt, name = p[2], p[4], p[5]
- p[0] = port_decl(comment, dt, name)
+ p[0] = absyn.port_decl(comment, dt, name)
# { Module::port_t*ptmp;
# perm_string name = lex_strings.make(p[5]);
# data_type_t*use_type = p[4];
def p_port_declaration_5(p):
'''port_declaration : attribute_list_opt K_output net_type_opt data_type_or_implicit IDENTIFIER dimensions_opt '''
if(parse_debug): print('port_declaration_5 FIXME', list(p))
- # XXX TODO: python AST
comment, dt, name = p[2], p[4], p[5]
- p[0] = port_decl(comment, dt, name)
+ p[0] = absyn.port_decl(comment, dt, name)
# { Module::port_t*ptmp;
# perm_string name = lex_strings.make(p[5]);
# data_type_t*use_dtype = p[4];