On Sun, 23 Jan 2011 15:49:48 +0100 Daniel Marjamäki <daniel.marjam...@gmail.com> wrote:
> GCC-MELT is an interesting project. But it seems to be very difficult > to write lisp scripts. You don't have a C interface also, do you? The few people who tried writing MELT code are founding on the contrary that coding in MELT is easier than coding in C (even if I agree that MELT is not very well documented). The major MELT idea is on the contrary that coding in MELT, using the powerful features provided by the MELT language (pattern matching, functional/applicative & object programming styles), is much easier than coding in C. And MELT philosophy is indeed that it is a higher-level language than C (you don't have any pattern matching in C for instance). So I disagree with the idea that writing MELT code is difficult (and harder than writing in C). But it is also matter of taste. > I would like to see how I can use plain C. In that case, MELT is not really for you. The selling point of MELT is precisely to avoid the low level details of C and to give something higher-level to you. If you really want to code in C, don't use MELT. There is no interface from C to MELT, and there cannot be one... The purpose of MELT is to avoid coding plugins in C! >> I want to write a plugin that parse the AST. Could I get some hint >> about how to do it? The major issue is to understand all the details of GCC internal representations (i.e. Trees, Gimples). Did you understand them? Regards -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mine, sont seulement les miennes} ***