Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] camlp4: How to hook into the char stream of an existing grammar?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Hendrik Tews <tews@t...>
Subject: [Caml-list] camlp4: How to hook into the char stream of an existing grammar?
Hi,

I have the following question: Suppose I use camlp4 with a
predefined grammar (such as pa_o.cmo). Is it possible to install
a function that intercept the character stream that flows into
the lexer of camlp4 (for instance to record the positions of
newlines)?

At the moment I only see the following solution: Copy
plexer.{ml,mli} from the ocaml sources, change Plexer.gmake
(keeping its interface) and use camlp4 ./plexer.cmo ...

Bye,

Hendrik
-------------------
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