Browse thread
Handling include files using ocamllex
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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 |
skaller wrote:
> You should share that experience here. It's hard to know
> when to go for a class and when a simpler algebraic data
> structure is better, so user experience reports (use cases)
> are valuable data.
Well the problem was that I wanted to do this:
class lexstack top_filename
object
val mutable filename = top_filename
val mutable chan = open_in top_filename
val lexbuf = Lexing.from_channel chan
Oops, error message right there ^^^^^^ trying to use instance
variable chan.
> Yep, it should. But you probably should generalise to
> support conditional compilation as well.
Not part of my requirements so I'll skip that :-).
Erik
--
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"Only wimps use tape backup: *real* men just upload their
important stuff on FTP, and let the rest of the world
mirror it ;)" -- Linus Torvalds