This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Error in block comments


On Tue, Apr 25, 2000 at 09:37:46PM +0200, Martin Grabmueller wrote:
> it seems Guile is not parsing block comments correctly, but I am not sure
> whether it is by specification rather than by error.  Consider the following
> test: 
> 
> mgrabmue@tortoise (~): guile
> guile> '(#!
> ... !#
> ... )
> ERROR: In procedure read:
> ERROR: unexpected ")"
> ABORT: (misc-error)
> guile> 
> 
> Block comments are not ignored inside of list and vector literals.  I would
> call this a bug but I recall having read something about `block comments are
> only allowed at the beginning of script files'.  I don't know where I read
> that though. Please enlighten me who is mistaken: the interpreter or me.

OK, I looked at the code and it seems like you are wrong. Guile checks for
'\n!#\n' to end a block comment, so !# needs to be on a line by itself. I
can't find where the syntax for block comments is documented however. I'm not exactly sure what the syntax is, I try things like:

'(#!
!#
)

and they don't work. This is not intuitive to those of us familiar with
C-style comments. =^P Maybe the code is wrong, I dunno... need to go
find the scsh manual.

--
C. Ray C. aka Christopher Cramer
crayc@pyro.net
http://www.pyro.net/~crayc/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]