Remove the NULLINE and ENDCMD settings.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 21 Nov 2010 19:16:10 +0000 (11:16 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 4 Dec 2010 19:11:15 +0000 (11:11 -0800)
These settings change the lexical structure of the language, which makes
lexical analysis difficult.

NEWS
doc/language.texi
doc/utilities.texi
src/data/settings.c
src/data/settings.h
src/language/control/repeat.c
src/language/lexer/lexer.c
src/language/utilities/set.q

diff --git a/NEWS b/NEWS
index 3846c4b6f469fdbe3ca2417d7084ceedd3c7a62e..ade64c06f1f0cfa9f1dbb2fab153cee96095c759 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,5 @@
 PSPP NEWS -- history of user-visible changes.
 PSPP NEWS -- history of user-visible changes.
-Time-stamp: <2010-10-16 13:05:30 blp>
+Time-stamp: <2010-11-21 11:14:27 blp>
 Copyright (C) 1996-9, 2000, 2008, 2009, 2010 Free Software Foundation, Inc.
 See the end for copying conditions.
 
 Copyright (C) 1996-9, 2000, 2008, 2009, 2010 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -20,6 +20,9 @@ Changes from 0.7.3 to 0.7.6:
 
  * The HOST command has been updated to use more modern syntax.
 
 
  * The HOST command has been updated to use more modern syntax.
 
+ * The SET and SHOW commands no longer support the ENDCMD and NULLINE
+   subcommands.  The defaults are now the only supported values.
+
 Changes from 0.7.2 to 0.7.3:
 
  * Charts are now produced with Cairo and Pango, instead of libplot.
 Changes from 0.7.2 to 0.7.3:
 
  * Charts are now produced with Cairo and Pango, instead of libplot.
index d117a0eeb0e2cd75d7aa5ec03b6c495ee5a6d384..78d38acdc6f0813fe2e1666fa7ddfa8b5bb69c31 100644 (file)
@@ -147,11 +147,6 @@ punctuator only as the last character on a line (except white space).
 When it is the last non-space character on a line, a period is not
 treated as part of another token, even if it would otherwise be part
 of, e.g.@:, an identifier or a floating-point number.
 When it is the last non-space character on a line, a period is not
 treated as part of another token, even if it would otherwise be part
 of, e.g.@:, an identifier or a floating-point number.
-
-Actually, the character that ends a command can be changed with
-@cmd{SET}'s ENDCMD subcommand (@pxref{SET}), but we do not recommend
-doing so.  Throughout the remainder of this manual we will assume that
-the default setting is in effect.
 @end table
 
 @node Commands
 @end table
 
 @node Commands
@@ -179,9 +174,7 @@ by a forward slash (@samp{/}).
 There are multiple ways to mark the end of a command.  The most common
 way is to end the last line of the command with a period (@samp{.}) as
 described in the previous section (@pxref{Tokens}).  A blank line, or
 There are multiple ways to mark the end of a command.  The most common
 way is to end the last line of the command with a period (@samp{.}) as
 described in the previous section (@pxref{Tokens}).  A blank line, or
-one that consists only of white space or comments, also ends a command
-by default, although you can use the NULLINE subcommand of @cmd{SET}
-to disable this feature (@pxref{SET}).
+one that consists only of white space or comments, also ends a command.
 
 @node Syntax Variants
 @section Variants of syntax.
 
 @node Syntax Variants
 @section Variants of syntax.
index bcb97618a099d1f98c4a01281d2b9c3deaca4419..b132f6b0cf4918ffd885b1c1436f3ea0a55ec1d5 100644 (file)
@@ -358,10 +358,6 @@ SET
         /RIB=@{NATIVE,MSBFIRST,LSBFIRST,VAX@}
         /RRB=@{NATIVE,ISL,ISB,IDL,IDB,VF,VD,VG,ZS,ZL@}
 
         /RIB=@{NATIVE,MSBFIRST,LSBFIRST,VAX@}
         /RRB=@{NATIVE,ISL,ISB,IDL,IDB,VF,VD,VG,ZS,ZL@}
 
-(program input)
-        /ENDCMD='.'
-        /NULLINE=@{ON,OFF@}
-
 (interaction)
         /CPROMPT='cprompt_string'
         /DPROMPT='dprompt_string'
 (interaction)
         /CPROMPT='cprompt_string'
         /DPROMPT='dprompt_string'
@@ -530,19 +526,6 @@ formats are only for use with very old input files.
 The default is NATIVE.
 @end table
 
 The default is NATIVE.
 @end table
 
-Program input subcommands affect the way that programs are parsed when
-they are typed interactively or run from a command file.  They are
-
-@table @asis
-@item ENDCMD
-This is a single character indicating the end of a command.  The default
-is @samp{.}.  Don't change this.
-
-@item NULLINE
-Whether a blank line is interpreted as ending the current command.  The
-default is ON.
-@end table
-
 Interaction subcommands affect the way that PSPP interacts with an
 online user.  The interaction subcommands are
 
 Interaction subcommands affect the way that PSPP interacts with an
 online user.  The interaction subcommands are
 
@@ -807,7 +790,6 @@ SHOW
         [CCE]
         [COPYING]
         [DECIMALS]
         [CCE]
         [COPYING]
         [DECIMALS]
-        [ENDCMD]
         [FORMAT]
         [LENGTH]
         [MXERRS]
         [FORMAT]
         [LENGTH]
         [MXERRS]
index 092187a6177984cc8d2e8f4774f7279623600d3d..ec026d4cbe7d883a9a1647492bc151f6e998de4f 100644 (file)
@@ -64,8 +64,6 @@ struct settings
   bool printback;
   bool mprint;
   int mxloops;
   bool printback;
   bool mprint;
   int mxloops;
-  bool nulline;
-  char endcmd;
   size_t workspace;
   struct fmt_spec default_format;
   bool testing_mode;
   size_t workspace;
   struct fmt_spec default_format;
   bool testing_mode;
@@ -105,8 +103,6 @@ static struct settings the_settings = {
   true,                         /* printback */
   true,                         /* mprint */
   1,                            /* mxloops */
   true,                         /* printback */
   true,                         /* mprint */
   1,                            /* mxloops */
-  true,                         /* nulline */
-  '.',                          /* endcmd */
   64L * 1024 * 1024,            /* workspace */
   {FMT_F, 8, 2},                /* default_format */
   false,                        /* testing_mode */
   64L * 1024 * 1024,            /* workspace */
   {FMT_F, 8, 2},                /* default_format */
   false,                        /* testing_mode */
@@ -429,34 +425,6 @@ settings_set_mxloops ( int mxloops)
   the_settings.mxloops = mxloops;
 }
 
   the_settings.mxloops = mxloops;
 }
 
