Add missing -opt in grammar
[ctf.git] / common-trace-format-proposal.txt
index ff48de91266ad3029be23003f4f7216e91bf18d1..cb8ee16499645d018b28c6e92899eb4d701823ed 100644 (file)
@@ -886,9 +886,12 @@ beginning of the file. This magic number is also used to detect the
 endianness of the architecture by trying to read the CTF magic number
 and its counterpart in reversed endianness. The events within the
 meta-data stream have no event header nor event context. Each event only
-contains a "string" payload. Each meta-data packet start with a special
-packet header, specific to the meta-data stream, which contains,
-exactly:
+contains a "sequence" payload, which is a sequence of bits using the
+"trace.packet.header.content_size" field as a placeholder for its
+length. The formatting of this sequence of bits is a plain-text
+representation of the TSDL description. Each meta-data packet start with
+a special packet header, specific to the meta-data stream, which
+contains, exactly:
 
 struct metadata_packet_header {
   uint32_t magic;                      /* 0x75D11D57 */
@@ -936,7 +939,8 @@ in Section 7.3.
 
 TSDL uses two different types of scoping: a lexical scope is used for
 declarations and type definitions, and a dynamic scope is used for
-variants references to tag fields.
+variants references to tag fields and for sequence references to length
+fields.
 
 7.3.1 Lexical Scope
 
@@ -953,16 +957,17 @@ typedef or typealias is allowed within a sub-scope.
 
 A dynamic scope consists in the lexical scope augmented with the
 implicit event structure definition hierarchy presented at Section 6.
-The dynamic scope is only used for variant tag definitions. It is used
-at definition time to look up the location of the tag field associated
-with a variant.
-
-Therefore, variants in lower levels in the dynamic scope (e.g. event
-context) can refer to a tag field located in upper levels (e.g. in the
-event header) by specifying, in this case, the associated tag with
-<header.field_name>. This allows, for instance, the event context to
-define a variant referring to the "id" field of the event header as
-selector.
+The dynamic scope is used for variant tag and sequence length
+definitions. It is used at definition time to look up the location of
+the tag field associated with a variant, and to lookup up the location
+of the length field associated with a sequence.
+
+Therefore, variants (or sequences) in lower levels in the dynamic scope
+(e.g. event context) can refer to a tag (or length) field located in
+upper levels (e.g. in the event header) by specifying, in this case, the
+associated tag with <header.field_name>. This allows, for instance, the
+event context to define a variant referring to the "id" field of the
+event header as selector.
 
 The target dynamic scope must be specified explicitly when referring to
 a field outside of the local static scope. The dynamic scope prefixes
@@ -1449,7 +1454,7 @@ struct-or-variant-declaration-list:
 
 struct-or-variant-declaration:
        specifier-qualifier-list struct-or-variant-declarator-list ;
-       declaration-specifiers storage-class-specifier declaration-specifiers declarator-list ;
+       declaration-specifiers-opt storage-class-specifier declaration-specifiers-opt declarator-list ;
        typealias declaration-specifiers abstract-declarator-list := declaration-specifiers abstract-declarator-list ;
        typealias declaration-specifiers abstract-declarator-list := declarator-list ;
 
@@ -1540,6 +1545,6 @@ ctf-assignment-expression-list:
 ctf-assignment-expression:
        unary-expression assignment-operator unary-expression
        unary-expression type-assignment-operator type-specifier
-       declaration-specifiers storage-class-specifier declaration-specifiers declarator-list
+       declaration-specifiers-opt storage-class-specifier declaration-specifiers-opt declarator-list
        typealias declaration-specifiers abstract-declarator-list := declaration-specifiers abstract-declarator-list
        typealias declaration-specifiers abstract-declarator-list := declarator-list
This page took 0.023663 seconds and 4 git commands to generate.