projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Using LTTNG_HOME environment variable if exists, with fallback to HOME
[lttng-tools.git]
/
src
/
lib
/
lttng-ctl
/
filter
/
filter-parser.y
diff --git
a/src/lib/lttng-ctl/filter/filter-parser.y
b/src/lib/lttng-ctl/filter/filter-parser.y
index a72fcd04bd74ba3f24c9d6210aaae0986b7746f9..3f301340dbb4ccff7150d9ce79d4d86046d07563 100644
(file)
--- 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"
#include "filter-ast.h"
#include "filter-parser.h"
-__attribute__((visibility("hidden")))
+#include <common/macros.h>
+
+LTTNG_HIDDEN
int yydebug;
int yydebug;
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
int filter_parser_debug = 0;
int filter_parser_debug = 0;
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
int yyparse(struct filter_parser_ctx *parser_ctx);
int yyparse(struct filter_parser_ctx *parser_ctx);
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
int yylex(union YYSTYPE *yyval, struct filter_parser_ctx *parser_ctx);
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);
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);
int yylex_destroy(yyscan_t yyparser_ctx);
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
void yyrestart(FILE * in_str, yyscan_t parser_ctx);
struct gc_string {
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",
};
[ 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)
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.
*/
* 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)
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;
}
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);
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;
}
return node;
}
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
void yyerror(struct filter_parser_ctx *parser_ctx, const char *str)
{
fprintf(stderr, "error %s\n", str);
}
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;
int yywrap(void)
{
return 1;
@@
-233,13
+235,13
@@
static void filter_ast_free(struct filter_ast *ast)
free(ast);
}
free(ast);
}
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
int filter_parser_ctx_append_ast(struct filter_parser_ctx *parser_ctx)
{
return yyparse(parser_ctx);
}
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;
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;
}
return NULL;
}
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
void filter_parser_ctx_free(struct filter_parser_ctx *parser_ctx)
{
int ret;
void filter_parser_ctx_free(struct filter_parser_ctx *parser_ctx)
{
int ret;
@@
-311,7
+313,7
@@
void filter_parser_ctx_free(struct filter_parser_ctx *parser_ctx)
%token ASSIGN COLON SEMICOLON DOTDOTDOT DOT EQUAL COMMA
%token XOR_BIN AND_BIN OR_BIN NOT_BIN
%token ASSIGN COLON SEMICOLON DOTDOTDOT DOT EQUAL COMMA
%token XOR_BIN AND_BIN OR_BIN NOT_BIN
-%token <gs> IDENTIFIER
+%token <gs> IDENTIFIER
GLOBAL_IDENTIFIER
%token ERROR
%union
{
%token ERROR
%union
{
@@
-385,6
+387,13
@@
primary_expression
$$->u.expression.type = AST_EXP_IDENTIFIER;
$$->u.expression.u.identifier = yylval.gs->s;
}
$$->u.expression.type = AST_EXP_IDENTIFIER;
$$->u.expression.u.identifier = yylval.gs->s;
}
+ | GLOBAL_IDENTIFIER
+ {
+ $$ = make_node(parser_ctx, NODE_EXPRESSION);
+ $$->u.expression.type = AST_EXP_GLOBAL_IDENTIFIER;
+ $$->u.expression.u.identifier = yylval.gs->s;
+ }
+
| DECIMAL_CONSTANT
{
$$ = make_node(parser_ctx, NODE_EXPRESSION);
| DECIMAL_CONSTANT
{
$$ = make_node(parser_ctx, NODE_EXPRESSION);
This page took
0.02466 seconds
and
4
git commands to generate.