Alexey Khoroshilov <khoroshilov@xxxxxx> wrote, on 01 Aug 2008:
>
> @ page 2319 line 73197-73198 section 2.9.3 Lists comment {LVC-S0701}
>
> Problem:
>
> There is an inconsistency between formal definition of list in Shell Language
>Grammar and its informal description.
>
> The informal description of a list in section 2.9.3 Lists reads:
> 73197 A list is a sequence of one or more AND-OR lists separated by the
>operators ';' and '&' and
> 73198 optionally terminated by ';', '&', or <newline>.
>
>
> The formal definition of a list is as follows:
>
> 73528 list : list separator_op and_or
> 73529 | and_or
> 73530 ;
> ...
> 73668 separator_op : '&'
> 73669 | ';'
> 73670 ;
>
> This definition corresponds to the first part of the description only: "A
>list is a sequence of one or more AND-OR lists separated by the operators ';'
>and '&'".
>
Yes, the "terminator" in the description is not meant to be considered
as part of the list. It is what can come after the list, which is shown
in the grammar as the optional "separator" in complete_command:
complete_command : list separator
| list
;
> Action:
>
> Fix the inconsistency.
>
> For example, replace
>
> A list is a sequence of one or more AND-OR lists separated by the
>operators ';' and '&' and
> optionally terminated by ';', '&', or <newline>.
>
> by
>
> A list is a sequence of one or more AND-OR lists separated by the
>operators ';' and '&'.
>
Just removing the reference to the terminator doesn't work, as it is
mentioned further down the description as well:
"A ';' or <newline> terminator shall cause the preceding AND-OR
list to be executed sequentially; an '&' shall cause asynchronous
execution of the preceding AND-OR list."
There is actually another problem with this, as it ought to refer to
the use of ';' and '&' as separators between AND-OR lists as well.
I.e. it should have been:
"A ';' separator or a ';' or <newline> terminator shall cause the
preceding AND-OR list to be executed sequentially; an '&' separator
or terminator shall cause asynchronous execution of the preceding
AND-OR list."
If we always use "terminator" elsewhere to mean something that is part
of the thing it terminates (I'm not sure if we do), then maybe there
is a case for using a different wording in 2.9.3.
--
Geoff Clare <g.clare@xxxxxx>
The Open Group, Thames Tower, Station Road, Reading, RG1 1LX, England
|