octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: handling comments in the parser


From: John W. Eaton
Subject: Re: handling comments in the parser
Date: Thu, 7 Jun 2012 14:27:16 -0400

On  6-Jun-2012, Michael D Godfrey wrote:

| On 06/06/2012 05:04 PM, John W. Eaton wrote:
| 
|     So would there be any objection to simplifying the parser so that it
|     discards comments (except for the first block that defines the
|     docstring for a function; we would continue to store that as needed)?
|     Can anyone think of trouble that this change would cause?
| 
| I think that this is reasonable.  It is useful to have the input source,
| but this is retained for most purposes anyhow.  Simplifying the parser
| has substantial value, too.  I vote for making this change.

I've given this issue some more thought and as tempting as it is to
simplify things, I think Daniel is right about keeping this code
around so that we could potentially write a translator or use the
parser to provide information for syntax highlighting.  I may not
write those things myself, but it took a lot of work to get to where
we are now with recognizing and storing comments.  I'm no longer
seeing the point of throwing that work away just for what now seems a
relatively small simplification.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]