Integrated new Lexer.

- new lexer was rewritten in javascript;
- fixed the lexer to pass all the tests.