caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: Junsong Li <ljs.darkfish@gmail.com>
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] ocamldoc lexer: why tracking line_number and char_number explicitly?
Date: Wed, 23 Dec 2015 10:34:31 +0100	[thread overview]
Message-ID: <CAPFanBH=QMSZ6EBqNLxxM36zmHGJapdhA6nF4+ADL4+B40VYMA@mail.gmail.com> (raw)
In-Reply-To: <CA+kGxtPchTEVDh1hOo8NmZL0Qp-POmAHx6q0zWjUoPiVMR+dxA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]

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 <ljs.darkfish@gmail.com> 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
>

[-- Attachment #2: Type: text/html, Size: 1270 bytes --]

  reply	other threads:[~2015-12-23  9:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-23  5:52 Junsong Li
2015-12-23  9:34 ` Gabriel Scherer [this message]
2015-12-24  4:52   ` Junsong Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPFanBH=QMSZ6EBqNLxxM36zmHGJapdhA6nF4+ADL4+B40VYMA@mail.gmail.com' \
    --to=gabriel.scherer@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=ljs.darkfish@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).