I reviewed a few techniques for implementing internal / embeddel DSLs in a host language and I didn't saw this one :) IMHO it's a nice tool to know about. Only for specific use cases but still useful.
CU, Udo On 23.09.14 09:06, Thierry Goubier wrote:
Thanks Udo;
I reviewed a few techniques for implementing internal / embeddel DSLs in a host language and I didn't saw this one :)
Thierry
2014-09-23 1:48 GMT+02:00 Udo Schneider <udo.schneider@homeaddress.de <mailto:udo.schneider@homeaddress.de>>:
All,
I just finished a blog entry. It shows how to use Smalltalk blocks as parsers/translators. E.g. translating a Block
[:customer | (customer joinDate year is: Date today year)]
into an SQL-like String
(YEAR(customers.joinDate) = 2014)
The SQL stuff is just an example - you can create nearly any output.
Check out http://readthesourceluke.__blogspot.de/2014/09/block-__translators-parsing-m... <http://readthesourceluke.blogspot.de/2014/09/block-translators-parsing-magic...>
Maybe that's old stuff for some of you - but I hope it's interesting for some at least :-)
Comments and feedback appreciated.
CU,
Udo