Nov-14-2019, 09:19 PM
hi I've been reading this blog on how to write your own compiler using python but I'm stuck.
in the parser section of the blog after writing all the code and trying to run python main.py I get this error:
according to this thread it seems like a problem with newer versions of python. but I'm a python noobie. honestly i didn't get most of it but basically I have to make python find Parser but don't know how...
anybody has any suggestions?
ps: I'm used to programming environments but mostly C# so I can understand you if you make it simple
in the parser section of the blog after writing all the code and trying to run python main.py I get this error:
Quote:C:\ProgramData\Miniconda3\python.exe C:\Users\mohse\PycharmProjects\ebnf\main.py
Traceback (most recent call last):
File "C:\Users\mohse\PycharmProjects\ebnf\main.py", line 2, in <module>
from parser import Parser
ImportError: cannot import name 'Parser' from 'parser' (unknown location)
Process finished with exit code 1
according to this thread it seems like a problem with newer versions of python. but I'm a python noobie. honestly i didn't get most of it but basically I have to make python find Parser but don't know how...
anybody has any suggestions?
ps: I'm used to programming environments but mostly C# so I can understand you if you make it simple