I encountered this problem (actually a related problem,
not this specific one) while writing some syntax
colouring code for use in ved, a couple of years ago.
IIRC it was actually a bug(?) in ved, but for a similar
reason.
I don't remember if I reported it as a bug, or e-mailed
anyone about it.
But it's an example of why poplog needs a bug-tracker,
perhaps by using the bug-tracking mechanism on the
sourceforge Openpoplog site. I'm sure I would have
reported it, if the poplog community had (and used)
an agreed official bug-reporting mechanism.
There are not so many bugs that it would be a huge
amount of effort to maintain.
As for your specific question, my answer is: I don't know.
(As an aside, I tend not to use nested comments in my
code, either in C++ or pop11 or whatever, anymore,
I tend to stick to the EOL style of commenting.
ENTER gsr/@a/;;; / is actually less effort than inserting
a /* ... */ pair and makes the comment stand out better.
How many times to you see big comments enclosed in a box
of asterisks, to make them stand out? In C++ the #ifdef
mechanism is useful for hiding blocks of code, and is
better than using comment brackets for that purpose;
there is a similar mechanism in pop11.
Jonathan
----- Original Message -----
From: "Aaron Sloman" <A.Sloman@cs.bham.ac.uk>
To: <poplog-dev@cs.bham.ac.uk>
Sent: 16 January 2005 13:47
Subject: re-sending message about comments
> I gave the wrong address in the Cc line.
>
> >From Aaron Sloman Sun Jan 16 13:45:05 GMT 2005
> To: pop-forum@cs.bham.ac.uk
> Subject: Should this mishap?
> Cc: pop-dev@cs.bham.ac.uk
>
> I have just wasted about an hour because things like this produce
> an error (except that the example occurred in a very long file).
>
> /*
> '/foo/*.p'
> */
>
> ;;; MISHAP UNTERMINATED "/*" COMMENT
>
> I.e. the itemiser does not, at present, treat the second
> occurrence of '/*' as occurring inside a string. So it is
> treated as starting an embedded comment.
>
> The following does not mishap!!
>
> /*
> '/foo/*.p' ;;; */
> */
>
> My first reaction was that this is a bug in the itemiser, since
> comments should be able to include arbitrary legal pop11 code.
>
> I guess this has been the behaviour since about 25 years ago.
>
> Should it be changed?
>
> The counter-argument is that comments should be allowed to contain
> apostrophes, e.g.
>
> /* this shouldn't mishap (unterminated string) and it does not */
>
> Changing it would require digging into some very hairy code for the
> lexical analyser in
>
> $popsrc/item.p
>
> But perhaps too many comments with apostrophes would start causing
> errors if it were changed.
>
> Maybe the above error message could be changed to include a hint.
>
> Aaron
>
>
|