Changeset 29
- Timestamp:
- 06/30/06 07:05:01 (2 years ago)
- Files:
-
- trunk/lex_util.d (modified) (1 diff)
- trunk/node_set.d (modified) (2 diffs)
- trunk/xpath_processor.d (modified) (3 diffs)
- trunk/xpath_syntax.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lex_util.d
r27 r29 307 307 for (i = 0; cp_in[i] == ' ' || cp_in[i] == '\t'; i++) {} 308 308 int start = i; 309 for(i = cp_in.length ; i > 0 && (cp_in[i] == ' ' || cp_in[i] == '\t'); i--) {}309 for(i = cp_in.length - 1; i > 0 && (cp_in[i] == ' ' || cp_in[i] == '\t'); i--) {} 310 310 int end = i; 311 311 trunk/node_set.d
r28 r29 341 341 ptr_and_flag[] pafp_list; 342 342 uint u_node; 343 343 // u_nb_node = vpp_node_set.length; 344 344 if (u_nb_node < 2) 345 345 return; … … 347 347 // well, next problem is, if we want to make a clean library, we can't use static variables 348 348 // the only way for us to sort the vpp_node_set / op_attrib is to make it the other way up 349 pafp_list = new ptr_and_flag [u_nb_node]; 350 for (u_node = 0; u_node < u_nb_node; u_node++) 351 { 349 pafp_list.length = u_nb_node; 350 for (u_node = 0; u_node < u_nb_node; u_node++) 351 { 352 pafp_list[u_node] = new ptr_and_flag; 352 353 pafp_list [u_node] . vp_ptr = vpp_node_set [u_node]; 353 354 pafp_list [u_node] . o_flag = op_attrib [u_node]; trunk/xpath_processor.d
r28 r29 1473 1473 rv = false; 1474 1474 else 1475 rv = (S_arg_ 2[0..S_arg_1.length] == S_arg_1);1475 rv = (S_arg_1[0..S_arg_2.length] == S_arg_2); 1476 1476 1477 1477 v_push_bool (rv); … … 1497 1497 throw new execution_error (29); 1498 1498 S_base = erpp_arg [0].S_get_string (); 1499 i_start = erpp_arg [1].i_get_int () ;1499 i_start = erpp_arg [1].i_get_int () - 1; 1500 1500 if (u_nb_arg == 3) 1501 1501 i_length = erpp_arg [2].i_get_int (); … … 1505 1505 if (i_length == 0) 1506 1506 i_length = S_base.length; 1507 1507 1508 i_length += i_start; 1509 if (i_length > S_base.length) 1510 i_length = S_base.length; 1511 1508 1512 v_push_string (S_base[i_start..i_length]); 1509 1513 } trunk/xpath_syntax.d
r27 r29 59 59 uint u_nb_recurs; 60 60 bool o_recognize (xpath_construct xc_current, bool o_final) 61 in { writefln("Recognizing: %s (par: %s)", cp_disp_construct(xc_current), cp_disp_class_lex(ltp_get(0).lex_get_value())); }61 in { writefln("Recognizing: %s (par: %s)", cp_disp_construct(xc_current), (ltp_get(0) is null)?"(null)":cp_disp_class_lex(ltp_get(0).lex_get_value())); } 62 62 body 63 63 {
