From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id D841B7EFC0 for ; Wed, 23 Dec 2015 10:35:13 +0100 (CET) IronPort-PHdr: 9a23:TAZ+hBJck1mQ59zREdmcpTZWNBhigK39O0sv0rFitYgULP7xwZ3uMQTl6Ol3ixeRBMOAu6wC17qd6/qocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWC0YLrh6vqodX6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD86Fpy8kVc7j8ZKM+QvR8DXxyN2IuosHirxrNTBCPznQZW2QS1BFPBl6Wwgv9W8LeuyHgt+d5kBKRPcDsQKp8DTur5b1qRRuukywHOiQ06knYj8VxiORQpxf39E83+JLdfIzAbKk2RajaZ95PHWc= Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=gabriel.scherer@gmail.com; spf=Pass smtp.mailfrom=gabriel.scherer@gmail.com; spf=None smtp.helo=postmaster@mail-io0-f179.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.223.179; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.223.179 as permitted sender) identity=mailfrom; client-ip=209.85.223.179; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-io0-f179.google.com) identity=helo; client-ip=209.85.223.179; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-io0-f179.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A0AADeaXpWm7PfVdFehHkGjEuxBQENgWOGDwKBGwc4FAEBAQEBAQEBEAEBAQEBBgsLCSEugi2CCAEBAwESER0BGx0BAwELBgUEAQYDNAICIQEBEQEFARwGEyKHdwEDCgifc4ExPjGLSIFqgnmIWgoZJw1Wgx8BAQEBBgEBAQEBARcBBQ6GSIR/gk+FJIFKBZcCi1SBeI55RIYdhg0SJIEXIAEBgkYjJIFBPTSFKAEBAQ X-IPAS-Result: A0A0AADeaXpWm7PfVdFehHkGjEuxBQENgWOGDwKBGwc4FAEBAQEBAQEBEAEBAQEBBgsLCSEugi2CCAEBAwESER0BGx0BAwELBgUEAQYDNAICIQEBEQEFARwGEyKHdwEDCgifc4ExPjGLSIFqgnmIWgoZJw1Wgx8BAQEBBgEBAQEBARcBBQ6GSIR/gk+FJIFKBZcCi1SBeI55RIYdhg0SJIEXIAEBgkYjJIFBPTSFKAEBAQ X-IronPort-AV: E=Sophos;i="5.20,468,1444687200"; d="scan'208";a="158106714" Received: from mail-io0-f179.google.com ([209.85.223.179]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 23 Dec 2015 10:35:12 +0100 Received: by mail-io0-f179.google.com with SMTP id o67so210824463iof.3 for ; Wed, 23 Dec 2015 01:35:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=sWe0tbg5q6zcp6yhXqRDmrWl+twjkWK9G1LpymTN85c=; b=0aRE422q8BT1seVUtVbmneQDMYPdg0FACUM/96sIdz6JNbKTrYltWy/F1pIqlMAZtp i2Z9MOhwY+4xdKpldyWDB9VKmyvAN/xOHHE7ViH0evsk3ZbwpY4ATG2OAg5nDgWcwv5N VZmeQt6uzuwtUdBPwMRgvmX07DlYbDX2vhrWtEU0N5seYl6pUH3esKF1F1G/tTut/kwv AfZN2F661X4iB5lwdpMqUs7oBH+MAZ6EA+v5BdX8IPZ3IQ1PagiJgXhlVOhxQOzCo8u5 kY4ctyXbr7WplSRbmAxV2ngm4pVOWttgzlxN76CbDD3eXJ4vam2Pj5Dj64l+eHkBx8ji z+Iw== X-Received: by 10.107.157.85 with SMTP id g82mr28738167ioe.144.1450863311100; Wed, 23 Dec 2015 01:35:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.27.205 with HTTP; Wed, 23 Dec 2015 01:34:31 -0800 (PST) In-Reply-To: References: From: Gabriel Scherer Date: Wed, 23 Dec 2015 10:34:31 +0100 Message-ID: To: Junsong Li Cc: caml users Content-Type: multipart/alternative; boundary=001a1140a722469fcc05278d70a5 Subject: Re: [Caml-list] ocamldoc lexer: why tracking line_number and char_number explicitly? --001a1140a722469fcc05278d70a5 Content-Type: text/plain; charset=UTF-8 Hi Junsong, I suspect that this simply comes from the fact that ocamldoc started out as a separate project and thus had to develop its own location handling. If there is a clean patch to move to Lexing.position, feel free to propose it. If this requires invasive changes with a larger chance of regressions, it's maybe not worth it. (Note that there seem to be some uses of Lexing.position already in the file, but only in some cases. I don't know the detail and you may have some "git log" mining to understand them.) On Wed, Dec 23, 2015 at 6:52 AM, Junsong Li wrote: > Dear list, > > I am wondering why ocamldoc lexers (odoc_lexer.mll and > odoc_text_lexer.mll) do not use Lexing.position but keep tracking line > number and char number explicitly. Does this have anything to do with the > Unicode? > > Thanks, > Junsong > --001a1140a722469fcc05278d70a5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Junsong,

I suspect that this sim= ply comes from the fact that ocamldoc started out as a separate project and= thus had to develop its own location handling. If there is a clean patch t= o move to Lexing.position, feel free to propose it. If this requires invasi= ve changes with a larger chance of regressions, it's maybe not worth it= .

(Note that there seem to be some uses of Lexing.position alr= eady in the file, but only in some cases. I don't know the detail and y= ou may have some "git log" mining to understand them.)
<= div class=3D"gmail_extra">
On Wed, Dec 23, 20= 15 at 6:52 AM, Junsong Li <ljs.darkfish@gmail.com> wrot= e:
Dear list,

I am wondering why ocamldoc lexers (odoc_lexer.mll and odoc_text_l= exer.mll) do not use Lexing.position but keep tracking line number and char= number explicitly. Does this have anything to do with the Unicode?

Thanks,
Junsong

--001a1140a722469fcc05278d70a5--