Flex Bison Grammar Project Template
This is an example project to help you run flex-bison with VisualStudio on Windows.
Using this project you can:
For reference, you can check out my first attempt ever at writing a programming language here:
No need, flex and bison binaries are already provided
If anybody wants, I can migrate the simple module for testing from the other project.
++ ?
Note: usually if you simply run the flex and bison commands it should generally work line with yacc on linux (meaning some things that work in c are allowed).
Because I added
lexer.l
%option outfile="lexer.cpp" header-file="lexer.hpp"
parser.y
%output "parser.cpp"
%defines "parser.hpp"
the code now behaves more like c++ and requires int yylex(void); to be defined in parser.y - most of the bison feature options are oriented towards c++.
If you see anything that can be improved, please open a PR
You can do anything you want with it, of course