Re: ASTs
Hannes Mehnert <[email protected]>
| Newsgroups | gmane.comp.lang.dylan.gwydion.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, On 17/01/2013 08:41, mikel evins wrote: > I had a little time tonight so I got a simple test harness for the > s-expression reader up. awesome. > Obviously, the goal is to rurn the Bard sketch into a real > implementation of a readtable-based reader that generates ASTs in > OpenDylan's native format. The obvious question to ask is, "where can > I find out more about the native format of OpenDylan's ASTs?" The Open Dylan parser/reader creates definitions (sources/dfmc/definitions/) out of the tokens, intermingled with macro expansion. Bruce pointed you already to the hackers guide - I believe I wrote that section some years ago... I think instantiating classes which are defined in dfmc-definition (like <method-definition> etc) from the s-expression reader should be doable - these definitions are later fed into dfmc-conversion, which produces the control and data flow graphs on which optimizations etc is done. I'd try hard to stay away from having to reimplement dfmc-conversion for prefix-dylan - it is a huge amount of code which is pretty hairy (though you'll most likely discover bugs/hardcoded stuff which only works with infix-dylan). dfmc-conversion emits some raw Dylan code (for class/slot initialization, implicit generics etc) and invokes the parser/macro expander on that - but that shouldn't hurt the s-expression reader. Cheers, Hannes _______________________________________________ hackers mailing list [email protected] https://lists.opendylan.org/mailman/listinfo/hackers