achieve the aprt of implementation of parse and scanner