octave-maintainers
[Top][All Lists]
Advanced

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

proposed parser changes


From: John W. Eaton
Subject: proposed parser changes
Date: Thu, 13 Mar 2008 14:33:58 -0400

I'm thinking about modifying the parser to remove the special "command"
and "rawcommand" tags for symbols and instead use the surrounding
context to decide when the parser is looking at a command-style
function.  This change would improve compatibility with Matlab.

I resisted this kind of change in the past because I didn't like the
following behavior of Matlab:

Given a function foo, the expression

  foo -1

would call foo with the character string "-1" as an argument but

  foo - 1
  foo-1
  foo- 1

would all call foo with no arguments, then subtract 1 from the value
it returned.

Now I'm beginning to think the advantage of improved compatibility and
not having to tag functions as commands outweighs the trouble that
might be caused by this small inconsistency.

Also, we no longer mark any functions in Octave or Octave Forge with
the "rawcommand" tag.  It was only used to support the special syntax
used by gset/gplot/gsplot.  Now that those are gone I see no reason to
keep the "rawcommand" tag in any case.

Comments?

jwe


reply via email to

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