implementing from 1003.2

Phil Nelson phil at
Wed May 15 04:17:57 AEST 1991

Submitted-by: phil at (Phil Nelson)

andrew at (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

More information about the Comp.std.unix mailing list