victorlei / smop

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

Matlab 'Parfor' raises a parser error message #96

Closed RobBW closed 7 years ago

RobBW commented 7 years ago

When I transpiled some code findOrientation.m.txt containing a 'parfor' command it raised the following error: SyntaxError: Unexpected "=" (parser) and did not process the file.

smop seems to be treating 'parfor' and the associated 'matlabpool' words as variable names and not as commands.

When I changed the code to a regular 'for' command it transpiled correctly.

Might I suggest that known, but unimplemented Matlab commands like 'parfor' insert a message "unimplemented in smop - please send me a solution!" and allow the transpilation to proceed instead of issuing an error message and stopping.

victorlei commented 7 years ago

getting a bug report for parfor in a way implies that everything else does work :) which is excellent news. Parfor was first reported on may 2014 and was never mentioned since then so i assume its a rarely used feature. But seriously, it is a sign of maturity, so maybe i should bump smop version to 1.0.0

victorlei commented 7 years ago

Thank you for sending a code sample... Will try to translate it asap

micklexqg commented 5 years ago

@RobBW ,Hi, I came across the same problem, SyntaxError: Unexpected "=" (parser) and did not process the file. have you solve it?

yaelfregier commented 4 years ago

@micklexqg, @RobBW, @victorlei, Hi, same here! I was trying to transpile the code of https://github.com/danmcduff/iphys-toolbox/blob/master/CHROM_DEHAAN.m or https://github.com/danmcduff/iphys-toolbox/blob/master/POS_WANG.m for example, and got the same error messages. Any update? Thanks!

RobBW commented 4 years ago

Try the forked version at: https://github.com/PatrickFURI/smop https://github.com/PatrickFURI/smop it seems to have fixed some of these problems. Regards Rob

RobBWilkinson@gmail.com

On 19/02/2020, at 00:03, yaelus notifications@github.com wrote:

@micklexqg https://github.com/micklexqg, @RobBW https://github.com/RobBW, @victorlei https://github.com/victorlei, Hi, same here! I was trying to transpile the code of https://github.com/danmcduff/iphys-toolbox/blob/master/CHROM_DEHAAN.m https://github.com/danmcduff/iphys-toolbox/blob/master/CHROM_DEHAAN.m or https://github.com/danmcduff/iphys-toolbox/blob/master/POS_WANG.m https://github.com/danmcduff/iphys-toolbox/blob/master/POS_WANG.m for example, and got the same error messages. Any update? Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/victorlei/smop/issues/96?email_source=notifications&email_token=ABRNQJQNHZZDUHABG4DU5GDRDO57VA5CNFSM4CYMOZG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMBRTZA#issuecomment-587405796, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRNQJWDKEWKPKRNQV4Y5ZTRDO57VANCNFSM4CYMOZGQ.

yaelfregier commented 4 years ago

Thanks a lot Rob!

Best regards, Yaël.