bugGNU Octave - Bugs: bug #39418, new parser gives syntax error

 
 

bug #39418: new parser gives syntax error

Submitted by:  Michael Godfrey <godfrey>
Submitted on:  Sun 07 Jul 2013 12:30:24 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: FixedAssigned to: None
Originator Name: Michael GodfreyOpen/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 07 Jul 2013 07:04:00 PM UTC, comment #2:

I am happy to go with the updated syntax.
The change to a warning is OK, but I would also
be OK with an error message that explains the change.

I only used that syntax in a few places (that I know
of so far) so updating is easy.

Thanks,
Michael

Michael Godfrey <godfrey>
Project Member
Sun 07 Jul 2013 06:52:58 PM UTC, comment #1:

This change was intentional. If you want to use continuations inside character strings now, they have to be a backslash followed immediately by a newline character, and you have to be using double-quoted strings. Completely eliminating continuations inside single-quoted strings was done to improve Matlab compatibility.

OTOH, maybe this change is too abrupt, at least for the double-quoted strings (for single quoted strings, we have the excuse of fixing a Matlab compatibility bug). So how about this change:

http://hg.savannah.gnu.org/hgweb/octave/rev/bc12849bb6cc

With it there will be a warning for these continuation markers. You can disable it with "warning off Octave:deprecated-syntax" or you can fix the code to use backslash continuation markers.

John W. Eaton <jwe>
Project Administrator
Sun 07 Jul 2013 12:30:24 AM UTC, original submission:

The lines:

printf (" MEAN VARIANCE\n...
ORIG %10.2e %10.2e\n...
REMOD %10.2e %10.2e\n...
DIFF %10.2e %10.2e\n...
NORM %10.2e %10.2e\n", DM(1), DV(1), DM(2), DV(2), DM(3), DV(3), DM(4), DV(4));

produce:
error: unterminated character string constant
parse error near line 138 of file /home/godfrey/mdg/software/statistics/time_series_progs/demod/nonstat_pred.m

syntax error

>>> printf (" MEAN VARIANCE\n...

================================
This worked until latest updates.

Michael Godfrey <godfrey>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by godfrey (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 07 Jul 2013 06:52:58 PM UTCjweStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1