Parsing System (v0.4)
Goldie Home (v0.4) -> Developers -> Library Source and StaticLang

Library Source and StaticLang

Q: I've looked at the source for Token, Language, Lexer and Parser, and OMG, what the hell is that mess?! (Especially Token! Geez!)

A: Heh :) Put simply, it's a kludge. The StaticLang tool generates static-style languages directly from Goldie's dynamic-style library source. That mess is all the directives used to help instruct StaticLang in how to do the conversion.

To read the dynamic-style source, just ignore all the weird /+...+/ directives and anything inside version(GoldieStaticLang) (it will NOT be defined when you compile).

To read the static-style source, look at StaticLang's output and remember that version(GoldieStaticLang) WILL be defined when compiling.

To read the dynamic-style source, and see how StaticLang will transform it, see the explanation of StaticLang's preprocessing below.

Q: Goldie is already a language processing tool. Why don't you just use Goldie and a D grammar to do the conversion?

A: I intend to eventually. But there isn't a D grammar for GOLD just yet (I intend to make one when I get a chance). Also, D is a fairly complex language, and involves a lot of semantic processing (especially if parsed with LR parsing, as GOLD/Goldie does). So GOLD/Goldie will likely need more enhancements before Goldie can support D in a nice clean way. I do intend for Goldie to eventually reach that point, though.

StaticLang's Preprocessing

Documentation of StaticLang's preprocessing is currently delayed because I may make use of template mixins to take over much of the work currently done by StaticLang.