octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #29476] Parser incompatibility for keywords ag


From: Paul Ortyl
Subject: [Octave-bug-tracker] [bug #29476] Parser incompatibility for keywords against Matlab implementation, infinite loop
Date: Thu, 08 Apr 2010 18:47:29 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3) Gecko/20100404 Ubuntu/10.04 (lucid) Firefox/3.6.3

Follow-up Comment #2, bug #29476 (project octave):

In short: Matlab (tested with R2008a) accepts the code and runs it
correctly.

In the example, which is boiled down version of legacy module I have to use
an cannot modify, the 'do' is in context of definition of function
'prototype'.  In this context, forced by keyword 'function', these two letters
'do' cannot be keyword 'do' from the do...until loop.  It means that a
function named 'do' can be created overriding the keyword 'do'.  It has the
consequence, that no do...until loop may be used in this file.  As long as the
language 'specification' does not prohibit overriding of keywords the code is
correct.  Taken, that the reference implementation is Matlab(R) then the
masking of keyword by function name is allowed.

I must admit, that the concept of defining function with name theoretically
'reserved' to keyword is scary idea... but Matlab does not prohibit that.

I would expect this 'functionality' to work at least in --traditional mode.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?29476>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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