The more you know about the it, the more you want to know. Wikipedia itself also contains a lot of good articles on the subject. He generates code for introspection purposes, and really show a simple and effective way of generating code that works for you. My interest was rekindled in 2015, when I was following the amazing Casey Muratori and his Handmade Hero. This is for me the best website on the subject, very precise and readable and follows closely what is inside the Dragon Book: It is an intense book and explores writing a full compiler with depth, starting from Automata theory (just reminds me of how everything you study can be useful, I did 2 exams at University about that, wondering when I would use it! Hello prof Di Battista!) to full code examples: The “ Dragon Book” (called because of the dragon in the cover) is still THE to-go in compiler writing as far as I know. There are few links on both theory and practice that can help shed some light on the subject: Long answer: we will be writing the simplest possible compiler that reads a source file and transform in a destination file, like Flatbuffers. This will be the second step into data-driven rendering: code generation. It could sound exaggerated, but I really believe in that.Īs always, both ImGui and SDL will be our sword and shields for this adventure. In a time in which iteration time has become almost more important than the tech itself, playing with this balance can be the key for any successful software. There is a balance that constantly needs to be found between code and data, and having a code-generator in my opinion helps tremendously in focus on the code that is necessary to be written.įrom a data perspective, normally the ‘baking’ pipeline is a series of DCC formats as source transformed into very project specific and optimized data.Ĭode-wise, depending on the engine/technology you are using, ‘baking’ of the code is more uncommon. In this article I want to show how to write a very simple code-generator to help you automate writing of code in any language. Motivationįollowing my previous article about Flatbuffers and data reflection the quest for Data-Driven Rendering continues! UI using ImGUI, SDL and the code generated with this article.
0 Comments
Leave a Reply. |