diff --git a/smop/backend.py b/smop/backend.py index 8ac04d92..7c8a8b31 100644 --- a/smop/backend.py +++ b/smop/backend.py @@ -325,9 +325,9 @@ def _backend(self,level=0): def _backend(self,level=0): return "global %s" % self.global_list._backend() -@extend(node.ravel) -def _backend(self,level=0): - return "%s.ravel()" % self.args[0]._backend() +#@extend(node.ravel) +#def _backend(self,level=0): +# return "%s.ravel()" % self.args[0]._backend() @extend(node.return_stmt) def _backend(self,level=0): diff --git a/smop/lexer.py b/smop/lexer.py index 315bbfa9..5e068267 100644 --- a/smop/lexer.py +++ b/smop/lexer.py @@ -245,7 +245,7 @@ def t_ERROR_STMT(t): # keep multiline comments def t_COMMENT(t): - r"(^[ \t]*[%#][^!].*\n)+" + r"(^[ \t]*[%#][^!\n].*\n)+" t.lexer.lineno += t.value.count("\n") if not options.no_comments: t.type = "COMMENT" diff --git a/smop/parse.py b/smop/parse.py index a174db95..98b93fc6 100644 --- a/smop/parse.py +++ b/smop/parse.py @@ -565,7 +565,7 @@ def p_funcall_expr(p): """expr : expr LPAREN expr_list RPAREN | expr LPAREN RPAREN """ - if (0 and len(p)==5 and + if (len(p)==5 and len(p[3])==1 and p[3][0].__class__ is node.expr and p[3][0].op == ":" and not p[3][0].args): @@ -845,7 +845,11 @@ def parse(buf): if "1" in options.debug: for i,pi in enumerate(p): - print i,pi.__class__.__name__,str(pi)[:50] + print i,pi.__class__.__name__,pi._backend() + + if "p" in options.debug: + import pdb + pdb.set_trace() for i in range(len(p)): if isinstance(p[i], node.func_stmt): diff --git a/smop/version.py b/smop/version.py new file mode 100644 index 00000000..4a753b0b --- /dev/null +++ b/smop/version.py @@ -0,0 +1 @@ +__version__ = '0.28'