[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/5] Don't crash if the scanner fails

From: Jose E. Marchesi
Subject: Re: [PATCH 3/5] Don't crash if the scanner fails
Date: Mon, 11 Nov 2019 15:34:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

             +#define YY_FATAL_ERROR(msg)                              \
             +  do \
             +  { \
             +    pk_term_class ("error");                             \
             +    pk_printf (_("Fatal error: %s"), msg);               \
             +    pk_term_end_class ("error");                         \
             +    pk_puts ("\n");                                      \
             +  } while (0);
         Hmmm, wouldn't a lexer fatal error qualify as an internal compiler 
         Maybe using pkl_ice in this context would be a better idea?
    The question is, would you prefer poke to abort, or to ignore that
    command (and warn about it) and continue?
The first.

YY_FATAL_ERROR assumes the handler does not return anyway.  We would
need to use setjmp/longjmp to jump back to a stable state.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]