[syslinux] comment syntax

Steve Brown sbrown7 at umbc.edu
Tue Aug 31 08:01:11 PDT 2010


On Tue, 31 Aug 2010, Ferenc Wagner wrote:

> Steve Brown <sbrown7 at umbc.edu> writes:

> On Tue, 31 Aug 2010, Ferenc Wagner wrote:
>
>> Gene Cumm <gene.cumm at gmail.com> writes:
>>
>>> On Mon, Aug 30, 2010 at 00:33, Prof S W Damle <swdamle at bsnl.in> wrote:
>>>
>>>>  ##  menu label ^0. xxxx  -->This IS displayed
>>>
>>> Of course.  Bad syntax.  You _must_ use "# " to make a comment and may
>>> not use "## " as is stated in doc/syslinux.txt
>>
>> Why is this, btw?  It's rather counterintuitive.  Is there a reason
>> against letting a single # turn the rest of the line into a comment,
>> as usual in some other scripting languages?
>
> Well, without the trailing space requirement, then the diglyph "#!"
> wouldn't be picked up as special, either.

#! isn't treated special now, as far as I know.  Or is it?

> I also have a vague feeling that the "##" diglyph is special in some
> language I've seen.

Yes, at least in the C preprocessor.  But why is this relevant?

I haven't looked at the code at all.... but my _guess_ is that in moving 
to C from asm, a stock parser was used?  C pre-processor for C code? 
Just pointing out that diglyphs are sometimes interpreted, and it would 
be _a_ (not necessarily _the_) reason for requiring the trailing space on 
'# '

Steve Brown
Systems Administrator
UMBC Imaging Research Center
sbrown7 at umbc.edu


More information about the Syslinux mailing list