> On Wed, 31 Oct 2012 10:17:06 -0700
> Ethan A Merritt <sfeam@...> wrote:
> On Wednesday, October 31, 2012 08:33:01 am Karl-Friedrich Ratzsch
> > Hi,
> > i observe a strange parser error, where any command containing + or
> > - would no longer be accepted. It first occured to me after a
> > mistype with the stats commmand, and boils down to this:
> > gp> a=0
> > gp> stats file"
> > undefined variable: file
> > gp> a=a+1
> > ^
> > ';' expected
> > gp> stats "file"
> > warning: Skipping unreadable file "file"
> > Can't read data file
> > gp> a=a+1; print a
> > 1
> > gp>
> Indeed quite strange. I see the same thing with 4.4.4 and with
> the current 4.6 CVS source.
> But it doesn't happen in 4.7, so bisecting the changes from
> 4.6 to 4.7 should identify the source of the problem and
> provide a fix.
> > Same happens after ommitting the leading " on giving the file name
> > in a fit command, eg.
> > gp> fit f(x) file"
> > undefinded variable: file
> > gp> a=a+1
> > ';'expectd
> > So after "stats" or "fit" gives out the "undefined variable" error,
> > the parser will no longer understand any command containing "+" or
> > "-" ("*", "/" work, btw.). After a another stats command that works
> > (or gives another error message), the parsing will be OK again.
> > The error does not occur with "plot", strangely.
> > I'm using gp4.6.0, official windows build. Is anyone working on the
> > 4.6.1 build for windows, btw? Tatsuro used to do it, i think, but if
> > he's not around, i might volunteer if someone has a few pointers on
> > how it's done. I'd be starting from scratch, so it might be a few
> > days ...
> > Regards, Karl
Git bisect says the fix happened in
Another interesting data point is that the issue only manifests when gnuplot
reads the input on STDIN, not from a file.
For reference, to find this commit, I did this:
$ git bisect start origin/master gnuplot-4-4-alpha
$ git bisect run zsh -c './prepare; ./configure --without-tutorial --without-cairo --without-lua; make -j7 -C src gnuplot || exit 125; HOME=/tmp src/gnuplot < /tmp/tst.gp |& grep -q expected; r=$?; git clean -ffdx; git reset --hard; exit $r'
fit f(x) file"