Linux Perf
expr.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef PARSE_CTX_H
3 #define PARSE_CTX_H 1
4 
5 #define EXPR_MAX_OTHER 15
6 #define MAX_PARSE_ID EXPR_MAX_OTHER
7 
8 struct parse_id {
9  const char *name;
10  double val;
11 };
12 
13 struct parse_ctx {
14  int num_ids;
15  struct parse_id ids[MAX_PARSE_ID];
16 };
17 
18 void expr__ctx_init(struct parse_ctx *ctx);
19 void expr__add_id(struct parse_ctx *ctx, const char *id, double val);
20 #ifndef IN_EXPR_Y
21 int expr__parse(double *final_val, struct parse_ctx *ctx, const char **pp);
22 #endif
23 int expr__find_other(const char *p, const char *one, const char ***other,
24  int *num_other);
25 
26 #endif
Definition: expr.h:8
int expr__parse(double *final_val, struct parse_ctx *ctx, const char **pp)
#define MAX_PARSE_ID
Definition: expr.h:6
int expr__find_other(const char *p, const char *one, const char ***other, int *num_other)
Definition: expr-bison.c:1609
Definition: expr.h:13
void expr__ctx_init(struct parse_ctx *ctx)
Definition: expr-bison.c:1604
void expr__add_id(struct parse_ctx *ctx, const char *id, double val)
Definition: expr-bison.c:1595
const char * name
Definition: expr.h:9
double val
Definition: expr.h:10
int num_ids
Definition: expr.h:14