MixedCC (Mixed Compiler Compiler) is a parser-generator framework for multi-layer templates. It also works as a detachable stack machine engine. LL(1) BNF grammars of respective layers are specified in JavaCC-like syntax. The lexer is either JavaCC-generated or user-written. Tokens can represent stack-machine transition commands.
SPindent (Server Page Indenter) is a JSP/PHP structural validator and indenter. It performs structural compatibility check of inner HTML generated from "parallel" branches of process flow statements such as if/else. It allows for those HTML branches to have different entry and exit HTML stack points, as far as the branches are compatible. This allows for verification and proper indentation of handy workarounds, as well as rusty pyramids. It is based on MixedCC (Mixed Compiler Compiler).