how parsers work