A guide to Boo's metaprogramming and extensibility features?

806 views Asked by At

I'm interested in learning about Boo's more powerful features such as syntactic macros, parser support (Ometa?), compiler pipeline, etc. My impression is that these areas have been in flux and somewhat under-documented. Are there any good resources for learning about these things other than studying the source code?

5

There are 5 answers

0
rektide On

By far the best reference to see what Boo can do is to spend a bunch of time going through the tests. It takes a while to puzzle out what's going on, but the tests really do flex all of the muscles that are available and are quite well written. https://github.com/bamboo/boo/blob/master/tests/testcases/macros/macro-1.boo

Also, note that boo's interpretter- booish- is really excellent and if you're not sure how a test works, you should probably spend time in booish prodding at it. http://boo.codehaus.org/Interactive+Interpreter

1
TrueWill On

There's Building Domain Specific Languages in Boo. I got an early early access edition and found it frustrating for the "flux" reason you mentioned; I finally gave up. Hopefully things have stabilized since then.

1
James Black On

I haven't looked through this site extensively, but it appears it may have the best references for Boo: http://boo.codehaus.org/Tutorials

This section is still not well documented but if you look at https://github.com/bamboo/boo/wiki/Syntactic-Macros you can see how to make syntactic macros. Basically you have to implement Boo.Lang.Compiler.IAstMacro.

The correct section is in https://github.com/bamboo/boo/wiki/Abstract-Syntax-Tree but it largely seems incomplete.

0
justin.m.chase On

Feel free to ask questions on the mailing list:

http://groups-beta.google.com/group/boolang?pli=1

1
rektide On

ask code gardener / boo author @rodgrigobamboo!

"boo metaprogramming facilities I - the ast".