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 ocaml.org.

Browse thread
Meta-programming?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-05-15 (04:51)
From: stalkern <stalkern@k...>
Subject: Re: "ocaml_beginners"::[] Re: Meta-programming?
Il Wednesday 15 May 2002 08:49, hai scritto:
> So, what you have to do is write a small parser yourself (preferably
> using the OCaml library) and an interpreter implementing what ever
> functionality you need.

Thank you Felix. I considered the creation of a file to include 
later on as a module as a very clumsy solution, and then I come to your 
conclusions, because not only a parser turns strings into actions, but also 
"something turning a string into actions" and that is generally called an 
"interpreter", is actually a parser. 
However, 
1) since I use parsers I discovered that they could be used or are actually 
used everywhere, so I wouldn't mind to limit their number in my programs... 
2) It still takes me some time to build up a parser. I'm ocamllexing and 
ocamlyaccing now, I find the camlp4 grammar still too poorly documented; I 
wonder whether it's faster e.g. at the Makefile level to write a camlp4 parser
3) I wondered whether a small function was already there for very simple 
constructs and for teh sake of my laziness...

I'll take a look at meta-ocaml. 
Thanks.

Ernesto