[net.unix] /etc/config bug on a SUN-100??

brad@gcc-bill.ARPA (Brad Parker) (08/26/85)

While building a new kernel this weekend (what else to do when the
weather is IFR?) I seem to have found a bug in /etc/config on this
nifty SUN-100 box (Sun unix v1.3).

It seems as though /etc/config refuses to accept a new device with the
name "at0". The line:

device		at0 at mb0 csr 0x4000 priority 4

Gave me "syntax error" (or something similar) no matter what I did. I checked
devices.sun and files.sun (even conf.c) to no avail. To my suprise, upon
changing the device name to "ab0" everything worked fine (I didn't even have
to change the other files!)

So, I fired up emacs and changed all the required places to "ab" and it worked
like a champ. Like um, I've written a few parsers in my day and like, I did
notice that the next word is "at". Could this be, like, a bug in the parse?
(heavy emphasis on the Calif. beach accent - "like wow, naurly waves!")

Any ideas? Sun? Berkeley? Anyone? (ab is cool, but I really wanted "at").
-- 

J Bradford Parker
uucp: seismo!harvard!gcc-bill!brad

"She said you know how to spell AUDACIOUSLY? I could tell I was in love...
You want to go to heaven? or would you rather not be saved?" - Lloyd Coal

chris@umcp-cs.UUCP (Chris Torek) (08/26/85)

You got it: "at" is a keyword, and you can't use keywords where the
parser expects a name.  While it isn't pretty, you should be able to
get the name you want by using double quotes:

	device	"at0" at ...

(or perhaps it's device "at"0 at ...; I'm not sure).
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@maryland

keenan@inmet.UUCP (09/01/85)

A similar problem lies with the parser used by expr(1). Most versions of
expr have a length operator used thusly:
              expr length <string>
However the string must not be any of the other expr operators. For example:
              expr length length
gives a syntax error. The problem is that the scanner knows about the
keywords and returns the token instead of the string.

--keenan ross		UUCP:     {bellcore,ima,ihnp4}!inmet!keenan
 Intermetrics, Inc.	INTERNET: ima!inmet!keenan@CCA-UNIX.ARPA
 733 Concord Ave.
 Cambridge, MA  02138	PHONE:    (617) 661-1840