Patch #5885.
[pspp-builds.git] / src / language / expressions / private.h
index 3fa108d5a4bd93007772d47500ab76ce7a9beea5..48cece73f658328c2de7f3b7532c3844564b20c6 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
@@ -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
@@ -78,7 +80,7 @@ struct operation
     int array_granularity;
   };
 
-extern struct operation operations[];
+extern const struct operation operations[];
 
 /* Tree structured expressions. */ 
 
@@ -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
@@ -146,7 +148,7 @@ 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;
@@ -156,7 +158,7 @@ union operation_data
 struct expression
   {
     struct pool *expr_pool;     /* Pool for expression static data. */
-    struct dictionary *dict;    /* Dictionary for variables, vectors. */
+    struct dataset *ds ;        /* The dataset */
     atom_type type;             /* Type of expression result. */
 
     union operation_data *ops;  /* Expression data. */
@@ -168,7 +170,7 @@ struct expression
     struct pool *eval_pool;     /* Pool for evaluation temporaries. */
   };
 
-struct expression *expr_parse_any (struct dictionary *, 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,