treewide: Replace <name>_cnt by n_<name>s and <name>_cap by allocated_<name>.
[pspp] / src / language / expressions / public.h
1 /* PSPP - a program for statistical analysis.
2    Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
3
4    This program is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation, either version 3 of the License, or
7    (at your option) any later version.
8
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
16
17 #if !expr_h
18 #define expr_h 1
19
20 #include <stddef.h>
21
22 #include "data/val-type.h"
23
24 struct ccase;
25 struct dataset;
26 struct dictionary;
27 struct expression;
28 struct lexer;
29 struct pool;
30 union value;
31
32 struct expression *expr_parse (struct lexer *lexer, struct pool *,
33                                struct dataset *, enum val_type);
34 struct expression *expr_parse_bool (struct lexer *lexer, struct pool *,
35                                     struct dataset *);
36 struct expression *expr_parse_new_variable (struct lexer *lexer, struct pool *,
37                                             struct dataset *,
38                                             const char *new_var_name);
39 void expr_free (struct expression *);
40
41 struct dataset;
42 double expr_evaluate_num (struct expression *, const struct ccase *,
43                           int case_idx);
44 void expr_evaluate_str (struct expression *, const struct ccase *,
45                         int case_idx, char *dst, size_t dst_size);
46
47 const struct operation *expr_get_function (size_t idx);
48 size_t expr_get_n_functions (void);
49 const char *expr_operation_get_name (const struct operation *);
50 const char *expr_operation_get_prototype (const struct operation *);
51 int expr_operation_get_n_args (const struct operation *);
52
53 #endif /* expr.h */