Delete trailing whitespace at end of lines.
[pspp-builds.git] / src / language / expressions / private.h
index 48ac889758ce56e01fc4ff22d8e23c3b45781799..b27c1458b9e2297a1f809ac16c3ebdf47a00b277 100644 (file)
@@ -1,6 +1,5 @@
 /* PSPP - computes sample statistics.
    Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
-   Written by Ben Pfaff <blp@gnu.org>.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -17,7 +16,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA. */
 
-#ifndef EXPRESSIONS_PRIVATE_H 
+#ifndef EXPRESSIONS_PRIVATE_H
 #define EXPRESSIONS_PRIVATE_H
 
 #include <assert.h>
@@ -28,7 +27,7 @@
 #include "public.h"
 #include "operations.h"
 
-enum operation_flags 
+enum operation_flags
   {
     /* Most operations produce a missing output value if any
        input value is missing.  Setting this bit indicates that
@@ -47,7 +46,7 @@ enum operation_flags
        to be non-missing.  The operation must have an array
        operand and the array must contain `double's.  Both
        OPF_ABSORB_MISS and OPF_ARRAY_OPERAND must also be set. */
-    OPF_MIN_VALID = 002,     
+    OPF_MIN_VALID = 002,
 
     /* If set, operation is non-optimizable in general.  Unless
        combined with OPF_ABSORB_MISS, missing input values are
@@ -62,7 +61,10 @@ enum operation_flags
 
     /* If set, this operation may not occur after TEMPORARY.
        (Currently this applies only to LAG.) */
-    OPF_PERM_ONLY = 0100
+    OPF_PERM_ONLY = 0100,
+
+    /* If set, this operation's name may not be abbreviated. */
+    OPF_NO_ABBREV = 0200
   };
 
 #define EXPR_ARG_MAX 4
@@ -80,10 +82,10 @@ struct operation
 
 extern const struct operation operations[];
 
-/* Tree structured expressions. */ 
+/* Tree structured expressions. */
 
 /* Atoms. */
-struct number_node 
+struct number_node
   {
     operation_type type;   /* OP_number. */
     double n;
@@ -98,7 +100,7 @@ struct string_node
 struct variable_node
   {
     operation_type type;   /* OP_variable. */
-    struct variable *v;
+    const struct variable *v;
   };
 
 struct integer_node
@@ -141,12 +143,12 @@ union any_node
     struct composite_node composite;
   };
 
-union operation_data 
+union operation_data
   {
     operation_type operation;
     double number;
     struct substring string;
-    struct variable *variable;
+    const struct variable *variable;
     const struct vector *vector;
     struct fmt_spec *format;
     int integer;
@@ -168,7 +170,7 @@ struct expression
     struct pool *eval_pool;     /* Pool for evaluation temporaries. */
   };
 
-struct expression *expr_parse_any (struct dataset *,  bool optimize);
+struct expression *expr_parse_any (struct lexer *lexer, struct dataset *,  bool optimize);
 void expr_debug_print_postfix (const struct expression *);
 
 union any_node *expr_optimize (union any_node *, struct expression *);
@@ -192,7 +194,7 @@ union any_node *expr_allocate_string_buffer (struct expression *e,
 union any_node *expr_allocate_string (struct expression *e,
                                       struct substring);
 union any_node *expr_allocate_variable (struct expression *e,
-                                        struct variable *);
+                                        const struct variable *);
 union any_node *expr_allocate_format (struct expression *e,
                                  const struct fmt_spec *);
 union any_node *expr_allocate_vector (struct expression *e,