On Fri, 10 Feb 2017, Allin Cottrell wrote:
On Fri, 10 Feb 2017, Allin Cottrell wrote:
> On Fri, 10 Feb 2017, Sven Schreiber wrote:
>
>> Also, I think we should offer a little more support. A script
>> that catches and perhaps even autocorrects the most common
>> occurrences for example. As Oleh indicated, a "=" in the same
>> line as an "if" for example can only mean "==" I think
(right?).
>> (... outside of a foreign block, that is....)
>
> The hansl parser knows what cases need fixing, but it doesn't
> have the facility to change its input (or at least not so the
> change will be saved). Hmm, may be worth investigating though.
Having now looked into this, the answer's Sorry, no, far too
complicated.
I gave up too soon. A fully rigorous checker would indeed be too
complicated, but all we really need is a program armed with
sufficient heuristics to catch all the problems with existing gfn
files, and it turns out that wasn't too hard to write. There's
source code and binaries for Windows and Mac at
https://sourceforge.net/projects/gretl/files/misc/
where you can also find a README that describes the program.
In my testing, this catches all the issues with current packages,
with no false positives or false negatives.
I'm therefore in a position to auto-correct the packages that are
affected, but I don't want to tread on anyone's toes. If you're the
author of a package noted at
http://lists.wfu.edu/pipermail/gretl-devel/2017-February/007411.html
and you haven't already fixed your package(s), and you want to do
that yourself (that is, you do _not_ want to have auto-correction
applied), please let me know.
Just to be clear: auto-correction would involve:
* replacing "=" with "==" wherever the latter is correct;
* incrementing the package version by the minimal increment;
* setting the package date to the current date; and
* nothing else.
Allin