Skip to content

Commit

Permalink
996 out of 996 tests. But some are broken never the less. How come?
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlei committed Aug 27, 2016
1 parent 5a6e20c commit 43f060f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 32 deletions.
2 changes: 1 addition & 1 deletion smop/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def main():
fp = open(options.output, "w")

print >> fp, "# Autogenerated with SMOP " + version.__version__
print >> fp, "from __future__ import division"
#print >> fp, "from __future__ import division"
print >> fp, "from smop.core import *"
if options.link:
print >> fp, "from %s import *" % options.link
Expand Down
36 changes: 6 additions & 30 deletions smop/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,34 +124,6 @@ def p_args(p):
p[0] = p[1]
p[0].append(p[2])


@exceptions
def p_args_opt(p):
"""
args_opt :
| LPAREN RPAREN
| LPAREN expr_list RPAREN
"""
flag = False
if len(p) == 1:
p[0] = node.expr_list()
elif len(p) == 3:
p[0] = node.expr_list()
elif len(p) == 4:
assert isinstance(p[2],node.expr_list)
p[0] = p[2]
flag = True
else:
assert 0

if flag:
t = p[2][-1]
if isinstance(t,node.ident) and t.name=="varargin":
t.name = "*varargin"
for t in p[2]:
if isinstance(t,node.ident) and t.name != '*varargin':
t.init = node.ident("None")


@exceptions
def p_break_stmt(p):
Expand Down Expand Up @@ -454,10 +426,14 @@ def p_expr_ident(p):
@exceptions
def p_ident_init_opt(p):
"""
ident_init_opt : ident
ident_init_opt : NEG
| ident
| ident EQ expr
"""
p[0] = p[1]
if p[1] == '~':
p[0] = node.ident("__")
else:
p[0] = p[1]
if len(p) == 2:
p[0].init = node.ident(name="None") if p[0].name != "varargin" else ""
else:
Expand Down
2 changes: 1 addition & 1 deletion smop/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.28'
__version__ = '0.29'

0 comments on commit 43f060f

Please sign in to comment.