X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=common-trace-format-proposal.txt;h=238fbadfead6c69709bcffad007f8478d558dd67;hb=2e7d7fcb288895571a682e1ae3344d15578b1f55;hp=e10c3dcc271f3e88ecf92ba5dfea00b3aefbbbe7;hpb=1ab22b2a8ccbc0766c46f4d5a5a15931644c3caa;p=ctf.git diff --git a/common-trace-format-proposal.txt b/common-trace-format-proposal.txt index e10c3dc..238fbad 100644 --- a/common-trace-format-proposal.txt +++ b/common-trace-format-proposal.txt @@ -936,7 +936,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 +954,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 -. 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 . 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 @@ -1392,11 +1394,8 @@ assignment-operator: type-assignment-operator: := -constant-expression: - unary-expression - constant-expression-range: - constant-expression ... constant-expression + unary-expression ... unary-expression 2.2) Declarations: @@ -1440,7 +1439,7 @@ type-specifier: ctf-type-specifier align-attribute: - align ( constant-expression ) + align ( unary-expression ) struct-specifier: struct identifier-opt { struct-or-variant-declaration-list-opt } align-attribute-opt @@ -1466,7 +1465,7 @@ struct-or-variant-declarator-list: struct-or-variant-declarator: declarator - declarator-opt : constant-expression + declarator-opt : unary-expression variant-specifier: variant identifier-opt variant-tag-opt { struct-or-variant-declaration-list } @@ -1488,7 +1487,7 @@ enumerator-list: enumerator: enumeration-constant - enumeration-constant = constant-expression + enumeration-constant = unary-expression enumeration-constant = constant-expression-range type-qualifier: @@ -1501,7 +1500,6 @@ direct-declarator: identifier ( declarator ) direct-declarator [ unary-expression ] - direct-declarator [ constant-expression ] abstract-declarator: pointer-opt direct-abstract-declarator @@ -1510,7 +1508,6 @@ direct-abstract-declarator: identifier-opt ( abstract-declarator ) direct-abstract-declarator [ unary-expression ] - direct-abstract-declarator [ constant-expression ] direct-abstract-declarator [ ] pointer: