Browse thread
camlp4 stream parser syntax
[
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: | Joel Reymont <joelr1@g...> |
| Subject: | [Caml-list] Re: camlp4 stream parser syntax |
On Mar 8, 2009, at 3:32 PM, Matthieu Wipliez wrote:
> I'd say duplicate Static, and redefine "using". Seems like the
> simplest solution to me, certainly not the cleanest though (but is
> there an alternative?).
Now we are talking!
This is Static.ml:
module Make (Lexer : Sig.Lexer)
: Sig.Grammar.Static with module Loc = Lexer.Loc
and module Token = Lexer.Token
= struct
module Structure = Structure.Make Lexer;
module Delete = Delete.Make Structure;
module Insert = Insert.Make Structure;
module Fold = Fold.Make Structure;
include Structure;
...
value get_filter () = gram.gfilter;
...
value extend = Insert.extend;
end;
I read the documentation for 'include' but couldn't quite grasp
whether the included interface was exported from that module that's
including. Given that 'get_filter' is available but 'using', I reckon
the answer is NO.
What if Static1 included Static after making it, then included
Structure again and defined its own using in terms of the one provided
by Structure?
---
http://tinyco.de
Mac, C++, OCaml