🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.unix
Article #833

Re: Questions/comments about POSIX bc (P1003.2/D11)

#833
From: Bob Lenk
Date: Tue, 07 May 1991 00:29
55 lines
2764 bytes
Submitted-by: rml@hpfcdc.fc.hp.com (Bob Lenk)

In article <131021@uunet.UU.NET>, phil@cs.wwu.edu (Phil Nelson) writes:

>  1)  The character '-' "shall" be recognized as both the token
>      ADD_OP and the token '-'.
>      lines: 1587, 1670, 1737, 1738, 1749-1751

The intention is that the minus character can be recognized as either
unary minus or as a binary operator (with the same precedence as
the other ADD_OP, binary +).  The lexical specification is indeed
ambiguous and incorrect.


>  2)  Lines 1642-1644 are
>         parameter_list       : LETTER
>                              | define_list ',' LETTER
>      I presume it should be
>         parameter_list       : LETTER
>                              | parameter_list ',' LETTER

This was an error in preparation of Draft 10.  The presumption is
correct.


>  3)  Lines 1836-1838 state "A whole array passed as an argument
>      shall be specified by the array name followed by empty square
>      brackets." 
>      a) I find no provision in the grammar in the definition of the
>         parameter list define a parameter as an array.  (See lines
>         1642-1644.)
>      b) No provision is made in the grammar for the specification of
>         an array in the actual function call. (See 1657-1659.)

This was also an error in the preparation of Draft 10.  The sentence in
question was intended to be deleted.  A reference to this feature in
the grammar was deleted.  This feature has been documented but not
implemented in all historical versions of bc I have encountered.

I was the terchnical editor for bc during the ballot that produced Draft
10.  The three errors noted above are mine.  It is interesting that they
have gone unnoticed for this long (Draft 10 was distributed last summer,
and a full ballot recirculation has completed).

I am forwarding this message to the chair of P1003.2, effectively as
ballot comments.  Note that they do not include a resolution for problem
(1).  Those comments and this posting are made strictly as an
individual.

		Bob Lenk
		rml@fc.hp.com
		{uunet,hplabs}!fc.hp.com!rml


Volume-Number: Volume 23, Number 58
Technical Details
Message-ID: <131995@uunet.UU.NET>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!uunet.UU.NET!sef
References: <131021@uunet.UU.NET> <131021@uunet.UU.NET>,

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!uunet.UU.NET!sef
From: rml@hpfcdc.fc.hp.com (Bob Lenk)
Newsgroups: comp.std.unix
Subject: Re: Questions/comments about POSIX bc (P1003.2/D11)
Message-ID: <131995@uunet.UU.NET>
Date: 7 May 91 00:29:36 GMT
References: <131021@uunet.UU.NET> <131021@uunet.UU.NET>,
Sender: usenet@uunet.UU.NET
Lines: 55
Approved: sef@uunet.uu.net (Moderator, Sean Eric Fagan - comp.std.unix)
Nntp-Posting-Host: uunet.uu.net
X-Submissions: std-unix@uunet.uu.net
Originator: sef@uunet.UU.NET