OMeta

If you haven’t heard of it check this out:

http://www.tinlizzie.org/ometa/

I was just reading his Ph.D. dissertation linked on that page and this quote is really jumping out at me:

OMeta’s key insight is the realization that all of the passes in a traditional compiler are essentially pattern matching operations:
• a lexical analyzer finds patterns in a stream of characters to produce a stream of tokens;
• a parser matches a stream of tokens against a grammar (which itself is a collection of productions, or patterns) to produce abstract syntax trees (ASTs);
• a typechecker pattern-matches on ASTs to produce ASTs annotated with types;
• more generally, visitors pattern-match on ASTs to produce other ASTs;
• finally, a (naive) code generator pattern-matches on ASTs to produce code.

He is so right. It seems that pattern matching might be the other side of the coin of Transformation. Great stuff.

Advertisements

Drop a brain bomb

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s