octave-maintainers
[Top][All Lists]
Advanced

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

Re: 'end' odds & ends


From: John W. Eaton
Subject: Re: 'end' odds & ends
Date: Thu, 10 Feb 2005 13:32:43 -0500

On 10-Feb-2005, address@hidden <address@hidden> wrote:

| > Yes, it is somewhat tricky to decide whether end is being used inside
| > an index expression.  What rule would you use (need not be stated in
| > Lisp)?  Once you've decided that, the fix is to either modify
| > octave-block-end-regexp appropriately, or, if the rule can't be stated
| > in a regexp, to replace occurrences of
| >
| >   (looking-at octave-block-end-regexp)
| >
| > with the function that can determine whether we are looking at the end
| > of a block and that is not confused by other uses of "end".
| 
| Yes, but can't the meaning be discerned from the fact that "end" used as
| an index always has a round parentheses about it?  Parentheses around an
| end wouldn't be valid when "end" means end of a loop or conditional.

The following is valid

  x(end-1, ...
    end-1)

as is

  if (cond)
    ...
  end, x(idx)

but probably neither is used much.  You also have to check for "}" and
I didn't notice before, but you'll have to do something with the uses of
octave-block-begin-or-end-regexp and octave-block-else-or-end-regexp.

jwe



reply via email to

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