[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Sun, 16 Jan 2005 13:46:29 +0000 (UTC) 
Subject:Should this mishap? 
From:A . Sloman 
Volume-ID: 

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