Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!uunet.UU.NET!sef From: phil@henson.cc.wwu.edu (Phil Nelson) Newsgroups: comp.std.unix Subject: Re: implementing from 1003.2 Message-ID: <1991May14.233213.29241@uunet.uu.net> Date: 14 May 91 18:17:57 GMT References: <132258@uunet.UU.NET> Sender: usenet@uunet.uu.net (UseNet News) Organization: Western Washington University Lines: 41 Approved: sef@uunet.uu.net (Moderator, Sean Eric Fagan - comp.std.unix) Originator: sef@uunet.UU.NET Nntp-Posting-Host: uunet.uu.net X-Submissions: std-unix@uunet.uu.net Submitted-by: phil@henson.cc.wwu.edu (Phil Nelson) andrew@alice.att.com (Andrew Hume) writes: > Can someone help clear up my misconceptions? I'll try. >I recently read someone complain about difficulties implementing >bc from the spec in 1003.2 and some quick response from the author First, it was not complaining about difficulties in implementing bc from the spec. It was very easy to implement from the spec. The problems were that the spec had errors. That is why the author came back with a quick response. >of that spec. What puzzled me is the underlying assumption that >you are supposed to be able to implement from the 1003.2 description. >Is this supposed to be true? (it obviously isn't for make, for example.) >I thought 1003.2 simply described stuff so you can use it, not implement it. At least for the bc spec, a yacc grammar is given and stated to be the "correct" grammar for bc. If that doesn't imply direct implementation details, I'm not sure what does. In fact, it describes in very great detail how a bc processor is supposed to work. (i.e. Internal representation must be in decimal.) In my reading of the bc spec, it sounds like it is directed at an implementor and not a user. A user could get all the needed information out of the spec, but it is not a user manual. It does leave a lot of room for different ways of doing the implementation, but I think that if one describes in detail how a program should work, a programmer should be able to take that spec and implement a program that works as stated in the spec. I would hope that the rest of the POSIX documents can be used in the same way as the bc spec. --Phil Nelson Volume-Number: Volume 23, Number 70