From 13441bf58f43115c03856276005260dc2b869ea7 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 17 May 2011 17:12:43 -0400 Subject: [PATCH 1/1] TSDL grammar: ctf-assignment-expression-list require semicolon Before, it was allowed to do: event { id = 1 }; Now require semicolon at the end of the expression list, e.g. event { id = 1; }; Signed-off-by: Mathieu Desnoyers --- common-trace-format-proposal.txt | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/common-trace-format-proposal.txt b/common-trace-format-proposal.txt index e8ee258..552ac32 100644 --- a/common-trace-format-proposal.txt +++ b/common-trace-format-proposal.txt @@ -193,6 +193,8 @@ TSDL meta-data representation: /* based used for pretty-printing output, default: decimal. */ base = decimal OR dec OR OR d OR i OR u OR 10 OR hexadecimal OR hex OR x OR X OR p OR 16 OR octal OR oct OR o OR 8 OR binary OR b OR 2; + /* character encoding, default: none */ + encoding = none or UTF8 or ASCII; } Example of type inheritance (creation of a uint32_t named type): @@ -211,6 +213,17 @@ typealias integer { align = 1; } := int5_t; +The character encoding field can be used to specify that the integer +must be printed as a text character when read. e.g.: + +typealias integer { + size = 8; + align = 8; + signed = false; + encoding = UTF8; +} := utf_char; + + 4.1.6 GNU/C bitfields The GNU/C bitfields follow closely the integer representation, with a @@ -1539,8 +1552,8 @@ ctf-type-specifier: string { ctf-assignment-expression-list-opt } ctf-assignment-expression-list: - ctf-assignment-expression - ctf-assignment-expression-list ; ctf-assignment-expression + ctf-assignment-expression ; + ctf-assignment-expression-list ctf-assignment-expression ; ctf-assignment-expression: unary-expression assignment-operator unary-expression -- 2.34.1