lexer: Rename LEX_ERROR_INTERACTIVE to LEX_ERROR_TERMINAL, change default 20130816030502/pspp
authorBen Pfaff <blp@cs.stanford.edu>
Fri, 16 Aug 2013 05:35:19 +0000 (22:35 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 16 Aug 2013 05:39:34 +0000 (22:39 -0700)
commit693ac90cdac91d29870f303b88763a3685b3f341
treeeb945fa2333426ab592c9d021a94c835c8f8b315
parentab475d5d547f9ece82bf2d6e421a261d4fb68449
lexer: Rename LEX_ERROR_INTERACTIVE to LEX_ERROR_TERMINAL, change default

The LEX_ERROR_INTERACTIVE error handling mode really only makes sense for
reading from a terminal, where we know we're getting one line at a time
and not partial lines.  Unfortunately LEX_ERROR_INTERACTIVE was the default
and it was getting used as such in the GUI for reading from syntax files.
This meant that if there was an error in the GUI then the current buffer
(which might be any arbitrary chunk of syntax) was being discarded, which
caused terrible confusion.

This commit changes the default to LEX_ERROR_CONTINUE, which works
in a reasonable fashion regardless of the input source.  It also renames
LEX_ERROR_INTERACTIVE to LEX_ERROR_TERMINAL to make it clear that that's
the only reasonable use.

Reported by Thambu David <thambu@cmcvellore.ac.in>, archived at:
http://lists.gnu.org/archive/html/pspp-users/2013-08/msg00019.html
NEWS
src/language/data-io/inpt-pgm.c
src/language/lexer/lexer.c
src/language/lexer/lexer.h
src/ui/terminal/main.c
src/ui/terminal/terminal-reader.c