homework of Lex-analyzer --very simple