Yab to C converter - Printable Version +- yab | yet another Basic for HAIKU (https://yab.orgfree.com/forum) +-- Forum: General discussion (https://yab.orgfree.com/forum/forumdisplay.php?fid=8) +--- Forum: yab stuff (https://yab.orgfree.com/forum/forumdisplay.php?fid=10) +--- Thread: Yab to C converter (/showthread.php?tid=118) |
RE: Yab to C converter - bbjimmy - 02-26-2021 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. RE: Yab to C converter - SamuraiCrow - 03-09-2021 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. RE: Yab to C converter - SamuraiCrow - 03-13-2021 The core is taking shape. I think I just passed 1500 lines of code. https://github.com/SamuraiCrow/Yab2Cpp RE: Yab to C converter - bbjimmy - 03-14-2021 This is looking good. Any hint on how to compile it, or is there a make file? RE: Yab to C converter - SamuraiCrow - 03-14-2021 (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! RE: Yab to C converter - SamuraiCrow - 03-18-2021 Well it compiles to object code now. Getting it to link is going to be tricky and will take serious organizational skills. RE: Yab to C converter - bbjimmy - 03-19-2021 (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! RE: Yab to C converter - SamuraiCrow - 03-19-2021 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. RE: Yab to C converter - bbjimmy - 03-20-2021 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. RE: Yab to C converter - SamuraiCrow - 03-20-2021 (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. |