Zheng Yan | ac20de6 | 2012-06-15 14:31:39 +0800 | [diff] [blame] | 1 | %pure-parser |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 2 | %name-prefix "parse_events_" |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 3 | %parse-param {void *_data} |
Zheng Yan | ac20de6 | 2012-06-15 14:31:39 +0800 | [diff] [blame] | 4 | %parse-param {void *scanner} |
| 5 | %lex-param {void* scanner} |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 6 | |
| 7 | %{ |
| 8 | |
| 9 | #define YYDEBUG 1 |
| 10 | |
| 11 | #include <linux/compiler.h> |
| 12 | #include <linux/list.h> |
| 13 | #include "types.h" |
| 14 | #include "util.h" |
| 15 | #include "parse-events.h" |
Zheng Yan | ac20de6 | 2012-06-15 14:31:39 +0800 | [diff] [blame] | 16 | #include "parse-events-bison.h" |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 17 | |
Zheng Yan | ac20de6 | 2012-06-15 14:31:39 +0800 | [diff] [blame] | 18 | extern int parse_events_lex (YYSTYPE* lvalp, void* scanner); |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 19 | |
| 20 | #define ABORT_ON(val) \ |
| 21 | do { \ |
| 22 | if (val) \ |
| 23 | YYABORT; \ |
| 24 | } while (0) |
| 25 | |
| 26 | %} |
| 27 | |
Jiri Olsa | 90e2b22 | 2012-06-15 14:31:40 +0800 | [diff] [blame] | 28 | %token PE_START_EVENTS PE_START_TERMS |
Jiri Olsa | cf3506d | 2012-07-04 00:00:43 +0200 | [diff] [blame] | 29 | %token PE_VALUE PE_VALUE_SYM_HW PE_VALUE_SYM_SW PE_RAW PE_TERM |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 30 | %token PE_NAME |
| 31 | %token PE_MODIFIER_EVENT PE_MODIFIER_BP |
| 32 | %token PE_NAME_CACHE_TYPE PE_NAME_CACHE_OP_RESULT |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame^] | 33 | %token PE_PREFIX_MEM PE_PREFIX_RAW PE_PREFIX_GROUP |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 34 | %token PE_ERROR |
| 35 | %type <num> PE_VALUE |
Jiri Olsa | cf3506d | 2012-07-04 00:00:43 +0200 | [diff] [blame] | 36 | %type <num> PE_VALUE_SYM_HW |
| 37 | %type <num> PE_VALUE_SYM_SW |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 38 | %type <num> PE_RAW |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 39 | %type <num> PE_TERM |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 40 | %type <str> PE_NAME |
| 41 | %type <str> PE_NAME_CACHE_TYPE |
| 42 | %type <str> PE_NAME_CACHE_OP_RESULT |
| 43 | %type <str> PE_MODIFIER_EVENT |
| 44 | %type <str> PE_MODIFIER_BP |
Jiri Olsa | cf3506d | 2012-07-04 00:00:43 +0200 | [diff] [blame] | 45 | %type <num> value_sym |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 46 | %type <head> event_config |
| 47 | %type <term> event_term |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 48 | %type <head> event_pmu |
| 49 | %type <head> event_legacy_symbol |
| 50 | %type <head> event_legacy_cache |
| 51 | %type <head> event_legacy_mem |
| 52 | %type <head> event_legacy_tracepoint |
| 53 | %type <head> event_legacy_numeric |
| 54 | %type <head> event_legacy_raw |
| 55 | %type <head> event_def |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame^] | 56 | %type <head> event |
| 57 | %type <head> events |
| 58 | %type <head> group_def |
| 59 | %type <head> group |
| 60 | %type <head> groups |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 61 | |
| 62 | %union |
| 63 | { |
| 64 | char *str; |
Robert Richter | b527bab | 2012-08-07 19:43:13 +0200 | [diff] [blame] | 65 | u64 num; |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 66 | struct list_head *head; |
| 67 | struct parse_events__term *term; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 68 | } |
| 69 | %% |
| 70 | |
Jiri Olsa | 90e2b22 | 2012-06-15 14:31:40 +0800 | [diff] [blame] | 71 | start: |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame^] | 72 | PE_START_EVENTS start_events |
Jiri Olsa | 90e2b22 | 2012-06-15 14:31:40 +0800 | [diff] [blame] | 73 | | |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame^] | 74 | PE_START_TERMS start_terms |
| 75 | |
| 76 | start_events: groups |
| 77 | { |
| 78 | struct parse_events_data__events *data = _data; |
| 79 | |
| 80 | parse_events_update_lists($1, &data->list); |
| 81 | } |
| 82 | |
| 83 | groups: |
| 84 | groups ',' group |
| 85 | { |
| 86 | struct list_head *list = $1; |
| 87 | struct list_head *group = $3; |
| 88 | |
| 89 | parse_events_update_lists(group, list); |
| 90 | $$ = list; |
| 91 | } |
| 92 | | |
| 93 | groups ',' event |
| 94 | { |
| 95 | struct list_head *list = $1; |
| 96 | struct list_head *event = $3; |
| 97 | |
| 98 | parse_events_update_lists(event, list); |
| 99 | $$ = list; |
| 100 | } |
| 101 | | |
| 102 | group |
| 103 | | |
| 104 | event |
| 105 | |
| 106 | group: |
| 107 | group_def ':' PE_MODIFIER_EVENT |
| 108 | { |
| 109 | struct list_head *list = $1; |
| 110 | |
| 111 | ABORT_ON(parse_events__modifier_group(list, $3)); |
| 112 | $$ = list; |
| 113 | } |
| 114 | | |
| 115 | group_def |
| 116 | |
| 117 | group_def: |
| 118 | PE_NAME '{' events '}' |
| 119 | { |
| 120 | struct list_head *list = $3; |
| 121 | |
| 122 | parse_events__group($1, list); |
| 123 | $$ = list; |
| 124 | } |
| 125 | | |
| 126 | '{' events '}' |
| 127 | { |
| 128 | struct list_head *list = $2; |
| 129 | |
| 130 | parse_events__group(NULL, list); |
| 131 | $$ = list; |
| 132 | } |
Jiri Olsa | 90e2b22 | 2012-06-15 14:31:40 +0800 | [diff] [blame] | 133 | |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 134 | events: |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame^] | 135 | events ',' event |
| 136 | { |
| 137 | struct list_head *event = $3; |
| 138 | struct list_head *list = $1; |
| 139 | |
| 140 | parse_events_update_lists(event, list); |
| 141 | $$ = list; |
| 142 | } |
| 143 | | |
| 144 | event |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 145 | |
| 146 | event: |
| 147 | event_def PE_MODIFIER_EVENT |
| 148 | { |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame^] | 149 | struct list_head *list = $1; |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 150 | |
Jiri Olsa | 5d7be90 | 2012-03-20 19:15:40 +0100 | [diff] [blame] | 151 | /* |
| 152 | * Apply modifier on all events added by single event definition |
| 153 | * (there could be more events added for multiple tracepoint |
| 154 | * definitions via '*?'. |
| 155 | */ |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame^] | 156 | ABORT_ON(parse_events__modifier_event(list, $2)); |
| 157 | $$ = list; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 158 | } |
| 159 | | |
| 160 | event_def |
| 161 | |
Jiri Olsa | 5f537a2 | 2012-03-15 20:09:18 +0100 | [diff] [blame] | 162 | event_def: event_pmu | |
| 163 | event_legacy_symbol | |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 164 | event_legacy_cache sep_dc | |
| 165 | event_legacy_mem | |
| 166 | event_legacy_tracepoint sep_dc | |
| 167 | event_legacy_numeric sep_dc | |
| 168 | event_legacy_raw sep_dc |
| 169 | |
Jiri Olsa | 5f537a2 | 2012-03-15 20:09:18 +0100 | [diff] [blame] | 170 | event_pmu: |
| 171 | PE_NAME '/' event_config '/' |
| 172 | { |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 173 | struct parse_events_data__events *data = _data; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 174 | struct list_head *list = NULL; |
| 175 | |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 176 | ABORT_ON(parse_events_add_pmu(&list, &data->idx, $1, $3)); |
Jiri Olsa | 5f537a2 | 2012-03-15 20:09:18 +0100 | [diff] [blame] | 177 | parse_events__free_terms($3); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 178 | $$ = list; |
Jiri Olsa | 5f537a2 | 2012-03-15 20:09:18 +0100 | [diff] [blame] | 179 | } |
| 180 | |
Jiri Olsa | cf3506d | 2012-07-04 00:00:43 +0200 | [diff] [blame] | 181 | value_sym: |
| 182 | PE_VALUE_SYM_HW |
| 183 | | |
| 184 | PE_VALUE_SYM_SW |
| 185 | |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 186 | event_legacy_symbol: |
Jiri Olsa | cf3506d | 2012-07-04 00:00:43 +0200 | [diff] [blame] | 187 | value_sym '/' event_config '/' |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 188 | { |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 189 | struct parse_events_data__events *data = _data; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 190 | struct list_head *list = NULL; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 191 | int type = $1 >> 16; |
| 192 | int config = $1 & 255; |
| 193 | |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 194 | ABORT_ON(parse_events_add_numeric(&list, &data->idx, |
| 195 | type, config, $3)); |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 196 | parse_events__free_terms($3); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 197 | $$ = list; |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 198 | } |
| 199 | | |
Jiri Olsa | cf3506d | 2012-07-04 00:00:43 +0200 | [diff] [blame] | 200 | value_sym sep_slash_dc |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 201 | { |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 202 | struct parse_events_data__events *data = _data; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 203 | struct list_head *list = NULL; |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 204 | int type = $1 >> 16; |
| 205 | int config = $1 & 255; |
| 206 | |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 207 | ABORT_ON(parse_events_add_numeric(&list, &data->idx, |
| 208 | type, config, NULL)); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 209 | $$ = list; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 210 | } |
| 211 | |
| 212 | event_legacy_cache: |
| 213 | PE_NAME_CACHE_TYPE '-' PE_NAME_CACHE_OP_RESULT '-' PE_NAME_CACHE_OP_RESULT |
| 214 | { |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 215 | struct parse_events_data__events *data = _data; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 216 | struct list_head *list = NULL; |
| 217 | |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 218 | ABORT_ON(parse_events_add_cache(&list, &data->idx, $1, $3, $5)); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 219 | $$ = list; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 220 | } |
| 221 | | |
| 222 | PE_NAME_CACHE_TYPE '-' PE_NAME_CACHE_OP_RESULT |
| 223 | { |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 224 | struct parse_events_data__events *data = _data; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 225 | struct list_head *list = NULL; |
| 226 | |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 227 | ABORT_ON(parse_events_add_cache(&list, &data->idx, $1, $3, NULL)); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 228 | $$ = list; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 229 | } |
| 230 | | |
| 231 | PE_NAME_CACHE_TYPE |
| 232 | { |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 233 | struct parse_events_data__events *data = _data; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 234 | struct list_head *list = NULL; |
| 235 | |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 236 | ABORT_ON(parse_events_add_cache(&list, &data->idx, $1, NULL, NULL)); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 237 | $$ = list; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 238 | } |
| 239 | |
| 240 | event_legacy_mem: |
| 241 | PE_PREFIX_MEM PE_VALUE ':' PE_MODIFIER_BP sep_dc |
| 242 | { |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 243 | struct parse_events_data__events *data = _data; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 244 | struct list_head *list = NULL; |
| 245 | |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 246 | ABORT_ON(parse_events_add_breakpoint(&list, &data->idx, |
| 247 | (void *) $2, $4)); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 248 | $$ = list; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 249 | } |
| 250 | | |
| 251 | PE_PREFIX_MEM PE_VALUE sep_dc |
| 252 | { |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 253 | struct parse_events_data__events *data = _data; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 254 | struct list_head *list = NULL; |
| 255 | |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 256 | ABORT_ON(parse_events_add_breakpoint(&list, &data->idx, |
| 257 | (void *) $2, NULL)); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 258 | $$ = list; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 259 | } |
| 260 | |
| 261 | event_legacy_tracepoint: |
| 262 | PE_NAME ':' PE_NAME |
| 263 | { |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 264 | struct parse_events_data__events *data = _data; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 265 | struct list_head *list = NULL; |
| 266 | |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 267 | ABORT_ON(parse_events_add_tracepoint(&list, &data->idx, $1, $3)); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 268 | $$ = list; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 269 | } |
| 270 | |
| 271 | event_legacy_numeric: |
| 272 | PE_VALUE ':' PE_VALUE |
| 273 | { |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 274 | struct parse_events_data__events *data = _data; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 275 | struct list_head *list = NULL; |
| 276 | |
Robert Richter | b527bab | 2012-08-07 19:43:13 +0200 | [diff] [blame] | 277 | ABORT_ON(parse_events_add_numeric(&list, &data->idx, (u32)$1, $3, NULL)); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 278 | $$ = list; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 279 | } |
| 280 | |
| 281 | event_legacy_raw: |
| 282 | PE_RAW |
| 283 | { |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 284 | struct parse_events_data__events *data = _data; |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 285 | struct list_head *list = NULL; |
| 286 | |
Jiri Olsa | 46010ab | 2012-06-15 14:31:38 +0800 | [diff] [blame] | 287 | ABORT_ON(parse_events_add_numeric(&list, &data->idx, |
| 288 | PERF_TYPE_RAW, $1, NULL)); |
Jiri Olsa | b847cbd | 2012-05-21 09:12:51 +0200 | [diff] [blame] | 289 | $$ = list; |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 290 | } |
| 291 | |
Jiri Olsa | 89efb02 | 2012-08-08 12:14:14 +0200 | [diff] [blame^] | 292 | start_terms: event_config |
Jiri Olsa | 90e2b22 | 2012-06-15 14:31:40 +0800 | [diff] [blame] | 293 | { |
| 294 | struct parse_events_data__terms *data = _data; |
| 295 | data->terms = $1; |
| 296 | } |
| 297 | |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 298 | event_config: |
| 299 | event_config ',' event_term |
| 300 | { |
| 301 | struct list_head *head = $1; |
| 302 | struct parse_events__term *term = $3; |
| 303 | |
| 304 | ABORT_ON(!head); |
| 305 | list_add_tail(&term->list, head); |
| 306 | $$ = $1; |
| 307 | } |
| 308 | | |
| 309 | event_term |
| 310 | { |
| 311 | struct list_head *head = malloc(sizeof(*head)); |
| 312 | struct parse_events__term *term = $1; |
| 313 | |
| 314 | ABORT_ON(!head); |
| 315 | INIT_LIST_HEAD(head); |
| 316 | list_add_tail(&term->list, head); |
| 317 | $$ = head; |
| 318 | } |
| 319 | |
| 320 | event_term: |
| 321 | PE_NAME '=' PE_NAME |
| 322 | { |
| 323 | struct parse_events__term *term; |
| 324 | |
Jiri Olsa | 16fa7e8 | 2012-04-25 18:24:57 +0200 | [diff] [blame] | 325 | ABORT_ON(parse_events__term_str(&term, PARSE_EVENTS__TERM_TYPE_USER, |
| 326 | $1, $3)); |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 327 | $$ = term; |
| 328 | } |
| 329 | | |
| 330 | PE_NAME '=' PE_VALUE |
| 331 | { |
| 332 | struct parse_events__term *term; |
| 333 | |
Jiri Olsa | 16fa7e8 | 2012-04-25 18:24:57 +0200 | [diff] [blame] | 334 | ABORT_ON(parse_events__term_num(&term, PARSE_EVENTS__TERM_TYPE_USER, |
| 335 | $1, $3)); |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 336 | $$ = term; |
| 337 | } |
| 338 | | |
| 339 | PE_NAME |
| 340 | { |
| 341 | struct parse_events__term *term; |
| 342 | |
Jiri Olsa | 16fa7e8 | 2012-04-25 18:24:57 +0200 | [diff] [blame] | 343 | ABORT_ON(parse_events__term_num(&term, PARSE_EVENTS__TERM_TYPE_USER, |
| 344 | $1, 1)); |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 345 | $$ = term; |
| 346 | } |
| 347 | | |
Jiri Olsa | 6b5fc39 | 2012-05-21 09:12:53 +0200 | [diff] [blame] | 348 | PE_TERM '=' PE_NAME |
| 349 | { |
| 350 | struct parse_events__term *term; |
| 351 | |
Robert Richter | b527bab | 2012-08-07 19:43:13 +0200 | [diff] [blame] | 352 | ABORT_ON(parse_events__term_str(&term, (int)$1, NULL, $3)); |
Jiri Olsa | 6b5fc39 | 2012-05-21 09:12:53 +0200 | [diff] [blame] | 353 | $$ = term; |
| 354 | } |
| 355 | | |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 356 | PE_TERM '=' PE_VALUE |
| 357 | { |
| 358 | struct parse_events__term *term; |
| 359 | |
Robert Richter | b527bab | 2012-08-07 19:43:13 +0200 | [diff] [blame] | 360 | ABORT_ON(parse_events__term_num(&term, (int)$1, NULL, $3)); |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 361 | $$ = term; |
| 362 | } |
| 363 | | |
| 364 | PE_TERM |
| 365 | { |
| 366 | struct parse_events__term *term; |
| 367 | |
Robert Richter | b527bab | 2012-08-07 19:43:13 +0200 | [diff] [blame] | 368 | ABORT_ON(parse_events__term_num(&term, (int)$1, NULL, 1)); |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 369 | $$ = term; |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 370 | } |
| 371 | |
| 372 | sep_dc: ':' | |
| 373 | |
Jiri Olsa | 8f707d8 | 2012-03-15 20:09:16 +0100 | [diff] [blame] | 374 | sep_slash_dc: '/' | ':' | |
| 375 | |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 376 | %% |
| 377 | |
Zheng Yan | ac20de6 | 2012-06-15 14:31:39 +0800 | [diff] [blame] | 378 | void parse_events_error(void *data __used, void *scanner __used, |
Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame] | 379 | char const *msg __used) |
| 380 | { |
| 381 | } |