Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] camlp4 'loc' variable
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Stefano Zacchiroli <zack@b...>
Subject: Re: [Caml-list] camlp4 'loc' variable
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