bugGNU Octave - Bugs: bug #39967, Parse error for valid (?) syntax

 
 

bug #39967: Parse error for valid (?) syntax

Submitter:  None
Submitted:  Fri 06 Sep 2013 08:35:28 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Michael Leitner Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.2
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 06 Sep 2013 12:32:04 PM UTC, comment #3: 

Thanks for your bug report. Several changes have been made to the Octave parser in the development branch and this expression which fails in 3.6 does do exactly what you expect now.

To get this new behavior you can build Octave from the development sources or wait for the next major release of Octave.

Mike Miller <mtmiller>
Group Member
Fri 06 Sep 2013 08:51:19 AM UTC, comment #2: 

Sorry for this piecemeal report, but it seems the problem is not with the parsing of the single quote transpose as my previous test case implied, but the interleaving of the colon operator and the matrix brackets:

[1;([2 3](:))]

and

[1;(2:3)(:)]

both work, but

[1;[2 3](:)]

doesn't.

Anonymous
Fri 06 Sep 2013 08:40:54 AM UTC, comment #1: 

ok, now without markup:

... Anyway, I would expect

[1 [2 3](:)']

to be equivalent to

[1 [2 3]]

instead it gives a syntax error. Interestingly,

[1 [2 3]'(:)']

works.

Anonymous
Fri 06 Sep 2013 08:35:28 AM UTC, original submission:  

As far as I know, Octave has no defined syntax yet (Appendix I in the manual), and this use of the colon operator seems to be an extension with respect to the (supposedly exactly defined) MATLAB syntax (although --traditional seems to let it pass). Anyway, I would expect


~:1> [1 [2 3](:)']
+verbatim+
to be equivalent to
+verbatim+
~:1> [1 [2 3]]
+verbatim+
instead the interpreter says
+verbatim+
parse error:

  syntax error

>>> [1 [2 3](:)']
              ^
+verbatim+
Interestingly,
+verbatim+
~:1> [1 [2 3]'(:)']
+verbatim+
does work.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-06 mtmiller StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code