js lexer implementation try