blob: 7469497cd28e4c25b873c3b02ec9c09b8846a368 [file] [log] [blame]
Jiri Olsa89812fc2012-03-15 20:09:15 +01001
Zheng Yanac20de6f2012-06-15 14:31:39 +08002%option reentrant
3%option bison-bridge
Jiri Olsa89812fc2012-03-15 20:09:15 +01004%option prefix="parse_events_"
Jiri Olsa08d2f762012-05-21 09:12:52 +02005%option stack
Jiri Olsa6297d422015-04-22 21:10:17 +02006%option bison-locations
7%option yylineno
Jiri Olsab6af53b2017-11-08 16:43:09 +01008%option reject
Jiri Olsa89812fc2012-03-15 20:09:15 +01009
10%{
11#include <errno.h>
Jiri Olsa29479bf2017-10-13 10:37:35 +020012#include <sys/types.h>
13#include <sys/stat.h>
14#include <unistd.h>
Jiri Olsa89812fc2012-03-15 20:09:15 +010015#include "../perf.h"
Jiri Olsa8f707d82012-03-15 20:09:16 +010016#include "parse-events.h"
Wang Nane571e022016-02-22 09:10:35 +000017#include "parse-events-bison.h"
Andi Kleenf0fbb112019-03-26 15:18:21 -070018#include "evsel.h"
Jiri Olsa89812fc2012-03-15 20:09:15 +010019
Zheng Yanac20de6f2012-06-15 14:31:39 +080020char *parse_events_get_text(yyscan_t yyscanner);
21YYSTYPE *parse_events_get_lval(yyscan_t yyscanner);
22
23static int __value(YYSTYPE *yylval, char *str, int base, int token)
Jiri Olsa89812fc2012-03-15 20:09:15 +010024{
Robert Richterb527bab2012-08-07 19:43:13 +020025 u64 num;
Jiri Olsa89812fc2012-03-15 20:09:15 +010026
27 errno = 0;
Robert Richterb527bab2012-08-07 19:43:13 +020028 num = strtoull(str, NULL, base);
Jiri Olsa89812fc2012-03-15 20:09:15 +010029 if (errno)
30 return PE_ERROR;
31
Zheng Yanac20de6f2012-06-15 14:31:39 +080032 yylval->num = num;
Jiri Olsa89812fc2012-03-15 20:09:15 +010033 return token;
34}
35
Zheng Yanac20de6f2012-06-15 14:31:39 +080036static int value(yyscan_t scanner, int base)
Jiri Olsa89812fc2012-03-15 20:09:15 +010037{
Zheng Yanac20de6f2012-06-15 14:31:39 +080038 YYSTYPE *yylval = parse_events_get_lval(scanner);
39 char *text = parse_events_get_text(scanner);
40
41 return __value(yylval, text, base, PE_VALUE);
Jiri Olsa89812fc2012-03-15 20:09:15 +010042}
43
Zheng Yanac20de6f2012-06-15 14:31:39 +080044static int raw(yyscan_t scanner)
Jiri Olsa89812fc2012-03-15 20:09:15 +010045{
Zheng Yanac20de6f2012-06-15 14:31:39 +080046 YYSTYPE *yylval = parse_events_get_lval(scanner);
47 char *text = parse_events_get_text(scanner);
48
49 return __value(yylval, text + 1, 16, PE_RAW);
Jiri Olsa89812fc2012-03-15 20:09:15 +010050}
51
Zheng Yanac20de6f2012-06-15 14:31:39 +080052static int str(yyscan_t scanner, int token)
Jiri Olsa89812fc2012-03-15 20:09:15 +010053{
Zheng Yanac20de6f2012-06-15 14:31:39 +080054 YYSTYPE *yylval = parse_events_get_lval(scanner);
55 char *text = parse_events_get_text(scanner);
56
Alexey Budankovf92da712018-06-04 09:50:56 +030057 if (text[0] != '\'') {
58 yylval->str = strdup(text);
59 } else {
60 /*
61 * If a text tag specified on the command line
62 * contains opening single quite ' then it is
63 * expected that the tag ends with single quote
64 * as well, like this:
65 * name=\'CPU_CLK_UNHALTED.THREAD:cmask=1\'
66 * quotes need to be escaped to bypass shell
67 * processing.
68 */
69 yylval->str = strndup(&text[1], strlen(text) - 2);
70 }
71
Jiri Olsa89812fc2012-03-15 20:09:15 +010072 return token;
73}
74
Jiri Olsa29479bf2017-10-13 10:37:35 +020075static bool isbpf_suffix(char *text)
Andi Kleen77d08712017-08-11 16:26:19 -070076{
Andi Kleen77d08712017-08-11 16:26:19 -070077 int len = strlen(text);
78
79 if (len < 2)
80 return false;
81 if ((text[len - 1] == 'c' || text[len - 1] == 'o') &&
82 text[len - 2] == '.')
83 return true;
84 if (len > 4 && !strcmp(text + len - 4, ".obj"))
85 return true;
86 return false;
87}
88
Jiri Olsa29479bf2017-10-13 10:37:35 +020089static bool isbpf(yyscan_t scanner)
90{
91 char *text = parse_events_get_text(scanner);
92 struct stat st;
93
94 if (!isbpf_suffix(text))
95 return false;
96
97 return stat(text, &st) == 0;
98}
99
Mathieu Poirierdd60fba2016-09-06 10:37:15 -0600100/*
101 * This function is called when the parser gets two kind of input:
102 *
103 * @cfg1 or @cfg2=config
104 *
105 * The leading '@' is stripped off before 'cfg1' and 'cfg2=config' are given to
106 * bison. In the latter case it is necessary to keep the string intact so that
107 * the PMU kernel driver can determine what configurable is associated to
108 * 'config'.
109 */
110static int drv_str(yyscan_t scanner, int token)
111{
112 YYSTYPE *yylval = parse_events_get_lval(scanner);
113 char *text = parse_events_get_text(scanner);
114
115 /* Strip off the '@' */
116 yylval->str = strdup(text + 1);
117 return token;
118}
119
Jiri Olsa6297d422015-04-22 21:10:17 +0200120#define REWIND(__alloc) \
121do { \
122 YYSTYPE *__yylval = parse_events_get_lval(yyscanner); \
123 char *text = parse_events_get_text(yyscanner); \
124 \
125 if (__alloc) \
126 __yylval->str = strdup(text); \
127 \
128 yycolumn -= strlen(text); \
129 yyless(0); \
130} while (0)
131
Kan Liangba32a452014-10-07 11:08:51 -0400132static int pmu_str_check(yyscan_t scanner)
133{
134 YYSTYPE *yylval = parse_events_get_lval(scanner);
135 char *text = parse_events_get_text(scanner);
136
137 yylval->str = strdup(text);
138 switch (perf_pmu__parse_check(text)) {
139 case PMU_EVENT_SYMBOL_PREFIX:
140 return PE_PMU_EVENT_PRE;
141 case PMU_EVENT_SYMBOL_SUFFIX:
142 return PE_PMU_EVENT_SUF;
143 case PMU_EVENT_SYMBOL:
144 return PE_KERNEL_PMU_EVENT;
145 default:
146 return PE_NAME;
147 }
148}
149
Zheng Yanac20de6f2012-06-15 14:31:39 +0800150static int sym(yyscan_t scanner, int type, int config)
Jiri Olsa89812fc2012-03-15 20:09:15 +0100151{
Zheng Yanac20de6f2012-06-15 14:31:39 +0800152 YYSTYPE *yylval = parse_events_get_lval(scanner);
153
154 yylval->num = (type << 16) + config;
Jiri Olsacf3506d2012-07-04 00:00:43 +0200155 return type == PERF_TYPE_HARDWARE ? PE_VALUE_SYM_HW : PE_VALUE_SYM_SW;
Jiri Olsa89812fc2012-03-15 20:09:15 +0100156}
157
Andi Kleenf0fbb112019-03-26 15:18:21 -0700158static int tool(yyscan_t scanner, enum perf_tool_event event)
159{
160 YYSTYPE *yylval = parse_events_get_lval(scanner);
161
162 yylval->num = event;
163 return PE_VALUE_SYM_TOOL;
164}
165
Zheng Yanac20de6f2012-06-15 14:31:39 +0800166static int term(yyscan_t scanner, int type)
Jiri Olsa8f707d82012-03-15 20:09:16 +0100167{
Zheng Yanac20de6f2012-06-15 14:31:39 +0800168 YYSTYPE *yylval = parse_events_get_lval(scanner);
169
170 yylval->num = type;
Jiri Olsa8f707d82012-03-15 20:09:16 +0100171 return PE_TERM;
172}
173
Jiri Olsa6297d422015-04-22 21:10:17 +0200174#define YY_USER_ACTION \
175do { \
176 yylloc->last_column = yylloc->first_column; \
177 yylloc->first_column = yycolumn; \
178 yycolumn += yyleng; \
179} while (0);
180
Jiri Olsa94454642017-10-12 17:03:38 +0200181#define USER_REJECT \
182 yycolumn -= yyleng; \
183 REJECT
184
Jiri Olsa89812fc2012-03-15 20:09:15 +0100185%}
186
Jiri Olsa08d2f762012-05-21 09:12:52 +0200187%x mem
Robert Richterac2ba9f2012-08-16 21:10:21 +0200188%s config
189%x event
Wang Nane571e022016-02-22 09:10:35 +0000190%x array
Robert Richterac2ba9f2012-08-16 21:10:21 +0200191
192group [^,{}/]*[{][^}]*[}][^,{}/]*
193event_pmu [^,{}/]+[/][^/]*[/][^,{}/]*
194event [^,{}/]+
Andi Kleen77d08712017-08-11 16:26:19 -0700195bpf_object [^,{}]+\.(o|bpf)[a-zA-Z0-9._]*
196bpf_source [^,{}]+\.c[a-zA-Z0-9._]*
Jiri Olsa08d2f762012-05-21 09:12:52 +0200197
Jiri Olsa89812fc2012-03-15 20:09:15 +0100198num_dec [0-9]+
199num_hex 0x[a-fA-F0-9]+
200num_raw_hex [a-fA-F0-9]+
Agustin Vega-Friasb2b9d3a2018-03-06 09:04:42 -0500201name [a-zA-Z_*?\[\]][a-zA-Z0-9_*?.\[\]]*
Alexey Budankovf92da712018-06-04 09:50:56 +0300202name_tag [\'][a-zA-Z_*?\[\]][a-zA-Z0-9_*?\-,\.\[\]:=]*[\']
Wang Nana34f3be2016-02-22 09:10:31 +0000203name_minus [a-zA-Z_*?][a-zA-Z0-9\-_*?.:]*
Mathieu Poirierdd60fba2016-09-06 10:37:15 -0600204drv_cfg_term [a-zA-Z0-9_\.]+(=[a-zA-Z0-9_*?\.:]+)?
Michael Ellermane9a7c412013-08-06 23:28:05 +1000205/* If you add a modifier you need to update check_modifier() */
Andi Kleen5a5dfe42017-08-31 12:40:26 -0700206modifier_event [ukhpPGHSDIW]+
Jiri Olsa75827322012-06-29 09:22:54 +0200207modifier_bp [rwx]{1,3}
Jiri Olsa89812fc2012-03-15 20:09:15 +0100208
209%%
Jiri Olsa90e2b222012-06-15 14:31:40 +0800210
211%{
212 {
213 int start_token;
214
Robert Richterac2ba9f2012-08-16 21:10:21 +0200215 start_token = parse_events_get_extra(yyscanner);
216
217 if (start_token == PE_START_TERMS)
218 BEGIN(config);
219 else if (start_token == PE_START_EVENTS)
220 BEGIN(event);
221
Jiri Olsa90e2b222012-06-15 14:31:40 +0800222 if (start_token) {
223 parse_events_set_extra(NULL, yyscanner);
Jiri Olsa6297d422015-04-22 21:10:17 +0200224 /*
225 * The flex parser does not init locations variable
226 * via the scan_string interface, so we need do the
227 * init in here.
228 */
229 yycolumn = 0;
Jiri Olsa90e2b222012-06-15 14:31:40 +0800230 return start_token;
231 }
232 }
233%}
234
Robert Richterac2ba9f2012-08-16 21:10:21 +0200235<event>{
236
237{group} {
Jiri Olsa6297d422015-04-22 21:10:17 +0200238 BEGIN(INITIAL);
239 REWIND(0);
Robert Richterac2ba9f2012-08-16 21:10:21 +0200240 }
241
242{event_pmu} |
Wang Nan84c86ca2015-10-14 12:41:14 +0000243{bpf_object} |
Wang Nand509db02015-10-14 12:41:20 +0000244{bpf_source} |
Robert Richterac2ba9f2012-08-16 21:10:21 +0200245{event} {
Jiri Olsa6297d422015-04-22 21:10:17 +0200246 BEGIN(INITIAL);
247 REWIND(1);
Robert Richterac2ba9f2012-08-16 21:10:21 +0200248 return PE_EVENT_NAME;
249 }
250
Robert Richterac2ba9f2012-08-16 21:10:21 +0200251<<EOF>> {
Jiri Olsa6297d422015-04-22 21:10:17 +0200252 BEGIN(INITIAL);
253 REWIND(0);
Robert Richterac2ba9f2012-08-16 21:10:21 +0200254 }
255
256}
257
Wang Nane571e022016-02-22 09:10:35 +0000258<array>{
259"]" { BEGIN(config); return ']'; }
260{num_dec} { return value(yyscanner, 10); }
261{num_hex} { return value(yyscanner, 16); }
262, { return ','; }
263"\.\.\." { return PE_ARRAY_RANGE; }
264}
265
Jiri Olsa82004222013-09-27 18:29:58 +0200266<config>{
Jiri Olsae64b0202015-04-22 21:10:21 +0200267 /*
Wang Nan17cb5f82016-02-19 11:43:57 +0000268 * Please update config_term_names when new static term is added.
Jiri Olsae64b0202015-04-22 21:10:21 +0200269 */
Jiri Olsa82004222013-09-27 18:29:58 +0200270config { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_CONFIG); }
271config1 { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_CONFIG1); }
272config2 { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_CONFIG2); }
273name { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_NAME); }
274period { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_SAMPLE_PERIOD); }
Namhyung Kim09af2a52015-08-09 15:45:23 +0900275freq { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_SAMPLE_FREQ); }
Jiri Olsa82004222013-09-27 18:29:58 +0200276branch_type { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE); }
Kan Liang32067712015-08-04 04:30:19 -0400277time { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_TIME); }
Kan Liangd457c962015-08-11 06:30:47 -0400278call-graph { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_CALLGRAPH); }
279stack-size { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_STACKSIZE); }
Arnaldo Carvalho de Melo792d48b2016-04-28 19:03:42 -0300280max-stack { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_MAX_STACK); }
Arnaldo Carvalho de Melo2fda5ad2018-10-19 15:47:34 -0300281nr { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_MAX_EVENTS); }
Wang Nan374ce932015-10-28 10:55:02 +0000282inherit { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_INHERIT); }
283no-inherit { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_NOINHERIT); }
Wang Nan626a6b72016-07-14 08:34:45 +0000284overwrite { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_OVERWRITE); }
285no-overwrite { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_NOOVERWRITE); }
Jin Yao064b4e82019-04-12 21:59:47 +0800286percore { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_PERCORE); }
Adrian Hunter1b992152019-08-06 11:46:05 +0300287aux-output { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_AUX_OUTPUT); }
Jiri Olsa82004222013-09-27 18:29:58 +0200288, { return ','; }
289"/" { BEGIN(INITIAL); return '/'; }
290{name_minus} { return str(yyscanner, PE_NAME); }
Wang Nane571e022016-02-22 09:10:35 +0000291\[all\] { return PE_ARRAY_ALL; }
292"[" { BEGIN(array); return '['; }
Mathieu Poirierdd60fba2016-09-06 10:37:15 -0600293@{drv_cfg_term} { return drv_str(yyscanner, PE_DRV_CFG_TERM); }
Jiri Olsa82004222013-09-27 18:29:58 +0200294}
295
296<mem>{
297{modifier_bp} { return str(yyscanner, PE_MODIFIER_BP); }
298: { return ':'; }
Jacob Shin3741eb92014-05-29 17:26:51 +0200299"/" { return '/'; }
Jiri Olsa82004222013-09-27 18:29:58 +0200300{num_dec} { return value(yyscanner, 10); }
301{num_hex} { return value(yyscanner, 16); }
302 /*
303 * We need to separate 'mem:' scanner part, in order to get specific
304 * modifier bits parsed out. Otherwise we would need to handle PE_NAME
305 * and we'd need to parse it manually. During the escape from <mem>
306 * state we need to put the escaping char back, so we dont miss it.
307 */
308. { unput(*yytext); BEGIN(INITIAL); }
309 /*
310 * We destroy the scanner after reaching EOF,
311 * but anyway just to be sure get back to INIT state.
312 */
313<<EOF>> { BEGIN(INITIAL); }
314}
315
Zheng Yanac20de6f2012-06-15 14:31:39 +0800316cpu-cycles|cycles { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_CPU_CYCLES); }
317stalled-cycles-frontend|idle-cycles-frontend { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_STALLED_CYCLES_FRONTEND); }
318stalled-cycles-backend|idle-cycles-backend { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_STALLED_CYCLES_BACKEND); }
319instructions { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_INSTRUCTIONS); }
320cache-references { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_CACHE_REFERENCES); }
321cache-misses { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_CACHE_MISSES); }
322branch-instructions|branches { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_BRANCH_INSTRUCTIONS); }
323branch-misses { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_BRANCH_MISSES); }
324bus-cycles { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_BUS_CYCLES); }
325ref-cycles { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_REF_CPU_CYCLES); }
326cpu-clock { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_CPU_CLOCK); }
327task-clock { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_TASK_CLOCK); }
328page-faults|faults { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_PAGE_FAULTS); }
329minor-faults { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_PAGE_FAULTS_MIN); }
330major-faults { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_PAGE_FAULTS_MAJ); }
331context-switches|cs { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_CONTEXT_SWITCHES); }
332cpu-migrations|migrations { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_CPU_MIGRATIONS); }
333alignment-faults { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_ALIGNMENT_FAULTS); }
334emulation-faults { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_EMULATION_FAULTS); }
Adrian Hunterd22d1a22013-08-31 21:50:52 +0300335dummy { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_DUMMY); }
Andi Kleenf0fbb112019-03-26 15:18:21 -0700336duration_time { return tool(yyscanner, PERF_TOOL_DURATION_TIME); }
Wang Nan03e0a7d2016-02-22 09:10:37 +0000337bpf-output { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_BPF_OUTPUT); }
Jiri Olsa89812fc2012-03-15 20:09:15 +0100338
Kan Liangba32a452014-10-07 11:08:51 -0400339 /*
340 * We have to handle the kernel PMU event cycles-ct/cycles-t/mem-loads/mem-stores separately.
341 * Because the prefix cycles is mixed up with cpu-cycles.
342 * loads and stores are mixed up with cache event
343 */
344cycles-ct { return str(yyscanner, PE_KERNEL_PMU_EVENT); }
345cycles-t { return str(yyscanner, PE_KERNEL_PMU_EVENT); }
346mem-loads { return str(yyscanner, PE_KERNEL_PMU_EVENT); }
347mem-stores { return str(yyscanner, PE_KERNEL_PMU_EVENT); }
Andi Kleen44b1e602016-05-30 12:49:42 -0300348topdown-[a-z-]+ { return str(yyscanner, PE_KERNEL_PMU_EVENT); }
Kan Liangba32a452014-10-07 11:08:51 -0400349
Jiri Olsa89812fc2012-03-15 20:09:15 +0100350L1-dcache|l1-d|l1d|L1-data |
351L1-icache|l1-i|l1i|L1-instruction |
352LLC|L2 |
353dTLB|d-tlb|Data-TLB |
354iTLB|i-tlb|Instruction-TLB |
355branch|branches|bpu|btb|bpc |
Zheng Yanac20de6f2012-06-15 14:31:39 +0800356node { return str(yyscanner, PE_NAME_CACHE_TYPE); }
Jiri Olsa89812fc2012-03-15 20:09:15 +0100357
358load|loads|read |
359store|stores|write |
360prefetch|prefetches |
361speculative-read|speculative-load |
362refs|Reference|ops|access |
Zheng Yanac20de6f2012-06-15 14:31:39 +0800363misses|miss { return str(yyscanner, PE_NAME_CACHE_OP_RESULT); }
Jiri Olsa89812fc2012-03-15 20:09:15 +0100364
Jiri Olsa08d2f762012-05-21 09:12:52 +0200365mem: { BEGIN(mem); return PE_PREFIX_MEM; }
Zheng Yanac20de6f2012-06-15 14:31:39 +0800366r{num_raw_hex} { return raw(yyscanner); }
367{num_dec} { return value(yyscanner, 10); }
368{num_hex} { return value(yyscanner, 16); }
Jiri Olsa89812fc2012-03-15 20:09:15 +0100369
Zheng Yanac20de6f2012-06-15 14:31:39 +0800370{modifier_event} { return str(yyscanner, PE_MODIFIER_EVENT); }
Jiri Olsaa271bfa2017-11-09 10:02:10 +0100371{bpf_object} { if (!isbpf(yyscanner)) { USER_REJECT }; return str(yyscanner, PE_BPF_OBJECT); }
372{bpf_source} { if (!isbpf(yyscanner)) { USER_REJECT }; return str(yyscanner, PE_BPF_SOURCE); }
Kan Liangba32a452014-10-07 11:08:51 -0400373{name} { return pmu_str_check(yyscanner); }
Alexey Budankovf92da712018-06-04 09:50:56 +0300374{name_tag} { return str(yyscanner, PE_NAME); }
Robert Richterac2ba9f2012-08-16 21:10:21 +0200375"/" { BEGIN(config); return '/'; }
Jiri Olsa89812fc2012-03-15 20:09:15 +0100376- { return '-'; }
Robert Richterac2ba9f2012-08-16 21:10:21 +0200377, { BEGIN(event); return ','; }
Jiri Olsa89812fc2012-03-15 20:09:15 +0100378: { return ':'; }
Robert Richterac2ba9f2012-08-16 21:10:21 +0200379"{" { BEGIN(event); return '{'; }
Jiri Olsa89efb022012-08-08 12:14:14 +0200380"}" { return '}'; }
Jiri Olsa89812fc2012-03-15 20:09:15 +0100381= { return '='; }
Jiri Olsa8c5f0a82012-07-04 00:00:39 +0200382\n { }
Jiri Olsa82004222013-09-27 18:29:58 +0200383. { }
Jiri Olsa08d2f762012-05-21 09:12:52 +0200384
Jiri Olsa89812fc2012-03-15 20:09:15 +0100385%%
386
Irina Tirdea1d037ca2012-09-11 01:15:03 +0300387int parse_events_wrap(void *scanner __maybe_unused)
Jiri Olsa89812fc2012-03-15 20:09:15 +0100388{
389 return 1;
390}