|
|
 | | From: | Juoke | | Subject: | Need to develop a compiler "source to source". | | Date: | 23 Dec 2004 17:53:38 -0500 |
|
|
 | I need to develop a (complex) compiler that translate from an high-level source - given the (e)bnf, quite long... - to another high-level source. I know there are dozens of apps, but I'm asking which one would be better, in your opinion.
The points are: *) need to translate from high-level to high-level using a free product *) need to produce a compiler in a portable format (i.e. to obtain something in Java o C++) *) possibly to have a kind of ready-made IDE: one should be able to have an IDE where can type the source, then select from a menu "translate" and obtain the new source (this is a minor point, but I'd like to hear suggestions of a customizable IDE where I could embed the generated compiler). *) I'd like an IDE for me too (so to focus on the (e)bnf and translations and not on code) for the developing phase.
Thank you. [Seems like an awfully specific order for someone who wants it for free. -John]
|
|
 | | From: | Nick Roberts | | Subject: | Re: Need to develop a compiler "source to source". | | Date: | 25 Dec 2004 20:18:28 -0500 |
|
|
 | juoke@katamail.com (Juoke) wrote:
> I need to develop a (complex) compiler that translate from an high-level > source - given the (e)bnf, quite long... - to another high-level source. I > know there are dozens of apps, but I'm asking which one would be better, > in your opinion.
I think you should investigate the Prolog programming language.
Prolog is a declarative language which is especially well suited to complex textual manipulations, including translations. The translation rules can be written in a (usually) very intelligible form, so that a very complex translation can be built up from a (large) set of relatively simple rules.
Because it is a full programming language, and most versions can interface to other programming languages anyway, Prolog can be more practical than seemingly 'easy' tools, in the end, for real life projects.
There is a Prolog resources list on the web page:
http://www.magicseyer.com/prolog_links.htm
I have used (and can can recommend) SWI Prolog, which is free:
http://www.swi-prolog.org/
I think SWI has a great interface and excellent debugger, but you may wish to try out some other Prologs, some of which have a GUI IDE (e.g. Amzi, Stawberry).
-- Nick Roberts
|
|
 | | From: | Alexey Demakov | | Subject: | Re: Need to develop a compiler "source to source". | | Date: | 25 Dec 2004 20:12:35 -0500 |
|
|
 | For rather complex source-to-source translations (specification extention of programming language to that language, http://www.unitesk.com) we use free TreeDL tool (http://treedl.sourceforge.org) with ANTLR for lexer/parser generation.
TreeDL allows to specify heterogenous AST structure in very clear way and and generates Java (in near future C#) code for tree classes. It also provides simple but powerful enough library for code generation and some auxiliary facilities (like localizable error messages).
See documentation and examples at tool homepage.
There is similar approach called TreeCC: http://www.southern-storm.com.au/treecc.html
As IDE for integration I recommend Eclipse http://www.eclipse.org
Regards, Alexey
----- Alexey Demakov TreeDL: Tree Description Language: http://treedl.sourceforge.net RedVerst Group: http://www.unitesk.com
----- Original Message ----- From: "Juoke" Sent: Friday, December 24, 2004 1:53 AM Subject: Need to develop a compiler "source to source".
> I need to develop a (complex) compiler that translate from an > high-level source - given the (e)bnf, quite long... - to another > high-level source. I know there are dozens of apps, but I'm asking > which one would be better, in your opinion.
|
|
 | | From: | Juoke | | Subject: | Re: Need to develop a compiler "source to source". | | Date: | Sat, 25 Dec 2004 20:45:32 GMT |
|
|
 | parsley. Place roast on top with fat side up. Place uncovered in 500° oven for 20 minutes, reduce oven to 325°. Bake till medium rare (150°) and let roast rest. Pour stock over onions and drippings, carve the meat and place the slices in the au jus.
Bisque à l?Enfant
Honor the memory of Grandma with this dish by utilizing her good silver soup tureen and her great grandchildren (crawfish, crab or lobster will work just as well, however this dish is classically made with crawfish).
Stuffed infant heads, stuffed crawfish heads, stuffed crab or lobster shells; make patties if shell or head is not available (such as with packaged crawfish, crab, or headless baby). Flour oil onions bell peppers garlic salt, pepper, etc. 3 cups chicken stock 2 sticks butter 3 tablespoons oil
First stuff the heads, or make the patties (see index) then fry or bake. Set aside to drain on paper towels. Make a roux with butter, oil and flour, brown vegetables in the roux, then add chicken stock and allow to simmer for 20 minutes. Add the patties or stuffed heads, and some loose crawfish, lobster, long piglet, or what have you. Cook on low for 15 minutes, then allow it to set for at least 15 minutes more. Serve over steamed rice; this di
|
|
 | | From: | Robby Raschke | | Subject: | Re: Need to develop a compiler "source to source". | | Date: | 25 Dec 2004 20:13:02 -0500 |
|
|
 | juoke@katamail.com (Juoke) writes: > I need to develop a (complex) compiler that translate from an > high-level source - given the (e)bnf, quite long... - to another > high-level source. I know there are dozens of apps, but I'm asking > which one would be better, in your opinion.
[...]
I have used Gentle (http://gentle.compilertools.net/) successfully in the past for translation jobs like this. But it does not address any of your GUI issues.
Robby
|
|
 | | From: | Juoke | | Subject: | Re: Need to develop a compiler "source to source". | | Date: | Sat, 25 Dec 2004 17:18:57 GMT |
|
|
 | frozen food section of your favorite grocery and select 2 high quality pie crusts (you will need one for the top also). Boil the prepared delicacy until the meat starts to come off the bones. Remove, de-bone and cube; continue to reduce the broth. Brown the onions, peppers and celery. Add the meat then season, continue browning. De-glaze with sherry, add the reduced broth. Finally, put in the root vegetables and simmer for 15 minutes. Allow to cool slightly. Place the pie pan in 375 degree oven for a few minutes so bottom crust is not soggy, reduce oven to 325. Fill the pie with stew, place top crust and with a fork, seal the crusts together then poke holes in top. Return to oven and bake for 30 minutes, or until pie crust is golden brown.
Sudden Infant Death Soup
SIDS: delicious in winter, comparable to old fashioned Beef and Vegetable Soup. Its free, you can sell the crib, baby clothes, toys, stroller... and so easy to procure if such a lucky find is at hand (just pick him up from the crib and he?s good to go)!
SIDS victim, cleaned ½ cup cooking oil Carrots onions broccoli whole cabbage fresh green beans potato turnip celery tomato ½ stick butter 1 cup cooked pasta (macaroni, shells, etc.)
Remove as much meat as possible, cube, and brown in hot oil. Add a little water, season, then add the carcass. Simmer for half an hour keeping the stock thick. Remove the carcass and add the vegetables slowly to the stock, so that it remai
|
|
|