Fixing and implement parser

Handled the case of parsing sequence token  leave trash in the factory.