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.
Yab to C converter
|
03-09-2021, 10:10 PM
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.
03-13-2021, 05:36 PM
The core is taking shape. I think I just passed 1500 lines of code. https://github.com/SamuraiCrow/Yab2Cpp
This is looking good. Any hint on how to compile it, or is there a make file?
03-14-2021, 09:55 PM
(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!
03-18-2021, 08:04 AM
Well it compiles to object code now. Getting it to link is going to be tricky and will take serious organizational skills.
03-19-2021, 08:12 AM
03-19-2021, 06:30 PM
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.
03-20-2021, 08:59 AM
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, 09:53 AM
(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. |
« Next Oldest | Next Newest »
|
Users browsing this thread: 6 Guest(s)