2 ms·
There's a really gorgeous technique for implementing good error messages with LR parsers: http://lambda-the-ultimate.org/node/4781#comment-76724 http://lambda-t
by drothlis 11y ago
There's a really gorgeous technique for implementing good error messages with LR parsers: http://lambda-the-ultimate.org/node/4781#comment-76724 http://lambda-the-ultimate.org/node/4781#comment-76724
(I haven't used the above personally, but the Golang parser does.)
Personally I have used PEG parsers and I was able to provide great error messages, by using the "cut" operator in the appropriate places in the grammar (see comments earlier in the thread I linked above).