Lisp HUG Maillist Archive

Handling parsergen warnings

I have a parser that I've created with DEFPARSER and it's working
great. The only thing I can't seem to do is handle parse errors (and
warnings). I don't want the parser to try and 'auto-correct' the
source by removing or inserting terminals. I've tried wrapping the
call to the parser in a handler-case, but that doesn't seem to be
throwing any conditions:

(defparser parser ...)

(defun parse-tokens (tokens-with-bad-token)
  (handler-case (parser #'get-next-token)
    (condition (c) (terminate-with-error-message))))

Is there anything I can do to display my own message when the parser
runs into a problem? I have filename/line number, and I'd like to show
this info instead of the generic parser text.

Thanks,

Jeff M.

-- 
http://www.retrobyte.org
mailto:massung@gmail.com

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________


Updated at: 2020-12-10 08:53 UTC