Closed victorlei closed 6 years ago
option -c removed
lei@panda ~ $ smop -c 'for (i=1:10) ; 123 ; end'
from smop.core import *
Traceback (most recent call last): File "build/bdist.linux-x86_64/egg/smop/main.py", line 80, in main stmt_list = parse.parse(buf if buf[-1] == '\n' else buf + '\n') File "build/bdist.linux-x86_64/egg/smop/parse.py", line 846, in parse buf, tracking=1, debug=options.debug_parser, lexer=new_lexer) File "/usr/lib/python2.7/dist-packages/ply/yacc.py", line 329, in parse return self.parseopt(input, lexer, debug, tracking, tokenfunc) File "/usr/lib/python2.7/dist-packages/ply/yacc.py", line 815, in parseopt p.callable(pslice) File "build/bdist.linux-x86_64/egg/smop/parse.py", line 52, in p_top p[0].append(p[2]) File "build/bdist.linux-x86_64/egg/smop/node.py", line 106, in append assert isinstance(s,node), s.class AssertionError: <type 'NoneType'> Errors: 1 lei@panda ~ $
I'm getting this exact error when trying to transform a code. Why is it happening?
option -c removed
lei@panda ~ $ smop -c 'for (i=1:10) ; 123 ; end'
Autogenerated with SMOP 0.33
from smop.core import *
Traceback (most recent call last): File "build/bdist.linux-x86_64/egg/smop/main.py", line 80, in main stmt_list = parse.parse(buf if buf[-1] == '\n' else buf + '\n') File "build/bdist.linux-x86_64/egg/smop/parse.py", line 846, in parse buf, tracking=1, debug=options.debug_parser, lexer=new_lexer) File "/usr/lib/python2.7/dist-packages/ply/yacc.py", line 329, in parse return self.parseopt(input, lexer, debug, tracking, tokenfunc) File "/usr/lib/python2.7/dist-packages/ply/yacc.py", line 815, in parseopt p.callable(pslice) File "build/bdist.linux-x86_64/egg/smop/parse.py", line 52, in p_top p[0].append(p[2]) File "build/bdist.linux-x86_64/egg/smop/node.py", line 106, in append assert isinstance(s,node), s.class AssertionError: <type 'NoneType'> Errors: 1 lei@panda ~ $