The extension .yab is only used for convenience. There is no requirement to have an extension on a yab script and any filename is acceptable for s script, bound or built program.
After looking at the documentation for the latest version of Bison, I see it can generate C++ code directly so the need to update the interpreter is not so desperate. I'll put the bulk of my efforts into the transpiler first.
This is looking good. Any hint on how to compile it, or is there a make file?
(03-14-2021, 08:35 AM)bbjimmy Wrote: [ -> ]This is looking good. Any hint on how to compile it, or is there a make file?
I'm just roughing in a first-draft for now. Once I finish the function and variable support frameworks, maybe the print statement also, I'll start testing without the parser just to see if it generates executable code. I can try to make a makefile pretty soon and then the bug-hunting can commence! The last time I programmed in C++ was before C++11 was out and shared_ptr, "auto" to declare iterators and unordered_map have me spoiled!
Well it compiles to object code now. Getting it to link is going to be tricky and will take serious organizational skills.
(03-18-2021, 08:04 AM)SamuraiCrow Wrote: [ -> ]Well it compiles to object code now. Getting it to link is going to be tricky and will take serious organizational skills.
Yay object files!
Added a bunch of static initializers and now it builds and links! Now I need to finish the arrays and print statements so I can do test cases.
I had to make a link in /boot/home/config/non-packaged/bin called clang++ linking to /boot/system/develop/tools/bin/g++ to get it to build.
(03-20-2021, 08:59 AM)bbjimmy Wrote: [ -> ]I had to make a link in /boot/home/config/non-packaged/bin called clang++ linking to /boot/system/develop/tools/bin/g++ to get it to build.
I've now fixed the Makefile so that it'll build on GCC. I was using LLVM's Clang compiler because it gave better error messages.