-/* Whether a blank line is a command terminator. */
-bool
-settings_get_nulline (void)
-{
-  return the_settings.nulline;
-}
-
-/* Set whether a blank line is a command terminator. */
-void
-settings_set_nulline ( bool nulline)
-{
-  the_settings.nulline = nulline;
-}
-
-/* The character used to terminate commands. */
-char
-settings_get_endcmd (void)
-{
-  return the_settings.endcmd;
-}
-
-/* Set the character used to terminate commands. */
-void
-settings_set_endcmd ( char endcmd)
-{
-  the_settings.endcmd = endcmd;
-}
-
 /* Approximate maximum amount of memory to use for cases, in
    bytes. */
 size_t
 /* Approximate maximum amount of memory to use for cases, in
    bytes. */
 size_t
index e68325f7f2bca21aed2ef100420a170b15c2522a..963458d82610a3c782d43dd15081f53c45fe8b2a 100644 (file)
@@ -92,12 +92,6 @@ void settings_set_mprint (bool);
 int settings_get_mxloops (void);
 void settings_set_mxloops ( int);
 
 int settings_get_mxloops (void);
 void settings_set_mxloops ( int);
 
-bool settings_get_nulline (void);
-void settings_set_nulline (bool);
-
-char settings_get_endcmd (void);
-void settings_set_endcmd (char);
-
 size_t settings_get_workspace (void);
 size_t settings_get_workspace_cases (const struct caseproto *);
 void settings_set_workspace (size_t);
 size_t settings_get_workspace (void);
 size_t settings_get_workspace_cases (const struct caseproto *);
 void settings_set_workspace (size_t);
index 130dfd68800d5327a3f66d872f199a9ab76d1c9a..7b5634c8b3cc19f1435a77815c4d50abf8193b6f 100644 (file)
@@ -527,7 +527,7 @@ do_repeat_filter (struct getl_interface *interface, struct string *line)
 
   /* Strip trailing whitespace, check for & remove terminal dot. */
   ds_rtrim (line, ss_cstr (CC_SPACES));
 
   /* Strip trailing whitespace, check for & remove terminal dot. */
   ds_rtrim (line, ss_cstr (CC_SPACES));
-  dot = ds_chomp (line, settings_get_endcmd ());
+  dot = ds_chomp (line, '.');
   input = ds_ss (line);
   in_apos = in_quote = false;
   while ((c = ss_first (input)) != EOF)
   input = ds_ss (line);
   in_apos = in_quote = false;
   while ((c = ss_first (input)) != EOF)
@@ -550,7 +550,7 @@ do_repeat_filter (struct getl_interface *interface, struct string *line)
         }
     }
   if (dot)
         }
     }
   if (dot)
