blob: 0bc87ba46bf3f77f507116df36449655a9fbaa6f [file] [log] [blame]
Zheng Yanac20de6f2012-06-15 14:31:39 +08001%pure-parser
Jiri Olsa46010ab2012-06-15 14:31:38 +08002%parse-param {void *_data}
Zheng Yanac20de6f2012-06-15 14:31:39 +08003%parse-param {void *scanner}
4%lex-param {void* scanner}
Jiri Olsa89812fc2012-03-15 20:09:15 +01005
6%{
7
8#define YYDEBUG 1
9
10#include <linux/compiler.h>
11#include <linux/list.h>
Borislav Petkovd944c4e2014-04-25 21:31:02 +020012#include <linux/types.h>
Jiri Olsa89812fc2012-03-15 20:09:15 +010013#include "util.h"
14#include "parse-events.h"
Zheng Yanac20de6f2012-06-15 14:31:39 +080015#include "parse-events-bison.h"
Jiri Olsa89812fc2012-03-15 20:09:15 +010016
Zheng Yanac20de6f2012-06-15 14:31:39 +080017extern int parse_events_lex (YYSTYPE* lvalp, void* scanner);
Jiri Olsa89812fc2012-03-15 20:09:15 +010018
19#define ABORT_ON(val) \
20do { \
21 if (val) \
22 YYABORT; \
23} while (0)
24
David Ahernc5cd8ac2013-07-02 13:27:25 -060025#define ALLOC_LIST(list) \
26do { \
27 list = malloc(sizeof(*list)); \
28 ABORT_ON(!list); \
29 INIT_LIST_HEAD(list); \
30} while (0)
31
Namhyung Kim97f63e42013-01-22 18:09:29 +090032static inc_group_count(struct list_head *list,
33 struct parse_events_evlist *data)
34{
35 /* Count groups only have more than 1 members */
36 if (!list_is_last(list->next, list))
37 data->nr_groups++;
38}
39
Jiri Olsa89812fc2012-03-15 20:09:15 +010040%}
41
Jiri Olsa90e2b222012-06-15 14:31:40 +080042%token PE_START_EVENTS PE_START_TERMS
Jiri Olsacf3506d2012-07-04 00:00:43 +020043%token PE_VALUE PE_VALUE_SYM_HW PE_VALUE_SYM_SW PE_RAW PE_TERM
Robert Richterac2ba9f2012-08-16 21:10:21 +020044%token PE_EVENT_NAME
Jiri Olsa89812fc2012-03-15 20:09:15 +010045%token PE_NAME
46%token PE_MODIFIER_EVENT PE_MODIFIER_BP
47%token PE_NAME_CACHE_TYPE PE_NAME_CACHE_OP_RESULT
Jiri Olsa89efb022012-08-08 12:14:14 +020048%token PE_PREFIX_MEM PE_PREFIX_RAW PE_PREFIX_GROUP
Jiri Olsa89812fc2012-03-15 20:09:15 +010049%token PE_ERROR
50%type <num> PE_VALUE
Jiri Olsacf3506d2012-07-04 00:00:43 +020051%type <num> PE_VALUE_SYM_HW
52%type <num> PE_VALUE_SYM_SW
Jiri Olsa89812fc2012-03-15 20:09:15 +010053%type <num> PE_RAW
Jiri Olsa8f707d82012-03-15 20:09:16 +010054%type <num> PE_TERM
Jiri Olsa89812fc2012-03-15 20:09:15 +010055%type <str> PE_NAME
56%type <str> PE_NAME_CACHE_TYPE
57%type <str> PE_NAME_CACHE_OP_RESULT
58%type <str> PE_MODIFIER_EVENT
59%type <str> PE_MODIFIER_BP
Robert Richterac2ba9f2012-08-16 21:10:21 +020060%type <str> PE_EVENT_NAME
Jiri Olsacf3506d2012-07-04 00:00:43 +020061%type <num> value_sym
Jiri Olsa8f707d82012-03-15 20:09:16 +010062%type <head> event_config
63%type <term> event_term
Jiri Olsab847cbd2012-05-21 09:12:51 +020064%type <head> event_pmu
65%type <head> event_legacy_symbol
66%type <head> event_legacy_cache
67%type <head> event_legacy_mem
68%type <head> event_legacy_tracepoint
69%type <head> event_legacy_numeric
70%type <head> event_legacy_raw
71%type <head> event_def
Robert Richterac2ba9f2012-08-16 21:10:21 +020072%type <head> event_mod
73%type <head> event_name
Jiri Olsa89efb022012-08-08 12:14:14 +020074%type <head> event
75%type <head> events
76%type <head> group_def
77%type <head> group
78%type <head> groups
Jiri Olsa89812fc2012-03-15 20:09:15 +010079
80%union
81{
82 char *str;
Robert Richterb527bab2012-08-07 19:43:13 +020083 u64 num;
Jiri Olsa8f707d82012-03-15 20:09:16 +010084 struct list_head *head;
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -030085 struct parse_events_term *term;
Jiri Olsa89812fc2012-03-15 20:09:15 +010086}
87%%
88
Jiri Olsa90e2b222012-06-15 14:31:40 +080089start:
Jiri Olsa89efb022012-08-08 12:14:14 +020090PE_START_EVENTS start_events
Jiri Olsa90e2b222012-06-15 14:31:40 +080091|
Jiri Olsa89efb022012-08-08 12:14:14 +020092PE_START_TERMS start_terms
93
94start_events: groups
95{
Arnaldo Carvalho de Melo23b63392013-01-18 16:56:57 -030096 struct parse_events_evlist *data = _data;
Jiri Olsa89efb022012-08-08 12:14:14 +020097
98 parse_events_update_lists($1, &data->list);
99}
100
101groups:
102groups ',' group
103{
104 struct list_head *list = $1;
105 struct list_head *group = $3;
106
107 parse_events_update_lists(group, list);
108 $$ = list;
109}
110|
111groups ',' event
112{
113 struct list_head *list = $1;
114 struct list_head *event = $3;
115
116 parse_events_update_lists(event, list);
117 $$ = list;
118}
119|
120group
121|
122event
123
124group:
125group_def ':' PE_MODIFIER_EVENT
126{
127 struct list_head *list = $1;
128
129 ABORT_ON(parse_events__modifier_group(list, $3));
130 $$ = list;
131}
132|
133group_def
134
135group_def:
136PE_NAME '{' events '}'
137{
138 struct list_head *list = $3;
139
Namhyung Kim97f63e42013-01-22 18:09:29 +0900140 inc_group_count(list, _data);
Arnaldo Carvalho de Melo63dab222012-08-14 16:35:48 -0300141 parse_events__set_leader($1, list);
Jiri Olsa89efb022012-08-08 12:14:14 +0200142 $$ = list;
143}
144|
145'{' events '}'
146{
147 struct list_head *list = $2;
148
Namhyung Kim97f63e42013-01-22 18:09:29 +0900149 inc_group_count(list, _data);
Arnaldo Carvalho de Melo63dab222012-08-14 16:35:48 -0300150 parse_events__set_leader(NULL, list);
Jiri Olsa89efb022012-08-08 12:14:14 +0200151 $$ = list;
152}
Jiri Olsa90e2b222012-06-15 14:31:40 +0800153
Jiri Olsa89812fc2012-03-15 20:09:15 +0100154events:
Jiri Olsa89efb022012-08-08 12:14:14 +0200155events ',' event
156{
157 struct list_head *event = $3;
158 struct list_head *list = $1;
159
160 parse_events_update_lists(event, list);
161 $$ = list;
162}
163|
164event
Jiri Olsa89812fc2012-03-15 20:09:15 +0100165
Robert Richterac2ba9f2012-08-16 21:10:21 +0200166event: event_mod
167
168event_mod:
169event_name PE_MODIFIER_EVENT
Jiri Olsa89812fc2012-03-15 20:09:15 +0100170{
Jiri Olsa89efb022012-08-08 12:14:14 +0200171 struct list_head *list = $1;
Jiri Olsa46010ab2012-06-15 14:31:38 +0800172
Jiri Olsa5d7be902012-03-20 19:15:40 +0100173 /*
174 * Apply modifier on all events added by single event definition
175 * (there could be more events added for multiple tracepoint
176 * definitions via '*?'.
177 */
Jiri Olsaf5b11352012-08-08 12:21:54 +0200178 ABORT_ON(parse_events__modifier_event(list, $2, false));
Jiri Olsa89efb022012-08-08 12:14:14 +0200179 $$ = list;
Jiri Olsa89812fc2012-03-15 20:09:15 +0100180}
181|
Robert Richterac2ba9f2012-08-16 21:10:21 +0200182event_name
183
184event_name:
185PE_EVENT_NAME event_def
186{
187 ABORT_ON(parse_events_name($2, $1));
188 free($1);
189 $$ = $2;
190}
191|
Jiri Olsa89812fc2012-03-15 20:09:15 +0100192event_def
193
Jiri Olsa5f537a22012-03-15 20:09:18 +0100194event_def: event_pmu |
195 event_legacy_symbol |
Jiri Olsa89812fc2012-03-15 20:09:15 +0100196 event_legacy_cache sep_dc |
197 event_legacy_mem |
198 event_legacy_tracepoint sep_dc |
199 event_legacy_numeric sep_dc |
200 event_legacy_raw sep_dc
201
Jiri Olsa5f537a22012-03-15 20:09:18 +0100202event_pmu:
203PE_NAME '/' event_config '/'
204{
Arnaldo Carvalho de Melo23b63392013-01-18 16:56:57 -0300205 struct parse_events_evlist *data = _data;
David Ahernc5cd8ac2013-07-02 13:27:25 -0600206 struct list_head *list;
Jiri Olsab847cbd2012-05-21 09:12:51 +0200207
David Ahernc5cd8ac2013-07-02 13:27:25 -0600208 ALLOC_LIST(list);
209 ABORT_ON(parse_events_add_pmu(list, &data->idx, $1, $3));
Jiri Olsa5f537a22012-03-15 20:09:18 +0100210 parse_events__free_terms($3);
Jiri Olsab847cbd2012-05-21 09:12:51 +0200211 $$ = list;
Jiri Olsa5f537a22012-03-15 20:09:18 +0100212}
213
Jiri Olsacf3506d2012-07-04 00:00:43 +0200214value_sym:
215PE_VALUE_SYM_HW
216|
217PE_VALUE_SYM_SW
218
Jiri Olsa89812fc2012-03-15 20:09:15 +0100219event_legacy_symbol:
Jiri Olsacf3506d2012-07-04 00:00:43 +0200220value_sym '/' event_config '/'
Jiri Olsa89812fc2012-03-15 20:09:15 +0100221{
Arnaldo Carvalho de Melo23b63392013-01-18 16:56:57 -0300222 struct parse_events_evlist *data = _data;
David Ahernc5cd8ac2013-07-02 13:27:25 -0600223 struct list_head *list;
Jiri Olsa89812fc2012-03-15 20:09:15 +0100224 int type = $1 >> 16;
225 int config = $1 & 255;
226
David Ahernc5cd8ac2013-07-02 13:27:25 -0600227 ALLOC_LIST(list);
228 ABORT_ON(parse_events_add_numeric(list, &data->idx,
Jiri Olsa46010ab2012-06-15 14:31:38 +0800229 type, config, $3));
Jiri Olsa8f707d82012-03-15 20:09:16 +0100230 parse_events__free_terms($3);
Jiri Olsab847cbd2012-05-21 09:12:51 +0200231 $$ = list;
Jiri Olsa8f707d82012-03-15 20:09:16 +0100232}
233|
Jiri Olsacf3506d2012-07-04 00:00:43 +0200234value_sym sep_slash_dc
Jiri Olsa8f707d82012-03-15 20:09:16 +0100235{
Arnaldo Carvalho de Melo23b63392013-01-18 16:56:57 -0300236 struct parse_events_evlist *data = _data;
David Ahernc5cd8ac2013-07-02 13:27:25 -0600237 struct list_head *list;
Jiri Olsa8f707d82012-03-15 20:09:16 +0100238 int type = $1 >> 16;
239 int config = $1 & 255;
240
David Ahernc5cd8ac2013-07-02 13:27:25 -0600241 ALLOC_LIST(list);
242 ABORT_ON(parse_events_add_numeric(list, &data->idx,
Jiri Olsa46010ab2012-06-15 14:31:38 +0800243 type, config, NULL));
Jiri Olsab847cbd2012-05-21 09:12:51 +0200244 $$ = list;
Jiri Olsa89812fc2012-03-15 20:09:15 +0100245}
246
247event_legacy_cache:
248PE_NAME_CACHE_TYPE '-' PE_NAME_CACHE_OP_RESULT '-' PE_NAME_CACHE_OP_RESULT
249{
Arnaldo Carvalho de Melo23b63392013-01-18 16:56:57 -0300250 struct parse_events_evlist *data = _data;
David Ahernc5cd8ac2013-07-02 13:27:25 -0600251 struct list_head *list;
Jiri Olsab847cbd2012-05-21 09:12:51 +0200252
David Ahernc5cd8ac2013-07-02 13:27:25 -0600253 ALLOC_LIST(list);
254 ABORT_ON(parse_events_add_cache(list, &data->idx, $1, $3, $5));
Jiri Olsab847cbd2012-05-21 09:12:51 +0200255 $$ = list;
Jiri Olsa89812fc2012-03-15 20:09:15 +0100256}
257|
258PE_NAME_CACHE_TYPE '-' PE_NAME_CACHE_OP_RESULT
259{
Arnaldo Carvalho de Melo23b63392013-01-18 16:56:57 -0300260 struct parse_events_evlist *data = _data;
David Ahernc5cd8ac2013-07-02 13:27:25 -0600261 struct list_head *list;
Jiri Olsab847cbd2012-05-21 09:12:51 +0200262
David Ahernc5cd8ac2013-07-02 13:27:25 -0600263 ALLOC_LIST(list);
264 ABORT_ON(parse_events_add_cache(list, &data->idx, $1, $3, NULL));
Jiri Olsab847cbd2012-05-21 09:12:51 +0200265 $$ = list;
Jiri Olsa89812fc2012-03-15 20:09:15 +0100266}
267|
268PE_NAME_CACHE_TYPE
269{
Arnaldo Carvalho de Melo23b63392013-01-18 16:56:57 -0300270 struct parse_events_evlist *data = _data;
David Ahernc5cd8ac2013-07-02 13:27:25 -0600271 struct list_head *list;
Jiri Olsab847cbd2012-05-21 09:12:51 +0200272
David Ahernc5cd8ac2013-07-02 13:27:25 -0600273 ALLOC_LIST(list);
274 ABORT_ON(parse_events_add_cache(list, &data->idx, $1, NULL, NULL));
Jiri Olsab847cbd2012-05-21 09:12:51 +0200275 $$ = list;
Jiri Olsa89812fc2012-03-15 20:09:15 +0100276}
277
278event_legacy_mem:
279PE_PREFIX_MEM PE_VALUE ':' PE_MODIFIER_BP sep_dc
280{
Arnaldo Carvalho de Melo23b63392013-01-18 16:56:57 -0300281 struct parse_events_evlist *data = _data;
David Ahernc5cd8ac2013-07-02 13:27:25 -0600282 struct list_head *list;
Jiri Olsab847cbd2012-05-21 09:12:51 +0200283
David Ahernc5cd8ac2013-07-02 13:27:25 -0600284 ALLOC_LIST(list);
285 ABORT_ON(parse_events_add_breakpoint(list, &data->idx,
Jiri Olsa46010ab2012-06-15 14:31:38 +0800286 (void *) $2, $4));
Jiri Olsab847cbd2012-05-21 09:12:51 +0200287 $$ = list;
Jiri Olsa89812fc2012-03-15 20:09:15 +0100288}
289|
290PE_PREFIX_MEM PE_VALUE sep_dc
291{
Arnaldo Carvalho de Melo23b63392013-01-18 16:56:57 -0300292 struct parse_events_evlist *data = _data;
David Ahernc5cd8ac2013-07-02 13:27:25 -0600293 struct list_head *list;
Jiri Olsab847cbd2012-05-21 09:12:51 +0200294
David Ahernc5cd8ac2013-07-02 13:27:25 -0600295 ALLOC_LIST(list);
296 ABORT_ON(parse_events_add_breakpoint(list, &data->idx,
Jiri Olsa46010ab2012-06-15 14:31:38 +0800297 (void *) $2, NULL));
Jiri Olsab847cbd2012-05-21 09:12:51 +0200298 $$ = list;
Jiri Olsa89812fc2012-03-15 20:09:15 +0100299}
300
301event_legacy_tracepoint:
Alexander Yarygin2b9032e2014-04-25 17:34:05 +0200302PE_NAME '-' PE_NAME ':' PE_NAME
303{
304 struct parse_events_evlist *data = _data;
305 struct list_head *list;
306 char sys_name[128];
307 snprintf(&sys_name, 128, "%s-%s", $1, $3);
308
309 ALLOC_LIST(list);
310 ABORT_ON(parse_events_add_tracepoint(list, &data->idx, &sys_name, $5));
311 $$ = list;
312}
313|
Jiri Olsa89812fc2012-03-15 20:09:15 +0100314PE_NAME ':' PE_NAME
315{
Arnaldo Carvalho de Melo23b63392013-01-18 16:56:57 -0300316 struct parse_events_evlist *data = _data;
David Ahernc5cd8ac2013-07-02 13:27:25 -0600317 struct list_head *list;
Jiri Olsab847cbd2012-05-21 09:12:51 +0200318
David Ahernc5cd8ac2013-07-02 13:27:25 -0600319 ALLOC_LIST(list);
320 ABORT_ON(parse_events_add_tracepoint(list, &data->idx, $1, $3));
Jiri Olsab847cbd2012-05-21 09:12:51 +0200321 $$ = list;
Jiri Olsa89812fc2012-03-15 20:09:15 +0100322}
323
324event_legacy_numeric:
325PE_VALUE ':' PE_VALUE
326{
Arnaldo Carvalho de Melo23b63392013-01-18 16:56:57 -0300327 struct parse_events_evlist *data = _data;
David Ahernc5cd8ac2013-07-02 13:27:25 -0600328 struct list_head *list;
Jiri Olsab847cbd2012-05-21 09:12:51 +0200329
David Ahernc5cd8ac2013-07-02 13:27:25 -0600330 ALLOC_LIST(list);
331 ABORT_ON(parse_events_add_numeric(list, &data->idx, (u32)$1, $3, NULL));
Jiri Olsab847cbd2012-05-21 09:12:51 +0200332 $$ = list;
Jiri Olsa89812fc2012-03-15 20:09:15 +0100333}
334
335event_legacy_raw:
336PE_RAW
337{
Arnaldo Carvalho de Melo23b63392013-01-18 16:56:57 -0300338 struct parse_events_evlist *data = _data;
David Ahernc5cd8ac2013-07-02 13:27:25 -0600339 struct list_head *list;
Jiri Olsab847cbd2012-05-21 09:12:51 +0200340
David Ahernc5cd8ac2013-07-02 13:27:25 -0600341 ALLOC_LIST(list);
342 ABORT_ON(parse_events_add_numeric(list, &data->idx,
Jiri Olsa46010ab2012-06-15 14:31:38 +0800343 PERF_TYPE_RAW, $1, NULL));
Jiri Olsab847cbd2012-05-21 09:12:51 +0200344 $$ = list;
Jiri Olsa8f707d82012-03-15 20:09:16 +0100345}
346
Jiri Olsa89efb022012-08-08 12:14:14 +0200347start_terms: event_config
Jiri Olsa90e2b222012-06-15 14:31:40 +0800348{
Arnaldo Carvalho de Melo23b63392013-01-18 16:56:57 -0300349 struct parse_events_terms *data = _data;
Jiri Olsa90e2b222012-06-15 14:31:40 +0800350 data->terms = $1;
351}
352
Jiri Olsa8f707d82012-03-15 20:09:16 +0100353event_config:
354event_config ',' event_term
355{
356 struct list_head *head = $1;
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -0300357 struct parse_events_term *term = $3;
Jiri Olsa8f707d82012-03-15 20:09:16 +0100358
359 ABORT_ON(!head);
360 list_add_tail(&term->list, head);
361 $$ = $1;
362}
363|
364event_term
365{
366 struct list_head *head = malloc(sizeof(*head));
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -0300367 struct parse_events_term *term = $1;
Jiri Olsa8f707d82012-03-15 20:09:16 +0100368
369 ABORT_ON(!head);
370 INIT_LIST_HEAD(head);
371 list_add_tail(&term->list, head);
372 $$ = head;
373}
374
375event_term:
376PE_NAME '=' PE_NAME
377{
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -0300378 struct parse_events_term *term;
Jiri Olsa8f707d82012-03-15 20:09:16 +0100379
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -0300380 ABORT_ON(parse_events_term__str(&term, PARSE_EVENTS__TERM_TYPE_USER,
Jiri Olsa16fa7e82012-04-25 18:24:57 +0200381 $1, $3));
Jiri Olsa8f707d82012-03-15 20:09:16 +0100382 $$ = term;
383}
384|
385PE_NAME '=' PE_VALUE
386{
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -0300387 struct parse_events_term *term;
Jiri Olsa8f707d82012-03-15 20:09:16 +0100388
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -0300389 ABORT_ON(parse_events_term__num(&term, PARSE_EVENTS__TERM_TYPE_USER,
Jiri Olsa16fa7e82012-04-25 18:24:57 +0200390 $1, $3));
Jiri Olsa8f707d82012-03-15 20:09:16 +0100391 $$ = term;
392}
393|
Jiri Olsa1d33d6d2012-10-10 14:53:17 +0200394PE_NAME '=' PE_VALUE_SYM_HW
395{
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -0300396 struct parse_events_term *term;
Jiri Olsa1d33d6d2012-10-10 14:53:17 +0200397 int config = $3 & 255;
398
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -0300399 ABORT_ON(parse_events_term__sym_hw(&term, $1, config));
Jiri Olsa1d33d6d2012-10-10 14:53:17 +0200400 $$ = term;
401}
402|
Jiri Olsa8f707d82012-03-15 20:09:16 +0100403PE_NAME
404{
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -0300405 struct parse_events_term *term;
Jiri Olsa8f707d82012-03-15 20:09:16 +0100406
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -0300407 ABORT_ON(parse_events_term__num(&term, PARSE_EVENTS__TERM_TYPE_USER,
Jiri Olsa16fa7e82012-04-25 18:24:57 +0200408 $1, 1));
Jiri Olsa8f707d82012-03-15 20:09:16 +0100409 $$ = term;
410}
411|
Jiri Olsa1d33d6d2012-10-10 14:53:17 +0200412PE_VALUE_SYM_HW
413{
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -0300414 struct parse_events_term *term;
Jiri Olsa1d33d6d2012-10-10 14:53:17 +0200415 int config = $1 & 255;
416
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -0300417 ABORT_ON(parse_events_term__sym_hw(&term, NULL, config));
Jiri Olsa1d33d6d2012-10-10 14:53:17 +0200418 $$ = term;
419}
420|
Jiri Olsa6b5fc392012-05-21 09:12:53 +0200421PE_TERM '=' PE_NAME
422{
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -0300423 struct parse_events_term *term;
Jiri Olsa6b5fc392012-05-21 09:12:53 +0200424
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -0300425 ABORT_ON(parse_events_term__str(&term, (int)$1, NULL, $3));
Jiri Olsa6b5fc392012-05-21 09:12:53 +0200426 $$ = term;
427}
428|
Jiri Olsa8f707d82012-03-15 20:09:16 +0100429PE_TERM '=' PE_VALUE
430{
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -0300431 struct parse_events_term *term;
Jiri Olsa8f707d82012-03-15 20:09:16 +0100432
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -0300433 ABORT_ON(parse_events_term__num(&term, (int)$1, NULL, $3));
Jiri Olsa8f707d82012-03-15 20:09:16 +0100434 $$ = term;
435}
436|
437PE_TERM
438{
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -0300439 struct parse_events_term *term;
Jiri Olsa8f707d82012-03-15 20:09:16 +0100440
Arnaldo Carvalho de Melo6cee6cd2013-01-18 16:29:49 -0300441 ABORT_ON(parse_events_term__num(&term, (int)$1, NULL, 1));
Jiri Olsa8f707d82012-03-15 20:09:16 +0100442 $$ = term;
Jiri Olsa89812fc2012-03-15 20:09:15 +0100443}
444
445sep_dc: ':' |
446
Jiri Olsa8f707d82012-03-15 20:09:16 +0100447sep_slash_dc: '/' | ':' |
448
Jiri Olsa89812fc2012-03-15 20:09:15 +0100449%%
450
Irina Tirdea1d037ca2012-09-11 01:15:03 +0300451void parse_events_error(void *data __maybe_unused, void *scanner __maybe_unused,
452 char const *msg __maybe_unused)
Jiri Olsa89812fc2012-03-15 20:09:15 +0100453{
454}