trigger warning from boost spirit parser
问题 How I can add warnings in boost spirit parser. Edit: ... that could report the issue with position For example if I have an integer parser: ('0' >> oct) | int_ I would like to be able to do something like this: ('0' >> oct) | "-0" --> trigger warning("negative octal values are not supported, it will be interpreted as negative decimal value and the leading 0 will be ignored") | int_ 回答1: Q. Can I create my own callback? How? A. Sure. Any way you'd normally do it in C++ (or look at Boost