Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Handling include files using ocamllex
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Erik de Castro Lopo <mle+ocaml@m...>
Subject: Re: [Caml-list] Handling include files using ocamllex
Christoph Bauer wrote:

> A solution could be to create an lexbuf from a function with
> Lexing.from_function.
> This function has to manage a stack of open channels and positions. It
> has to scan for "#include"-statements and copies instead of these 
> statements the contents of the corresponding files into the buffer.

Nice idea Christoph. I'll give it a try.

Erik de Castro Lopo
The government everybody loves to abuse sues the company everybody loves
to hate. Throw in a bunch of faceless lawyers cross-examining techies
[with] all the charisma of a video driver and you've got a spectacle of
thoroughly miniscule proportions.