-    ds_put_byte (&output, settings_get_endcmd ());
+    ds_put_byte (&output, '.');
 
   ds_swap (line, &output);
   ds_destroy (&output);
 
   ds_swap (line, &output);
   ds_destroy (&output);
index 4a899bdff91b7b9b13d8a57d8f1b6c1f521a96ff..00724e6472b73fd3ed23b1462c6af0ef46408dca 100644 (file)
@@ -917,8 +917,7 @@ lex_preprocess_line (struct string *line,
 {
   strip_comments (line);
   ds_rtrim (line, ss_cstr (CC_SPACES));
 {
   strip_comments (line);
   ds_rtrim (line, ss_cstr (CC_SPACES));
-  *line_ends_command = (ds_chomp (line, settings_get_endcmd ())
-                        || (ds_is_empty (line) && settings_get_nulline ()));
+  *line_ends_command = ds_chomp (line, '.') || ds_is_empty (line);
   *line_starts_command = false;
   if (syntax == GETL_BATCH)
     {
   *line_starts_command = false;
   if (syntax == GETL_BATCH)
     {
index f109e4505fd9d84fa17674deff4c3cc018f433cf..a07efedf9e4418209c1e1537d9f88b5c9b9b8630 100644 (file)
@@ -73,7 +73,6 @@ int tgetnum (const char *);
      cprompt=string;
      decimal=dec:dot/comma;
      dprompt=string;
      cprompt=string;
      decimal=dec:dot/comma;
      dprompt=string;
-     endcmd=string "x==1" "one character long";
      epoch=custom;
      errors=custom;
      format=custom;
      epoch=custom;
      errors=custom;
      format=custom;
@@ -97,7 +96,6 @@ int tgetnum (const char *);
      mxloops=integer "x >=1" "%s must be at least 1";
      mxmemory=integer;
      mxwarns=integer;
      mxloops=integer "x >=1" "%s must be at least 1";
      mxmemory=integer;
      mxwarns=integer;
-     nulline=null:on/off;
      printback=custom;
      prompt=string;
      results=custom;
      printback=custom;
      prompt=string;
      results=custom;
@@ -158,16 +156,12 @@ cmd_set (struct lexer *lexer, struct dataset *ds)
   if (cmd.sbc_decimal)
     settings_set_decimal_char (cmd.dec == STC_DOT ? '.' : ',');
 
   if (cmd.sbc_decimal)
     settings_set_decimal_char (cmd.dec == STC_DOT ? '.' : ',');
 
-  if (cmd.sbc_endcmd)
-    settings_set_endcmd (cmd.s_endcmd[0]);
   if (cmd.sbc_include)
     settings_set_include (cmd.inc == STC_ON);
   if (cmd.sbc_mxerrs)
     settings_set_max_messages (MSG_S_ERROR, cmd.n_mxerrs[0]);
   if (cmd.sbc_mxwarns)
     settings_set_max_messages (MSG_S_WARNING, cmd.n_mxwarns[0]);
   if (cmd.sbc_include)
     settings_set_include (cmd.inc == STC_ON);
   if (cmd.sbc_mxerrs)
     settings_set_max_messages (MSG_S_ERROR, cmd.n_mxerrs[0]);
   if (cmd.sbc_mxwarns)
     settings_set_max_messages (MSG_S_WARNING, cmd.n_mxwarns[0]);
-  if (cmd.sbc_nulline)
-    settings_set_nulline (cmd.null == STC_ON);
   if (cmd.sbc_rib)
     settings_set_input_integer_format (stc_to_integer_format (cmd.rib));
   if (cmd.sbc_rrb)
   if (cmd.sbc_rib)
     settings_set_input_integer_format (stc_to_integer_format (cmd.rib));
   if (cmd.sbc_rrb)
@@ -620,12 +614,6 @@ show_decimals (const struct dataset *ds UNUSED)
   return xasprintf ("`%c'", settings_get_decimal_char (FMT_F));
 }
 
   return xasprintf ("`%c'", settings_get_decimal_char (FMT_F));
 }
 
-static char *
-show_endcmd (const struct dataset *ds UNUSED)
-{
-  return xasprintf ("`%c'", settings_get_endcmd ());
-}
-
 static char *
 show_errors (const struct dataset *ds UNUSED)
 {
 static char *
 show_errors (const struct dataset *ds UNUSED)
 {
@@ -810,7 +798,6 @@ const struct show_sbc show_table[] =
     {"CCD", show_ccd},
     {"CCE", show_cce},
     {"DECIMALS", show_decimals},
     {"CCD", show_ccd},
     {"CCE", show_cce},
     {"DECIMALS", show_decimals},
-    {"ENDCMD", show_endcmd},
     {"ERRORS", show_errors},
     {"FORMAT", show_format},
     {"LENGTH", show_length},
     {"ERRORS", show_errors},
     {"FORMAT", show_format},
     {"LENGTH", show_length},