pyBabyMaker.engine.syntax¶
This module provide a parser for template macros extracted from C++ files.
A compromise is made to NOT support arithmetic operations at syntax level. If you need that, define your own functors.
This is because there’s a conflict in the LALR(1) resolution when having both
subtraction (a-b, where - is a binary operator) and negation
(-a, where - an unary operator).
We also choose to NOT parse if and for statements as a unified
block. This is because the parser works on a line-by-line basis—it doesn’t
have access to the whole “macro” source code.