[Top][All Lists]

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

[Octave-patch-tracker] [patch #8783] C++ implementation of textscan

From: Lachlan Andrew
Subject: [Octave-patch-tracker] [patch #8783] C++ implementation of textscan
Date: Sat, 14 Nov 2015 01:56:02 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0

Follow-up Comment #4, patch #8783 (project octave):

Thanks for the new tests.  I've attached a patch (relative to the current
"default" branch this time).  It fixes several bugs that the tests

I had mentioned that I have changed some of the tests in textscan.m; I've also
changed some of the new tests you have supplied.  A diff of the changes (other
than those due to different error messages) is attached as "tests_diff.txt",
with some comments about why I changed the tests.  The complete set of tests I
have used is in  textscan.tst.

Matlab's textscan seems quite buggy, and also some of its decisions seem quite
arbitrary -- such as the fact that a %x.yf conversion will ignore the "e+zz"
exponent if  y  is too small.  It also doesn't support contractions such as
%[a-z], but jwe's code did.  I'm in favour of supporting them, even though it
reduces compatibility slightly.

FWIW, the reason the patch didn't apply cleanly to the current hg source is
that it is relative to 4.0.0.  That is mentioned in the comment associated
with the file; sorry for not making it clearer.  The reason for the convoluted
manner of including it from oct-stream.cc was that I didn't have autotools,
and didn't have enough internet access to install them.  Without them, I
couldn't tell "make" to include a new file in the build (editing Makefile by
hand could have been overwritten by ../configure, and even editing Makefile.in
risked being overwritten if hg had somehow decided Makefile.am was older than
Makefile.in), and so had to force it to be compiled some other way.  I have
now installed them, and subsequent patches will be relative to the default
development branch.

The current patch creates an .oct file as you suggest.  Are there instructions
on how to do that properly?  I have edited module-files to include a new
#include path, but I'm not sure if that is the right way.  If there are no
instructions, I'll add it to my newbies' FAQ :)


(file #35452, file #35453, file #35454)

Additional Item Attachment:

File name: textscan_diff_default_20151114.txt Size:102 KB
File name: textscan.tst                   Size:17 KB
File name: tests_diff.txt                 Size:6 KB


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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