On Fri 31 Oct 2008 at 05:48PM, Danek Duvall wrote:
> On Thu, Oct 30, 2008 at 05:50:16PM -0700, Dan Price wrote:
> 
> > http://cr.opensolaris.org/~dp/pkg-3509-2/
> 
> line 125: we could break here, no?

Yah. Fixed.

> line 457: odd to have this here.  Why not "if line.startswith("#"):
> continue" after line 453?  And didn't we find that .startswith() was really

Well, the kernel's parser accepts comments whereever they start.  This
was an attempt to get a little closer to that.

See read_binding_file()'s (in modsysfile.c) handling of the POUND
token-- essentially:

foo  37  # I hate this driver

Is syntactically valid.  So I taught our parser to follow similar
rules.  In looking back at this, the kernel's parser is smart enough to
know that: foo#oooo is foo with a comment.  And it knows that
"foo#ooo" is foo#ooo since there's quoting present.  So, we're not
really going to be quite right unless we more formally parse the file.

> slow?  I'd turn this into a list comprehension after removing that test,
> too:

Sure, I'll fix that.

        -dp

-- 
Daniel Price - Solaris Kernel Engineering - [EMAIL PROTECTED] - blogs.sun.com/dp
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to