require "jslex"
local stream = jslex.new_stream(io.open(arg[1]));
local token_type, token_value = stream.get_token();
while token_type do
print("Token:", token_type, token_value);
token_type, token_value = stream.get_token();
end