Update parser.cpp

Replaced the comparison to std::string::npos with -1, and included an explanation of such a number