Open AlexPoupakis opened 3 years ago
Hey @AlexPoupakis, thanks for reaching out!
I fixed the error: tokens.h: No such file or directory
, this will get the example parser compile again.
But, the examples are a little bit out of date, so they are currently not running.
I added a short introduction in the README.md on debugging, so that you can better debug the parser you are creating.
Thanks @sbrodehl. I updated pybison (even uninstalling and re-installing it) but still get the error: tokens.h: No such file or directory
...
Have you used the updated example files as well? Which example do you use?
Ahh sorry, I was using the old ones for C. Something else I noticed is that in the python script, you are calling main
with a tuple and then calling args.remove()
. Since args contains just a tuple, remove
will cause an error because tuples are immutable.
@sbrodehl I am also unable to run the examples for C and Java as well, I got the error self.engine.runEngine(debug) NameError: name 'debug' is not defined
I am using ubuntu 18.04, and I have python 3.6.9 installed
Hi @yh0508619,
the variable debug
should be defined :thinking:
What version are you using? Maybe try the latest release?
On a general note, the examples and tests are very outdated and do not work with current flex/bison versions!
@sbrodehl Thanks for your rapid response I am using the latest version on the github. The versions for bison and flex are: bison (GNU Bison) 3.0.4 flex 2.6.4
Hi @sbrodehl
Sorry to bother you again, which python version you are using ? I installed python 3.9, but error becomes: ImportError: cannot import name 'BisonParser' from 'bison'
Thanks!
Have you installed the pybison package? Make sure to build the shared libraries, e.g. using python setup.py build
.
Have you installed the pybison package? Make sure to build the shared libraries, e.g. using
python setup.py build
.
Yeah, bison, flex and pybison are installed
Sorry, I can not reproduce this. Maybe submit a detailed report as a separate issue?
The examples are built without issue, but running them raises multiple warnings and errors. The message starts with
followed by many
assignment from int without cast
warnings and ends withI get the same message for both C and Java examples. The issue is similar to #19 and was supposedly fixed in the latest version.
OS: Ubuntu 18.04.5 (also tested on CentOS 7 & 8)
Tool versions: flex 2.6.4 (latest), bison 3.0.4 (latest), pybison 0.2.9 (latest)