lets make and embeddable runner (all static allocated) to go on a microcontroller that will interpret and exec some bytecode as fast as possible.
answer me only with the relevant code, all handmade, no external library (except maybe the std and yaml loading ) and make it so that its easy with a yaml define a new command, specify which parameters expects and generate the boilerplate code (to be filled in later in cpp) for the runner to be flashed inside the microcontroller. ideally this whole toolset should be comprised of:
an input yaml file with a good schema that declares the set of commands, with their parameters, and some configuration options for the runner (like stack size, and similar)
a templater that creates a boilerplate for the source cpp to be later compiled into the "runner" based on the yaml configuration and emits a map of command-bytecode value to be later used by the compiler
a compiler that, based on the command-bytecode map and their syntax, converts code into bytecode
a runner to be flashed inside the microcontroller that gets extendend by the user with the implementations of the commands. ideally in separate files, as the runtime can be fixed and already provided in the main file.
give me only the code for every tool mentioned, no comments or explanations. keep in mind that the code must be correct and compilable.
also
as the commands will be also made of math operations, provide a mean to interpret, without recursion, a stack of math and logic operations (e.g. "load <(10+a)*(log(pin[10])+7)>" or similar)
as you can see there is the option of giving string names to objects (variables) that should then be converted to ids that the runner can map to phisical devices of custom function calls. the structure of those elements should also be provided in the yaml descriptor. obviously this can't translate to interpreting string inside the runner, so be mindful and make the correct decisions for the ideal on-board representation.