[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: John Darrington
Subject: Re: [PATCH 3/5] Don't crash if the scanner fails
Date: Mon, 11 Nov 2019 15:46:22 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Mon, Nov 11, 2019 at 03:34:50PM +0100, Jose E. Marchesi wrote:
                  +#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 error
              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.

OK.  In that case, we should try to eliminiate all the errors which
provoke this.
     YY_FATAL_ERROR assumes the handler does not return anyway.  We would
     need to use setjmp/longjmp to jump back to a stable state.

I think that is true with lex, but not so with flex.  But I would have
to check the manual...


reply via email to

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