Make it possible to inject a code between lexer and parser

Move ruleset and other lexer logic to separate class.
Now it's possible, i.e. to filter out tokens.