caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Stefano Zacchiroli <zack@bononia.it>
To: caml-list@inria.fr
Subject: Re: [Caml-list] camlp4 'loc' variable
Date: Sun, 22 Feb 2004 19:57:59 +0100	[thread overview]
Message-ID: <20040222185759.GA22449@fistandantilus.takhisis.org> (raw)
In-Reply-To: <30597310@newdasher.Dartmouth.EDU>

On Sun, Feb 22, 2004 at 01:06:47PM -0500, J. Garrett Morris wrote:
> which are used both in antiquotations and in let statements
> surrounding expr quotations ... when do I need to take 'loc' as a
> parameter?

The camlp4 manual states that the loc variable is bound in the "action"
part of a "level-rules" (i.e. the right hand side of an -> arrow in a
grammar production).

Therefore I guess you should pass loc as a parameter if you invoke
functions from those RHSs which are not defined inside a RHS.

Cheers.

-- 
Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/
If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. -!-

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2004-02-22 18:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-22 18:06 J. Garrett Morris
2004-02-22 18:57 ` Stefano Zacchiroli [this message]
2004-02-23  1:10 ` Aleksey Nogin

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=20040222185759.GA22449@fistandantilus.takhisis.org \
    --to=zack@bononia.it \
    --cc=caml-list@inria.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;
as well as URLs for NNTP newsgroup(s).