Refactorisation of code and functorization of the analyser
Adds litmus tests
Lexer for litmus: tokens only