On Thu, 30 Oct 2014, Sven Schreiber wrote:
Am 30.10.2014 um 15:56 schrieb Allin Cottrell:
> On Thu, 30 Oct 2014, Sven Schreiber wrote:
>
>> I'm currently editing the function package HIP by Jack and Claudia
>> Pigini because I have run into various problems using it.
>>
>> For example if I simply have it converted to a hansl script and then try
>> to run the automatically included sample function call I get the error
>> "unexpected @".
>>
>> The cause is some string substitution after an 'mle' block, below is an
>> example of this error in a different context.
>>
>> I guess this is fallout from the new parser? This is with 1.10.0cvs from
>> Oct 24th on Windows 8.
>
> Take the HIP package first (the function HIP_estimate). Yes, this is
> fallout from the new parser, but it's an example of what I mentioned a
> while back, namely the greater rigour of the new parser.
>
> The trouble is that the string substitution token @bar is used
> unconditionally with "end mle", but the string variable "bar" is
> defined only in the cases where the scalar s has value 1 or 2 (and
> these are not the only possible values). The old parser ignored the
> undigested would-be string substitution @bar (in case s equals neither
> 1 nor 2) while the new one properly rejects it.
Aha! Very good to know. Indeed it works when I explicitly assign an
empty string to 'bar' in the remaining case. However, the error message
wasn't really providing a hint in this direction.
>
> In the example below @bar is invalid because the nulldata command has
> destroyed the variable "bar": you need the --preserve flag with
> nulldata.
whoops, yes of course -- again, if the error message had said "unknown
'bar'" I would probably found this mistake myself. But I know,
implementing informative error messages is easier said than done.
True, but maybe we could try harder in this sort of case.
As a general lesson, I guess that a considerable number of packages
could be broken now because of similar issues. Not saying that this
is a bad thing, but that we need a round of testing.
In fact I tested all the packages on the server for breakage before
putting the new parser into CVS. I thought I'd emailed everyone whose
package showed a problem but on checking my outgoing mail I can't find
any evidence that I got in touch with Jack or Claudia about the string
substitution issue in the HIP package -- sorry about that.
Allin