Check the document of this project at https://github.com/miguelemosreverte/CompilationTechniques/blob/master/documentation.pdf
and examples at /code_examples, where the resulting PDFs files, along with the LaTEX ones used to construct them, can be found.