* [Camlp4] questions
@ 2010-08-06 14:57 Raphael Proust
2010-08-09 7:04 ` [Caml-list] " Hendrik Tews
0 siblings, 1 reply; 2+ messages in thread
From: Raphael Proust @ 2010-08-06 14:57 UTC (permalink / raw)
To: caml-list
Hi all,
I've completed the syntax extension I asked the list about a few days ago. It
probably still needs a few tweaks, but it works. While coding, a few
questions/remarks came to mind:
Is it possible to only load the filters from Camlp4? Using such a feature one
could load dumped AST (just like ocamlc/ocamlopt does) (instead of getting a
"Illegal character \132"), filter it and dump it again.
Is there a (nice) way to input/output multiple files? I managed reading from a
second file while transforming one but the code is (really) ugly.
The above two "features" would allow more complex build process than the basic
one file unix-filter.
Are the defaults lexers/parsers/filters exported? if true then Where? else Why?
Also:
Links on the page http://brion.inria.fr/gallium/index.php/Relevant_Source_Files
are dead.
For those who ever need it camlunity as the ocamldoc online:
http://camlunity.ru/camlp4/
--
_______
Raphael
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] [Camlp4] questions
2010-08-06 14:57 [Camlp4] questions Raphael Proust
@ 2010-08-09 7:04 ` Hendrik Tews
0 siblings, 0 replies; 2+ messages in thread
From: Hendrik Tews @ 2010-08-09 7:04 UTC (permalink / raw)
To: caml-list
Raphael Proust <raphlalou@gmail.com> writes:
Is there a (nice) way to input/output multiple files? I managed reading from a
second file while transforming one but the code is (really) ugly.
How about
let start_loc_1 = Syntax.Loc.mkloc file_1 in
let stream_1 = Stream.of_channel (open_in file_1) in
let ast_1 = Syntax.parse_implem start_loc_1 stream_1 in
let start_loc_2 = Syntax.Loc.mkloc file_2 in
let stream_2 = Stream.of_channel (open_in file_2) in
let ast_2 = Syntax.parse_implem start_loc_2 stream_2
For those who ever need it camlunity as the ocamldoc online:
http://camlunity.ru/camlp4/
Nice, but the main camlp4 problem still needs to be fixed: The
sources are almost not documented. Just look at
http://camlunity.ru/camlp4/Camlp4.html, it _only_ says
Add an option to the command line options.
;-0
BTW, where are all the modules from the Camlp4Parsers directory,
eg Camlp4OCamlParser?
Bye,
Hendrik
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-09 7:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-06 14:57 [Camlp4] questions Raphael Proust
2010-08-09 7:04 ` [Caml-list] " Hendrik Tews
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox