[Developers] bug in tpl2cpp
John Sibert
sibert at hawaii.edu
Sun Jan 16 13:18:43 PST 2011
Thanks, Dave. That seems to do the trick.
It is fixed in revision 956, but I think we need to check if there are
other instances of the same error in both tpl2cpp.lex and tpl2rem.lex.
John
On 01/14/2011 02:52 PM, dave fournier wrote:
>
> Not sure what version of the source you have but for me to change
> the code around line 2690 from
>
> <IN_NAMED_THREE_ARRAY_DEF>{name} {
> if (warn_unallocated) write_unallocated("3darray()");
>
> strcpy(tmp_string,yytext); // get x in x(1,4)
> fprintf(fdat,"%s",tmp_string);
> fprintf(fall," %s",tmp_string);
> fprintf(fall,"%s",".allocate");
> after_part(tmp_string1,yytext,'('); // get x in x(1,4)
> before_part(tmp_string2,tmp_string1,')');
> fprintf(fall,"%s)",tmp_string2);
> fprintf(fdat,"%s",";\n");
> fprintf(fall,"%s",";\n");
> if (!params_defined)
> {
> BEGIN DEFINE_DATA;
> }
> else
> {
> BEGIN DEFINE_PARAMETERS;
> }
> }
>
>
> to
>
> <IN_NAMED_THREE_ARRAY_DEF>{name} {
> if (warn_unallocated) write_unallocated("3darray()");
>
> strcpy(tmp_string,yytext); // get x in x(1,4)
> fprintf(fdat,"%s",tmp_string);
> fprintf(fall," %s",tmp_string);
> fprintf(fall,"%s",".allocate()");
> fprintf(fdat,"%s",";\n");
> fprintf(fall,"%s",";\n");
> if (!params_defined)
> {
> BEGIN DEFINE_DATA;
> }
> else
> {
> BEGIN DEFINE_PARAMETERS;
> }
> }
>
> seems to do the trick.
> _______________________________________________
> Developers mailing list
> Developers at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/developers
>
--
John Sibert
Emeritus Researcher, SOEST
University of Hawaii at Manoa
Visit the ADMB project http://admb-project.org/
More information about the Developers
mailing list