How to install Bison on Replit
I've been following a tutorial online on how to create a simple compiler using Lex, Bison, and LLVM, but I've been unable to get Bison working. I was able to install it through
install-pkg bison, but when I try to run it with
bison -d -o parser.cpp parser.y, it gives my an error saying
bison: /usr/share/bison/m4sugar/m4sugar.m4: cannot open: No such file or directory. Does anyone know a way to get bison working on Replit?
What a coincidence, I was working on a parser the other day as well!
In order to get
Bison on Replit, you need to use
install-pkg in the shell tab. The following commands let me use
bison commands, they should work for you too.
install-pkg bison install-pkg flex install-pkg byacc
flex is a mirror of
lex, you can't get lex on Replit right now. (If you can I don't know how)
Hey, so after reading some about bison, I found that bison is supposed to run on C, C++, or java. There are a bunch of cool features and abilities but I didn't see anything regarding python. I think your problem is that it doesn't run on python. I may be wrong, but from my research, theres little work done on python. On repl, I didn't find anything at all about bison so the chances of making it work is pretty low. I may be wrong, but I just suggest using java of c++. They are relatively easy programs to learn and there are millions of tutorials on it.