X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Ffilter%2Ffilter-lexer.l;h=cdb099af7552477129aa16adef47ff51f66cdea8;hp=de74e7a09715c11206d207b519f3c3e0dfcc53c0;hb=52dc69b2dc349a43f108a9926b0794ee6b6ec4c3;hpb=d00c599e39ae45ec7c8e12e6bac6b5e58f08f817 diff --git a/src/lib/lttng-ctl/filter/filter-lexer.l b/src/lib/lttng-ctl/filter/filter-lexer.l index de74e7a09..cdb099af7 100644 --- a/src/lib/lttng-ctl/filter/filter-lexer.l +++ b/src/lib/lttng-ctl/filter/filter-lexer.l @@ -4,25 +4,16 @@ * * LTTng filter lexer * - * Copyright 2012 - Mathieu Desnoyers + * Copyright 2012 Mathieu Desnoyers * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License, version 2.1 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: LGPL-2.1-only * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. */ #include #include "filter-ast.h" #include "filter-parser.h" -extern -void setstring(struct filter_parser_ctx *parser_ctx, YYSTYPE *lvalp, const char *src); - static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner) __attribute__((unused)); static int input (yyscan_t yyscanner) __attribute__((unused)); @@ -49,7 +40,8 @@ HEXDIGIT [0-9A-Fa-f] OCTALDIGIT [0-7] UCHARLOWERCASE \\u{HEXDIGIT}{4} UCHARUPPERCASE \\U{HEXDIGIT}{8} -ID_NONDIGIT {NONDIGIT}|{UCHARLOWERCASE}|{UCHARUPPERCASE} +ID_EXTRA_CHAR (":") +ID_NONDIGIT {NONDIGIT}|{UCHARLOWERCASE}|{UCHARUPPERCASE}|{ID_EXTRA_CHAR} IDENTIFIER {ID_NONDIGIT}({ID_NONDIGIT}|{DIGIT})* ESCSEQ \\(\'|\"|\?|\\|a|b|f|n|r|t|v|{OCTALDIGIT}{1,3}|u{HEXDIGIT}{4}|U{HEXDIGIT}{8}|x{HEXDIGIT}+) %% @@ -130,6 +122,7 @@ L\" BEGIN(string_lit); return STRING_LITERAL_START; "&" return AND_BIN; "|" return OR_BIN; "~" return NOT_BIN; +"$"{IDENTIFIER} printf_debug("\n", yytext); setstring(yyextra, yylval, yytext); return GLOBAL_IDENTIFIER; {IDENTIFIER} printf_debug("\n", yytext); setstring(yyextra, yylval, yytext); return IDENTIFIER; [ \t\n]+ ; /* ignore */ . return ERROR;