Re: [tcljava-dev] Parsing Jacl
Brought to you by:
mdejong
From: Tom P. <tpo...@ny...> - 2005-03-08 04:26:22
|
On Fri, Mar 04, 2005 at 03:26:15PM -0800, Mo DeJong wrote: > Funny you should mention this now, I just started on a project to do something > very much the same except that I am going to parse Jacl and write out .java > source code. Funny you should mention this, * 2. I too started on a similar project, but it's been on the shelf for quite a while. My idea was to write the entire system in Tcl, using 'parsetcl' (http://wiki.tcl.tk/9649), as the main parser, and a modified version of Nsync's (should ring a few bells, eh!) LL(1) parser to parse 'expr' expressions. Then compile the whole thing on the fly using my Hyde package. I had thoughts on generating either Java or C, depending on the actual runtime (using critcl to do the on-the-fly compilation for C). I had also modified Jacl to expose CallFrame and Namespace classes as public. Yeah, I realize that writing the compiler system in Tcl would be slow, but I was planning to write the compiler in a way to allow bootstrapping the compiler itself. I was also planning to impose some limitations on the compiler to avoid the sticky parts of compiling Tcl, such as assuming all builtin commands as immmutable, punting on 'trace', etc. I never got that far to worry about the actual implementation. Good luck, and keep us informed on your progress. -- Tom Poindexter tpo...@ny... http://www.nyx.net/~tpoindex/ |