4
내 파서 문법의 맨 아래에 다음과 같은 오류 처리기를 가지고 :오류
qi::on_error<qi::fail>(
launch,
std::cerr << phoenix::val("Paring error in ") << spirit::_4 << std::endl
<< phoenix::construct<std::string>(spirit::_3, spirit::_2)
<< std::endl
);
문제는 파서의 입력은 사전에 새로운 라인별로 헤어 졌 때문에 발생되지 않도록 오류 문은 오류 지점에서 끝까지 소스 코드에 모두 줄입니다.
phoenix::construct<std::string>(spirit::_3, spirit::_2)
오류가 발생한 한 줄만 인쇄 할 수 있습니까? '\n'
을 검색하려고하면 Phoenix의 의미가 문제가됩니다.