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

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

[Octave-bug-tracker] [bug #44616] Parser report Syntax Error dependent o


From: Thomas Foesel
Subject: [Octave-bug-tracker] [bug #44616] Parser report Syntax Error dependent on Whitespace
Date: Tue, 24 Mar 2015 10:13:09 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0

URL:
  <http://savannah.gnu.org/bugs/?44616>

                 Summary: Parser report Syntax Error dependent on Whitespace
                 Project: GNU Octave
            Submitted by: thofoe
            Submitted on: Tue 24 Mar 2015 10:13:07 AM GMT
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Crash
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.2
        Operating System: GNU/Linux

    _______________________________________________________

Details:

The following code should create a cell array with one element, the string
"foo" (my original problem was more complex, of course, but I downsized it to
that one).

===========
function txt=foo()
        txt = 'bar' ;
end

{ foo () }
===========

Executing this yields

===========
  syntax error

>>> { foo () }
         ^
===========

Obviously, the parser dislikes the space character after "foo"; it assumes
something similar to "[1 2;3 4]" and does not recognize that in fact this
should be a function call. If that character is deleted, the code works. Is
such a behavior intended?

Even more strange, it is also OK if the function "foo" is called before
outside of the cell array initialization.





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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