Add test infrastructure. Change to inheritance from Lexer instead of composition. Refactor utilities. Add raise_on_first_error. Change iteration behaviour.