This file is indexed.

/usr/include/paw/ntuple/qp_tree.h is in libpawlib2-dev 1:2.14.04.dfsg.2-7ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
/*
 *  qp_tree.h  --
 *
 *  Original: 10-Oct-1994 13:53
 *
 *  Author:   Maarten Ballintijn <Maarten.Ballintijn@cern.ch>
 *
 *  $Id: qp_tree.h,v 1.8 1996/04/23 18:39:06 maartenb Exp $
 *
 *  $Log: qp_tree.h,v $
 *  Revision 1.8  1996/04/23 18:39:06  maartenb
 *  - Add RCS keywords
 *
 *
 */

#ifndef CERN_TREE
#define CERN_TREE

#include	<stdio.h>


typedef struct _tree_ *pTree;

#include <paw/ntuple/cern_types.h>
#include <paw/ntuple/qp_dimension.h>
#include <paw/ntuple/qp_value.h>
#include <paw/ntuple/qp_convert.h>
#include <paw/ntuple/qp_signature.h>
#include <paw/ntuple/qp_cuts.h>


extern bool	tag_alloc_flag;

extern pTree	qp_the_parse_tree;

typedef enum _op_type_ {
	O_OR,
	O_AND,
	O_NOT,

	O_LT,
	O_LE,

	O_LTLT,
	O_LTLE,
	O_LELT,
	O_LELE,

	O_GT,
	O_GE,

	O_GTGT,
	O_GTGE,
	O_GEGT,
	O_GEGE,

	O_EQ,
	O_NE,
	O_CT,

	O_PLUS,
	O_MINUS,
	O_TIMES,
	O_DIV,

	O_UMINUS,

	O_POW,

	O_VADD,
	O_VMUL,
	O_VAND,
	O_VOR,
	O_VMIN,
	O_VMAX,

	O_MIN,
	O_MAX

} OpType;


typedef struct _node_cut_ {
	int		cid;		/* the cut id ( n in $n ) 	      */
	CutType		ctyp;		/* the type of the cut 		      */
	int		index;		/* the index of the cut in this query */
} NodeCut;


typedef struct _node_op_ {
	OpType		op;		/* the operator type */
	pTree		o1, o2, o3;	/* the operants from left to right */
} NodeOp;


typedef struct _node_name_ {
	char		*name;
	STIndex		idx;
	Signature	*sig;
	int		argc;
	pTree		argv[MAX_DIMENSION];

	/* possible subrange specifier for string types */
	pTree		range;

	bool		check[MAX_DIMENSION];	/* args which need to be */
						/* checked with given dim */
						/* (static formal array arg */
						/* with dynamic actual arg ) */
	
} NodeName;


typedef struct _node_range_ {
	pTree	from, to;
} NodeRange;


typedef struct _node_mask_ {
	pTree	o1;
	char	*name;	/* name of the mask to be written */
	STIndex	idx;
	pTree	index;	/* expression of the mask bit to be written */
} NodeMask;


typedef enum _node_type_	{
	N_CUT = 1,	/* predefined cut */
	N_CONST,	/* leaf, constant */
	N_OP,		/* operator (unary or binary) */
	N_NAME,		/* identifier with 0 or more args, optional subrange*/
	N_RANGE,	/* range for array indexing */
	N_MASK		/* describe output to mask */
} NodeType;


#if 0
typedef struct _range_ {
	int	from, to;
} Range;
#endif


typedef struct _tree_ {

	/* start of construct in the expression string */
	int		index;

	/* list of nodes allocated during this parse operation */
	pTree		next_alloc;

	/* possibility to make lists op expr's */
	pTree		next;

	/* type of this node ... */
	NodeType	ntyp;

	/* node type dependent fields */ union {
		NodeCut		cut;
		NodeOp		op;
		NodeName	name;
		NodeRange	range;
		NodeMask	mask;
	} u;

	/* semantic checking done for this subtree */
	bool		sem_ok;

	/* Dynamic type info */
	Dimension	*dim;
	int		check_shape; /* number of shapes to be matched*/
	bool		need_shape; /* leave one shape on shape stack */

	/* value(s) associated with this node */
	Value		*val;
} Tree;


/* function prototypes */

void
free_tree( const pTree t );

void
free_node( const pTree t );


void
print_tree( FILE * const fp, const pTree t );


void
dump_tree( FILE * const fp, int lvl, const pTree t );


/*
 *  Create operator nodes
 */

pTree
new_op_node( const OpType op, const pTree o1, const pTree o2, const pTree o3 );


/*
 *  Create litteral nodes
 */

pTree
new_con_bool_node( const bool bval );

pTree
new_con_uint_node( const unsigned int uval );

pTree
new_con_int_node( const int ival );

pTree
new_con_float_node( const double fval );

pTree
new_con_double_node( const double lfval );

pTree
new_con_str_node( char *const sval );


/*
 *  Create cut nodes
 */

pTree
new_cut_node( const int num );


/*
 *  Create name (identifier) nodes
 */

pTree
new_name_node( char *const name, const pTree arg_list, const pTree sub_range );


/*
 *  Create range node
 */

pTree
new_range_node( const pTree from, const pTree to );


/*
 *  Create type conversion node
 */

pTree
new_conv_node( const pTree t, const ConvType c );


/*
 *  Create mask writing node
 */

pTree
new_mask_node( const pTree t, char * const name, const pTree index );


/*
 *  Track allocations during parsing
 */

void
reset_alloc_list( void );

void
clear_alloc_list( void );

void
free_alloc_list( void );


/*
 *  Readable names for constants
 */

char *
convtype_to_str( const ConvType c );

char *
nodetype_to_str( const NodeType n );

char *
optype_to_str( const OpType o );

FCode
optype_to_fc( const OpType o );

OpType
fc_to_optype( const FCode fc );

#endif	/*	CERN_TREE	*/