changement des locations, bug trouve par DDR
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5258 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
1404188744
commit
51233b6e83
|
@ -61,18 +61,22 @@ external c_engine: lex_tables -> int -> lexbuf -> int = "lex_engine"
|
|||
external c_new_engine: lex_tables -> int -> lexbuf -> int = "new_lex_engine"
|
||||
|
||||
let engine tbl state buf =
|
||||
buf.lex_start_p <- buf.lex_curr_p;
|
||||
let result = c_engine tbl state buf in
|
||||
if result >= 0 then begin
|
||||
buf.lex_start_p <- buf.lex_curr_p;
|
||||
buf.lex_curr_p <- {buf.lex_curr_p
|
||||
with pos_cnum = buf.lex_abs_pos + buf.lex_curr_pos};
|
||||
end;
|
||||
result
|
||||
;;
|
||||
|
||||
let new_engine tbl state buf =
|
||||
buf.lex_start_p <- buf.lex_curr_p;
|
||||
let result = c_new_engine tbl state buf in
|
||||
if result >= 0 then begin
|
||||
buf.lex_start_p <- buf.lex_curr_p;
|
||||
buf.lex_curr_p <- {buf.lex_curr_p
|
||||
with pos_cnum = buf.lex_abs_pos + buf.lex_curr_pos};
|
||||
end;
|
||||
result
|
||||
;;
|
||||
|
||||
|
|
Loading…
Reference in New Issue