From e1b95c4a48e08fb4bc42626db8614a3cd46d2a5e Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Thu, 3 Mar 2016 10:38:18 +0100 Subject: erts: Use 'bit string' in The Abstract Format document --- erts/doc/src/absform.xml | 20 +++++++++++--------- system/doc/reference_manual/typespec.xml | 8 ++++---- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/erts/doc/src/absform.xml b/erts/doc/src/absform.xml index ccdecf44ec..13756ddfdc 100644 --- a/erts/doc/src/absform.xml +++ b/erts/doc/src/absform.xml @@ -182,7 +182,7 @@

Individual patterns are represented as follows:

If P is an atomic literal L, then Rep(P) = Rep(L). - If P is a binary pattern + If P is a bit string pattern <<P_1:Size_1/TSL_1, ..., P_k:Size_k/TSL_k>>, where each Size_i is an expression that can be evaluated to an integer and each TSL_i is a type specificer list, then @@ -241,12 +241,13 @@

An expression E is one of the following alternatives:

If E is an atomic literal L, then Rep(E) = Rep(L). - If E is a binary comprehension + If E is a bit string comprehension <<E_0 || Q_1, ..., Q_k>>, where each Q_i is a qualifier, then Rep(E) = {bc,LINE,Rep(E_0),[Rep(Q_1), ..., Rep(Q_k)]}. For Rep(Q), see below. - If E is a binary constructor <<E_1:Size_1/TSL_1, ..., E_k:Size_k/TSL_k>>, + If E is a bit string constructor + <<E_1:Size_1/TSL_1, ..., E_k:Size_k/TSL_k>>, where each Size_i is an expression and each TSL_i is a type specificer list, then Rep(E) = {bin,LINE,[{bin_element,LINE,Rep(E_1),Rep(Size_1),Rep(TSL_1)}, ..., {bin_element,LINE,Rep(E_k),Rep(Size_k),Rep(TSL_k)}]}. @@ -386,16 +387,17 @@ If Q is a generator P <- E, where P is a pattern and E is an expression, then Rep(Q) = {generate,LINE,Rep(P),Rep(E)}. - If Q is a generator P <= E, where P is + If Q is a bit string generator + P <= E, where P is a pattern and E is an expression, then Rep(Q) = {b_generate,LINE,Rep(P),Rep(E)}.
- Binary Element Type Specifiers -

A type specifier list TSL for a binary element is a sequence of type - specifiers TS_1 - ... - TS_k, and + Bit String Element Type Specifiers +

A type specifier list TSL for a bit string element is a sequence + of type specifiers TS_1 - ... - TS_k, and Rep(TSL) = [Rep(TS_1), ..., Rep(TS_k)].

If TS is a type specifier A, where A is an atom, @@ -473,7 +475,7 @@

A guard test Gt is one of the following alternatives:

If Gt is an atomic literal L, then Rep(Gt) = Rep(L). - If Gt is a binary constructor + If Gt is a bit string constructor <<Gt_1:Size_1/TSL_1, ..., Gt_k:Size_k/TSL_k>>, where each Size_i is a guard test and each TSL_i is a type specificer list, then @@ -540,7 +542,7 @@ {ann_type,LINE,[Rep(A),Rep(T_0)]}. If T is an atom or integer literal L, then Rep(T) = Rep(L). - If T is a bitstring type <<_:M,_:_*N>>, + If T is a bit string type <<_:M,_:_*N>>, where M and N are singleton integer types, then Rep(T) = {type,LINE,binary,[Rep(M),Rep(N)]}. If T is the empty list type [], then Rep(T) = diff --git a/system/doc/reference_manual/typespec.xml b/system/doc/reference_manual/typespec.xml index 8915302088..c5d24a96b5 100644 --- a/system/doc/reference_manual/typespec.xml +++ b/system/doc/reference_manual/typespec.xml @@ -4,7 +4,7 @@
- 20032015 + 20032016 Ericsson AB. All Rights Reserved. @@ -148,9 +148,9 @@ Union :: Type1 | Type2 ]]>

- The general form of bitstrings is <<_:M, _:_*N>>, + The general form of bit strings is <<_:M, _:_*N>>, where M and N are positive integers. It denotes a - bitstring that is M + (k*N) bits long (that is, a bitstring that + bit string that is M + (k*N) bits long (that is, a bit string that starts with M bits and continues with k segments of N bits each, where k is also a positive integer). The notations <<_:_*N>>, <<_:M>>, @@ -514,7 +514,7 @@ the same tuple.

- However, it is up to the tools that process the specificationss + However, it is up to the tools that process the specifications to choose whether to take this extra information into account or not.

-- cgit v1.2.3