TSDL grammar: ctf-assignment-expression-list require semicolon
[ctf.git] / common-trace-format-proposal.txt
index e8ee258137ce7e0b97fc58529736570dc2964b20..552ac32d33983d47f4b0dd30ba15abc4e198d25b 100644 (file)
@@ -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;
     /* 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):
   }
 
 Example of type inheritance (creation of a uint32_t named type):
@@ -211,6 +213,17 @@ typealias integer {
   align = 1;
 } := int5_t;
 
   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
 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:
        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
 
 ctf-assignment-expression:
        unary-expression assignment-operator unary-expression
This page took 0.022157 seconds and 4 git commands to generate.