From 1643d1ffa2964b66b9e82a41b1c19b76d3123003 Mon Sep 17 00:00:00 2001 From: vgross Date: Tue, 22 Jun 2010 14:47:37 +0000 Subject: fix bug #2318, parsing error on dos line endings git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13177 85f007b7-540e-0410-9357-904b9bb8a0f7 --- ide/coq_lex.mll | 2 +- ide/coqide.ml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ide') diff --git a/ide/coq_lex.mll b/ide/coq_lex.mll index ea981d7b7..01c3025e6 100644 --- a/ide/coq_lex.mll +++ b/ide/coq_lex.mll @@ -81,7 +81,7 @@ let identchar = ['$' 'A'-'Z' 'a'-'z' '_' '\192'-'\214' '\216'-'\246' '\248'-'\255' '\'' '0'-'9'] let ident = firstchar identchar* -let sentence_sep = '.' [ ' ' '\n' '\t' ] +let sentence_sep = '.' [ ' ' '\r' '\n' '\t' ] let multiword_declaration = "Module" (space+ "Type")? diff --git a/ide/coqide.ml b/ide/coqide.ml index c838e603e..b1b255065 100644 --- a/ide/coqide.ml +++ b/ide/coqide.ml @@ -451,7 +451,7 @@ let split_slice_lax (buffer:GText.buffer) from upto = let rec grab_safe_sentence_start (iter:GText.iter) soi = let lax_back = iter#backward_char#has_tag Tags.Script.sentence in - let on_space = List.mem iter#char [0x09;0x0A;0x20] in + let on_space = List.mem iter#char [0x09;0x0A;0x20;0x0D] in let full_ending = iter#is_start || (lax_back & on_space) in if full_ending then iter else if iter#compare soi <= 0 then raise Not_found -- cgit v1.2.3