Parser for state machine language

- Ad-hoc parser for state machine language
- Implementation for cooking hood
- Various minor supporting refactorings