I'm trying to parse a custom language (not too dissimilar to JSON), and I decided to try using boost expressive, as it looked fun.
However, when an xpressive match fails, it simply fails. Is there any way I can implement some kind of error reporting? Like 'the expression matched up until the 47th character (I can get the line numbers from that).
I can sort of see how one could tailor each sub expression to look for other tokens or matches after looking for the one it wants, and reporting an error in this case, but it seems that would be a very complex way of doing it.
Is there any functionality in expressive (or can anyone suggest an approach) that would allow me to do this?
Thanks.