Revision 1509

trunk/src/nh99/model.cpp (revision 1509)
474 474
    return 1;
475 475
  }
476 476

  
477
  //Added By Steve Martell
478
  void param_init_bounded_number::allocate(const data_vector & v,
479
   const char * _s)
480
   {
481
    double lb = v(1);
482
    double ub = v(2);
483
    int   phz = int(v(3));
484

  
485
    allocate(lb,ub,phz,_s);
486
   }
487

  
477 488
  void param_init_bounded_number::allocate(double _minb,
478 489
    double _maxb,int _phase_start,const char * _s)
479 490
  {
trunk/src/nh99/tpl2cpp.lex (revision 1509)
129 129
  int filename_size;
130 130
%}
131 131

  
132
filename \"[^\"]*\"

133
filenamesingle \'[^\']*\'

132
filename \"[^\"]*\"
133
filenamesingle \'[^\']*\'
134 134

  
135 135
name [a-z_A-Z]+(->)?[a-z_A-Z0-9]*
136 136

  
......
692 692
    BEGIN IN_MATRIX_DEF;
693 693
    fprintf(fdat,"%s","  data_matrix ");
694 694
                     }
695
<DEFINE_DATA>init_table {

695
<DEFINE_DATA>init_table {
696 696
    likelihood_found=1;
697
    BEGIN IN_TABLE_DEF;

698
    fprintf(fdat,"%s","  data_matrix ");

699
                     }

697
    BEGIN IN_TABLE_DEF;
698
    fprintf(fdat,"%s","  data_matrix ");
699
                     }
700 700

  
701 701
<DEFINE_DATA>init_3darray {
702 702
    likelihood_found=1;
......
1621 1621
                            }
1622 1622

  
1623 1623

  
1624
<INIT_BOUNDED_NUMBER_DEF>({name}\({float_num_exp},{float_num_exp},{num_exp}\)) {
1624
<INIT_BOUNDED_NUMBER_DEF>({name}\({float_num_exp},{float_num_exp},{num_exp}\)) |
1625
<INIT_BOUNDED_NUMBER_DEF>({name}\({name}\)) {
1625 1626

  
1627

  
1626 1628
    before_part(tmp_string,yytext,'(');  // get x in x(1,4)
1627 1629
    fprintf(fdat,"%s",tmp_string);
1628 1630
    fprintf(fall,"  %s",tmp_string);
......
2294 2296
    }
2295 2297
                            }
2296 2298

  
2297
<IN_TABLE_DEF>{name}\({filename}\) {
2298

  
2299
    before_part(tmp_string,yytext,'(');  // get A in A("mat.tab")
2300
 
2301
    fprintf(fdat,"%s",tmp_string);
2302
    fprintf(fdat,"%s",";\n");
2303
 
2304
    fprintf(fall,"  %s",tmp_string);
2305
    fprintf(fall,".allocate(0,-1,0,-1,\"%s\");\n",tmp_string);
2306
    after_part(tmp_string1,yytext,'\"');
2307
    fprintf(fall,"  dmatrix %s_tmp((adstring)%s;\n",tmp_string,tmp_string1);
2308
    fprintf(fall,"  %s = %s_tmp;\n",tmp_string,tmp_string);
2309
    if (needs_initialization)
2310
    {
2311
      needs_initialization=0;
2312
    }
2313
    if (!params_defined)
2314
    {
2299
<IN_TABLE_DEF>{name}\({filename}\) {
2300

  
2301
    before_part(tmp_string,yytext,'(');  // get A in A("mat.tab")
2302
 
2303
    fprintf(fdat,"%s",tmp_string);
2304
    fprintf(fdat,"%s",";\n");
2305
 
2306
    fprintf(fall,"  %s",tmp_string);
2307
    fprintf(fall,".allocate(0,-1,0,-1,\"%s\");\n",tmp_string);
2308
    after_part(tmp_string1,yytext,'\"');
2309
    fprintf(fall,"  dmatrix %s_tmp((adstring)%s;\n",tmp_string,tmp_string1);
2310
    fprintf(fall,"  %s = %s_tmp;\n",tmp_string,tmp_string);
2311
    if (needs_initialization)
2312
    {
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff