updated lexer so it parses json and compiles a big regex from tokens