victorlei / smop

Small Matlab to Python compiler
MIT License
1.08k stars 409 forks source link

NameError: name 'ret_expr' is not defined #157

Open amolkhanna opened 4 years ago

amolkhanna commented 4 years ago

When using SMOP to translate a .m file, I repeatedly run into the following error:

Traceback: Line 61, in main.py: stmt_list = parse.parse(buf if buf[-1] == '\n' else buf + '\n') Line 849, in parse.py: p = parser.parse( Line 331, in parse.py: return self.parseopt(input, lexer, debug, tracking, tokenfunc) Line 823, in parseopt.py: p.callable(pslice) Line 696, in p_return_stmt: p[0] = node.return_stmt(ret=ret_expr) NameError: name 'ret_expr' is not defined.

Could someone please tell me why this error occurs, and if there is a way to fix it? Thanks.

Hedilict commented 3 years ago

Hi, same error occurs. Have you ever solve this one?

Hedilict commented 3 years ago

When using SMOP to translate a .m file, I repeatedly run into the following error:

Traceback: Line 61, in main.py: stmt_list = parse.parse(buf if buf[-1] == '\n' else buf + '\n') Line 849, in parse.py: p = parser.parse( Line 331, in parse.py: return self.parseopt(input, lexer, debug, tracking, tokenfunc) Line 823, in parseopt.py: p.callable(pslice) Line 696, in p_return_stmt: p[0] = node.return_stmt(ret=ret_expr) NameError: name 'ret_expr' is not defined.

Could someone please tell me why this error occurs, and if there is a way to fix it? Thanks. Hi, same error occurs. Have you ever solve this one?

vencerk commented 3 years ago

= =same error。。

hedi-sel commented 3 years ago

Same problem

Nomel28 commented 1 year ago

Same problems, has this been resolved yet?