New life of scanner:
fix all scanner function acording with grammar.