modify bugs in lexer and add dump method in tokenstream