summaryrefslogtreecommitdiff
path: root/overlay
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2018-02-01 17:27:51 +0000
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>2018-02-01 17:50:54 +0000
commit812eeedddc2747c2025c6975d0a5fad3cd11c94f (patch)
tree742eef649e906c8f6ee19cc45d949fc12a7d1248 /overlay
parentdea4ebdcd58e594d1d2f2b03e3ddb4b8b73b3529 (diff)
overlay: reindent tracepoint parser
I wrote it, but couldn't reread myself... This doesn't contain any change apart from reindenting. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'overlay')
-rw-r--r--overlay/tracepoint_format.leg37
1 files changed, 18 insertions, 19 deletions
diff --git a/overlay/tracepoint_format.leg b/overlay/tracepoint_format.leg
index 7a09149d..0db9a55f 100644
--- a/overlay/tracepoint_format.leg
+++ b/overlay/tracepoint_format.leg
@@ -1,28 +1,27 @@
TracepointFmt =
- 'name' ':' Space n:PropertyName EndLine
- { free(v.string); }
- 'ID:' Space v:Number EndLine
- { yy->ctx.tp->event_id = v.integer; }
+ 'name' ':' Space n:PropertyName EndLine { free(v.string); }
+ 'ID:' Space v:Number EndLine { yy->ctx.tp->event_id = v.integer; }
'format:' EndLine
Field+
'print fmt:' [^.]* !.
-Field = Space (Property ';' Space)+ EndLine
- { yy->ctx.tp->n_fields++; }
- | EndLine
+Field = Space (Property ';' Space)+ EndLine
+ { yy->ctx.tp->n_fields++; }
+ | EndLine
-Property = 'offset' ':' v:Number
- { yy->ctx.tp->fields[yy->ctx.tp->n_fields].offset = v.integer; }
- | 'size' ':' v:Number
- { yy->ctx.tp->fields[yy->ctx.tp->n_fields].size = v.integer; }
- | 'signed' ':' v:Number
- { yy->ctx.tp->fields[yy->ctx.tp->n_fields].is_signed = v.integer != 0; }
- | 'field' ':' v:PropertyValue
- { snprintf(yy->ctx.tp->fields[yy->ctx.tp->n_fields].name,
- sizeof(yy->ctx.tp->fields[yy->ctx.tp->n_fields].name),
- "%s", strrchr(v.string, ' ') + 1); free(v.string); }
- | n:PropertyName ':' v:PropertyValue
- { free(n.string); free(v.string); }
+Property = 'offset' ':' v:Number
+ { yy->ctx.tp->fields[yy->ctx.tp->n_fields].offset = v.integer; }
+ | 'size' ':' v:Number
+ { yy->ctx.tp->fields[yy->ctx.tp->n_fields].size = v.integer; }
+ | 'signed' ':' v:Number
+ { yy->ctx.tp->fields[yy->ctx.tp->n_fields].is_signed = v.integer != 0; }
+ | 'field' ':' v:PropertyValue
+ { snprintf(yy->ctx.tp->fields[yy->ctx.tp->n_fields].name,
+ sizeof(yy->ctx.tp->fields[yy->ctx.tp->n_fields].name),
+ "%s", strrchr(v.string, ' ') + 1);
+ free(v.string); }
+ | n:PropertyName ':' v:PropertyValue
+ { free(n.string); free(v.string); }
PropertyName = < [A-Za-z0-9_]+ >
{ $$.string = strdup(yytext); }