victorlei / smop

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

Name resolution causes an exception #141

Open andreasg123 opened 5 years ago

andreasg123 commented 5 years ago

When running smop without the -R option, it causes an exception:

Traceback (most recent call last):
  File "/home/andreasg/py-virt/lib/python3.6/site-packages/smop-0.41-py3.6.egg/smop/main.py", line 66, in main
    G = resolve.resolve(stmt_list)
  File "/home/andreasg/py-virt/lib/python3.6/site-packages/smop-0.41-py3.6.egg/smop/resolve.py", line 51, in resolve
    G = as_networkx(t)
  File "/home/andreasg/py-virt/lib/python3.6/site-packages/smop-0.41-py3.6.egg/smop/resolve.py", line 39, in as_networkx
    if u.lexpos < v.lexpos:
TypeError: '<' not supported between instances of 'NoneType' and 'NoneType'

Here is the input file: https://github.com/fhernandogallego/sparsEDA/blob/master/sparsEDA.m