Closed kfsone closed 2 years ago
@kfsone, thanks for the feedback.
your recommended approach for this / pointer to examples / doc, cpp-peglib reports errors in ascending order of positions. So there is no way to reverse the order.
is there something like %p for 'prior' in message? No
do error-recovery labels support precedence? No
Sorry for causing the inconvenience...
Given
I want to prioritize errors regarding "value" over errors regarding the missing space. so:
would complain about missing space, but
would both complain about the value.
In the second case, if it complains about both, I would like to try and produce the diagnostic:
I'd prefer that order, because the real problem is the data not the style, but other-way-around is ok too.
Currently, I only appear to be able to create a non-recovering recovery that gives you the "bad value" type error:
with
x =2
givesmissing space
, withx =q
gives the same diagnostic asx = q
(expcted number).Questions are:
%p
for 'prior' inmessage
?