X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Ffilter%2Ffilter-parser.y;h=6250054a0eb788a59f7dbffe42bf9e32d0f9ffa4;hp=a72fcd04bd74ba3f24c9d6210aaae0986b7746f9;hb=a187da1ab55a90f95fed8a29ed232b344f0d32b2;hpb=99c815c136c28d8bd8cb270d3eb981901a28c6a6 diff --git a/src/lib/lttng-ctl/filter/filter-parser.y b/src/lib/lttng-ctl/filter/filter-parser.y index a72fcd04b..6250054a0 100644 --- a/src/lib/lttng-ctl/filter/filter-parser.y +++ b/src/lib/lttng-ctl/filter/filter-parser.y @@ -32,20 +32,22 @@ #include "filter-ast.h" #include "filter-parser.h" -__attribute__((visibility("hidden"))) +#include + +LTTNG_HIDDEN int yydebug; -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int filter_parser_debug = 0; -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int yyparse(struct filter_parser_ctx *parser_ctx); -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int yylex(union YYSTYPE *yyval, struct filter_parser_ctx *parser_ctx); -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int yylex_init_extra(struct filter_parser_ctx *parser_ctx, yyscan_t * ptr_yy_globals); -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int yylex_destroy(yyscan_t yyparser_ctx); -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN void yyrestart(FILE * in_str, yyscan_t parser_ctx); struct gc_string { @@ -62,7 +64,7 @@ static const char *node_type_to_str[] = { [ NODE_UNARY_OP ] = "NODE_UNARY_OP", }; -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN const char *node_type(struct filter_node *node) { if (node->type < NR_NODE_TYPES) @@ -93,7 +95,7 @@ static struct gc_string *gc_string_alloc(struct filter_parser_ctx *parser_ctx, * gsrc will be garbage collected immediately, and gstr might be. * Should only be used to append characters to a string literal or constant. */ -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN struct gc_string *gc_string_append(struct filter_parser_ctx *parser_ctx, struct gc_string *gstr, struct gc_string *gsrc) @@ -123,7 +125,7 @@ struct gc_string *gc_string_append(struct filter_parser_ctx *parser_ctx, return gstr; } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN void setstring(struct filter_parser_ctx *parser_ctx, YYSTYPE *lvalp, const char *src) { lvalp->gs = gc_string_alloc(parser_ctx, strlen(src) + 1); @@ -185,13 +187,13 @@ static struct filter_node *make_op_node(struct filter_parser_ctx *scanner, return node; } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN void yyerror(struct filter_parser_ctx *parser_ctx, const char *str) { fprintf(stderr, "error %s\n", str); } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int yywrap(void) { return 1; @@ -233,13 +235,13 @@ static void filter_ast_free(struct filter_ast *ast) free(ast); } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int filter_parser_ctx_append_ast(struct filter_parser_ctx *parser_ctx) { return yyparse(parser_ctx); } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN struct filter_parser_ctx *filter_parser_ctx_alloc(FILE *input) { struct filter_parser_ctx *parser_ctx; @@ -281,7 +283,7 @@ cleanup_parser_ctx: return NULL; } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN void filter_parser_ctx_free(struct filter_parser_ctx *parser_ctx) { int ret;