Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Jean-Francois Monin <JeanFrancois.Monin@cnet.francetelecom.fr>
To: SAIBI Amokrane <saibi@simulog.fr>
Cc: caml-list@inria.fr (OCAML)
Subject: Re: Format
Date: Wed, 2 Jun 1999 10:01:38 +0200	[thread overview]
Message-ID: <199906020801.KAA24307@lsun565.lannion.cnet.fr> (raw)
In-Reply-To: <37527BF3.5213@sophia.simulog.fr>

> je ne vois pas de fonctions qui donnent la position courante (ligne,
> colonne). dois-je le gerer moi-meme?
> 
> merci de votre aide.
> 
> Amokrane SAIBI

Pour otags, j'ai procede de la maniere suivante.  On suppose qu'on a
en main le numero de caractere dans le fichier, il reste donc a
recuperer le numero de ligne correspondant.

- Faire (ou profiter d') une premiere passe sur le fichier en stockant 
le numero du premier caractere de chaque ligne dans un splay tree.
- La fonction floor fait alors exactement ce qu'il faut. 
Ces operations se font en temps constant.

Cf. http://www.multimania.com/moninjf/Ocaml/ :
dans otags, le fichiers line_number.ml (et etags.ml pour l'utilisation).

La bibliotheque Splay est recuperable au meme endroit.

-- Jean-Francois Monin.




      reply	other threads:[~1999-06-02 16:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-31 12:09 Format SAIBI Amokrane
1999-06-02  8:01 ` Jean-Francois Monin [this message]

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=199906020801.KAA24307@lsun565.lannion.cnet.fr \
    --to=jeanfrancois.monin@cnet.francetelecom.fr \
    --cc=caml-list@inria.fr \
    --cc=saibi@simulog.fr \
    /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