Emiel Bruijntjes: Building a smarty-to-machine-code compiler
Channel: Free and Open Source Software Conference (FrOSCon) e.V.
Date: 2014-08-24

http://programm.froscon.de/2014/events/1444.html
https://media.ccc.de/browse/conferences/froscon/2014/froscon2014_-_1444_-_en_-_hs6_php_-_201408241630_-_building_a_smarty-to-machine-code_compiler_-_emiel_bruijntjes.html

The open source SmartTpl libraries greatly speeds up Smarty templates bij turning templates into native machine code. During a crash course 'how to write your own compiler' you will see how this alternative template engine works inside, and you will discover that writing a compiler is not even that difficult. 

The following topics will be covered:

- splitting up a source file into tokens
- building a syntax tree
- optimizing the syntax tree
- generating machine code
- just-in-time (JIT) compilers

Techniques and patterns that are used for building compilers are also very useful in other situations when you want to parse data.