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

[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: Wed, 16 Mar 2016 02:48:52 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

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

Philip,

Ignoring the leading commas in the second FAIL seems quite consistent.  The
end-of-line (which is an implicit delimiter) is merged with other delimiters
when MultipleDelimsAsOne is specified, and not merged when that is not
specified.

Ignoring leading delimiters on the *first* line is less clear.  However, that
was done to pass the test in textscan.m that was introduced for bug #44750,
which was parsing "/home/foo/" into {"home", "foo"} (rather than {"", "home",
"foo"}).

Also, remember that you expected the behaviour on the first line to match the
behaviour on subsequent lines.  To achieve that while merging EOL-delimiters
with other delimiters, it is necessary to ignore leading delimiters on the
first line.  Is it a bug?  I'd say that no design choice is 100% consistent in
this case, and that TMW's is as reasonable as any.

However, you are the custodian of textscan: if you want leading delimiters on
the first line to count, that saves us two lines of code :)

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8783>

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




reply via email to

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