I would like to be able to print this error message using Ragel => Parsing error found at position line:col, Integer expected instead.
Is that possible with Ragel?
Best regards
I would like to be able to print this error message using Ragel => Parsing error found at position line:col, Integer expected instead.
Is that possible with Ragel?
Best regards
I haven't gotten too far into error handling in Ragel just yet, but I would expect that if you use the error action embedding operators as specified in section 3.2.3 of the Ragel 6.9 Guide, that would override the default message.
You can get the line number by incrementing a counter at each newline, and get the column by taking the current position and subtracting the position of the previous newline, something like this:
Of course, the above may require a bit of tweaking based on exactly what you're doing, but at least it's a starting point.