How BooBoo works

Everything is broken up into operators and parameters. Each builtin function separates the previous and its parameters. Expressions and fish (what I call container indexes) are slurped up from start ( to end ) as a single unit and parsed into an intermediary format. When it comes time to evaluate an expression all the appropriate handlers are called with a vector of parameters until the final embedded () is done. Expressions return a temporary value, while fish return a reference to the exact location.

For example, the “for” loop construct in BooBoo is a pretty standard library function except that it knows about the program counter. The C++ backing function gets a list of Tokens, which can be literals, or some form of variable including expressions and fish. You can handle it the simple way and just request a number from a parameter or you may need something more advanced. Same with “if”.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *