[Grace-core] Pattern Matching by combinators and options

James Noble kjx at ecs.vuw.ac.nz
Tue Jul 5 03:17:43 PDT 2011


Hi all

so I have had *another* go:

https://projects.cecs.pdx.edu:8443/~black/NewOOL/index.cgi/wiki/GracePatternMatchingCombinators 

describes in quite some detail a mostly-Grace implementation based on Combinations and Options

The code looks rather simpler than the CPS-smalltalk-block-passing style.



https://projects.cecs.pdx.edu:8443/~black/NewOOL/index.cgi/wiki/GracePatternMatchingSyntaxGrace 

starts in on syntax - or at least points out an ambiguity I'm not sure how to resolve


the file "sample code/matching.grace" in the svn will run in minigrace. 
thanks to Michael for hacking on this to make it all work.

the code is not commented - read the wiki first for a commented version

James

PS

(do we want a "Literate Grace" style?
 if so, we should use {{{ and }}} to separate out the Grace code,
 and wiki-markup otherwise...
 OK: added to the Bad-Ideas list.)


More information about the Grace-core mailing list