From 4dbce6d83dbfd9ebefed80f9b735ad2a3359172c Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 15 Dec 2003 15:18:25 +0000 Subject: update "faking a normal lexbuf" code for new ocaml's parsing.ml --- perl_checker.src/parser_helper.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'perl_checker.src') diff --git a/perl_checker.src/parser_helper.ml b/perl_checker.src/parser_helper.ml index ba30b58..a07ad38 100644 --- a/perl_checker.src/parser_helper.ml +++ b/perl_checker.src/parser_helper.ml @@ -897,9 +897,9 @@ let rec list2tokens l = match !rl with | [] -> internal_error "list2tokens" | ((start, end_), e) :: l -> - lexbuf.Lexing.lex_abs_pos <- 0 ; - lexbuf.Lexing.lex_start_pos <- start ; - lexbuf.Lexing.lex_curr_pos <- end_ ; + (* HACK: fake a normal lexbuf *) + lexbuf.Lexing.lex_start_p <- { Lexing.dummy_pos with Lexing.pos_cnum = start } ; + lexbuf.Lexing.lex_curr_p <- { Lexing.dummy_pos with Lexing.pos_cnum = end_ } ; rl := l ; e let parse_tokens parse tokens lexbuf_opt = -- cgit v1.2.1