* [Caml-list] Lexing.position. Where to initialize field pos_fname
@ 2012-07-20 5:39 Ivan
2012-07-20 6:45 ` Dan Bensen
2012-07-20 7:46 ` David Allsopp
0 siblings, 2 replies; 3+ messages in thread
From: Ivan @ 2012-07-20 5:39 UTC (permalink / raw)
To: caml-list
I'm completely lost! Can somebody teach me, where to initialize this field?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Lexing.position. Where to initialize field pos_fname
2012-07-20 5:39 [Caml-list] Lexing.position. Where to initialize field pos_fname Ivan
@ 2012-07-20 6:45 ` Dan Bensen
2012-07-20 7:46 ` David Allsopp
1 sibling, 0 replies; 3+ messages in thread
From: Dan Bensen @ 2012-07-20 6:45 UTC (permalink / raw)
To: Ivan, caml-list
[-- Attachment #1: Type: text/plain, Size: 209 bytes --]
> Subject: [Caml-list] Lexing.position. Where to initialize field pos_fname
> I'm completely lost! Can somebody teach me, where to initialize this field?
In what context? Camlp4 initializes it automatically.
[-- Attachment #2: Type: text/html, Size: 510 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [Caml-list] Lexing.position. Where to initialize field pos_fname
2012-07-20 5:39 [Caml-list] Lexing.position. Where to initialize field pos_fname Ivan
2012-07-20 6:45 ` Dan Bensen
@ 2012-07-20 7:46 ` David Allsopp
1 sibling, 0 replies; 3+ messages in thread
From: David Allsopp @ 2012-07-20 7:46 UTC (permalink / raw)
To: Ivan, caml-list
Ivan wrote:
> I'm completely lost! Can somebody teach me, where to initialize this
> field?
Documentation is in module Lexing: "See the documentation of type lexbuf for information about how the lexing engine will manage positions." and there it says that the lexing engine will update pos_cnum and "The other fields are left unchanged by the lexing engine. In order to keep them accurate, they must be initialised before the first use of the lexbuf".
So, immediately after creating/acquiring the lexbuf, you initialise lex_start_p.pos_fname
David
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-20 7:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-20 5:39 [Caml-list] Lexing.position. Where to initialize field pos_fname Ivan
2012-07-20 6:45 ` Dan Bensen
2012-07-20 7:46 ` David Allsopp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox